diff --git a/macros/CCEScan/landauFit.C b/macros/CCEScan/landauFit.C old mode 100755 new mode 100644 index 5b3d2c0..bc6ddff --- a/macros/CCEScan/landauFit.C +++ b/macros/CCEScan/landauFit.C @@ -82,7 +82,7 @@ int exit = landauFit(argc,argv); - + Printf("End"); if (!runBatch) { theApp->Run(!runBatch); @@ -289,7 +289,7 @@ TCut cu_sel = STTool::get_track_selection(det, fill); // Get full selection for signal tracks/hits including radius - TCut cu_sig = cu_bkg && cu_sel && TCut(Form("(TMath::Sqrt(xHit*xHit+yHit*yHit)>%f && (TMath::Sqrt(xHit*xHit+yHit*yHit)<%f)", radmin, radmax)); + TCut cu_sig = cu_bkg && cu_sel && TCut(Form("(TMath::Sqrt(xHit*xHit+yHit*yHit)>%f && (TMath::Sqrt(xHit*xHit+yHit*yHit)<%f))", radmin, radmax)); // Fill Histograms diff --git a/macros/CCEScan/pulseFit.C b/macros/CCEScan/pulseFit.C index d26270d..ee91c6e 100755 --- a/macros/CCEScan/pulseFit.C +++ b/macros/CCEScan/pulseFit.C @@ -269,11 +269,11 @@ Info("pulseFit","#chi^{2}/ndf: %6.2f/%d",fu_pulse->GetChisquare(),fu_pulse->GetNDF()); // Make PDG-like correction of the uncertainties - //Michele - if (chi2ndf>1.0) { - Info("pulseFit","scaling"); - vr_adc_err*=TMath::Sqrt(chi2ndf); - } + //Commented out by Michele - 8/31 2017 + //if (chi2ndf>1.0) { + // Info("pulseFit","scaling"); + // vr_adc_err*=TMath::Sqrt(chi2ndf); + //} //Michele TMultiGraph* mg_pulse = new TMultiGraph("mg_pulse","Pulse multigraph"); @@ -346,11 +346,12 @@ // Write the data and the plots - + while (!gSystem->Exec(Form("ls %s &> /dev/null",fn_dummy.Data()))) { Info("landauFit","Waiting until file is closed"); gSystem->Sleep(1000); } + gSystem->Exec(Form("touch %s &> /dev/null",fn_dummy.Data())); f_data = new TFile(fn_data.Data(),"UPDATE"); diff --git a/macros/CCEScan/voltageFit_spline.C b/macros/CCEScan/voltageFit_spline.C index a97242b..31a1e49 100755 --- a/macros/CCEScan/voltageFit_spline.C +++ b/macros/CCEScan/voltageFit_spline.C @@ -385,7 +385,7 @@ // Scale them Info("voltageFit_spline","#chi^{2}/ndf: %6.2f/%d",fu_volt->GetChisquare(),fu_volt->GetNDF()); - /*Michele + /*Michele, confirmed in 8/31 2017 if (chi2ndf>0.00) { Info("voltageFit_spline","scaling"); vr_adc_err_corr*=TMath::Sqrt(chi2ndf); @@ -419,6 +419,7 @@ int iFirst = -1; int iSecon = -1; // Excluding first and last point as they have been artifically added + //Looking for the two voltages that are closest to Vdepl for(int i=1; iGetParameter("A_{0}")/s5_volt->Derivative(0.0); + double Vdepl_sys1 = Vdepl_val-fu_volt->GetParameter("A_{0}")/s5_volt->Derivative(0.0); //Wrong, sometimes this is a bad indication! // Alternative determination of the systematic uncertainty by taking the // difference between the determined depletion voltage and the extracted value from the sigmoid function