/// 23.6.23, 9:30 edit CLW - process also other runlists // g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` Process_Si_EAR2.C -o Process_Si_EAR2 && ./Process_Si_EAR2 // includes header, and source only in compiled script #include "/afs/cern.ch/work/r/rmucciol/public/TTOFSort/TTOFSort_nTOF.h" #ifndef __CINT__ #include "/afs/cern.ch/work/r/rmucciol/public/TTOFSort/TTOFSort_nTOF.cxx" #endif // -------------------------------------------------------------------------- // // // // -------------------------------------------------------------------------- Double_t a2e_c6d61(Double_t x) { // from amplitude (channel) to MeV return (4.9826533509E-02 + 1.6440658945E-05 * x - 1.0434771608E-12 * x * x); } Double_t a2e_c6d62(Double_t x) { // from amplitude (channel) to MeV return (3.4169825864E-02 + 1.4076790089E-05 * x - 7.9765434038E-13 * x * x); } Double_t a2e_c6d63(Double_t x) { // from amplitude (channel) to MeV return (3.9177392253E-02 + 1.7015644773E-05 * x - 4.0083807516E-13 * x * x); } Double_t a2e_c6d64(Double_t x) { // from amplitude (channel) to MeV return (4.1835244811E-02 + 1.0673010868E-05 * x - 5.3279014370E-14 * x * x); } Double_t wf(Double_t x) { return (0.468282 + 36.0785 * x + 9.54532 * x * x + 0.202353 * x * x * x - 0.0352043 * x * x * x * x); } /* First calibrations Double_t a2e_sted1(Double_t x) { return (6.25345e-02 + 3.04647e-03 * x); } Double_t a2e_sted2(Double_t x) { return (6.41447e-02 + 3.62458e-03 * x); } Double_t a2e_sted3(Double_t x) { return (4.83878e-02 + 3.19258e-03 * x); } Double_t a2e_sted4(Double_t x) { return (5.72867e-02 + 3.85617e-03 * x); } Double_t a2e_sted5(Double_t x) { return (4.61653e-02 + 3.09576e-03 * x); } Double_t a2e_sted6(Double_t x) { return (6.01178e-02 + 3.25993e-03 * x); } Double_t a2e_sted7(Double_t x) { return (5.37046e-02 + 3.19335e-03 * x); } Double_t a2e_sted8(Double_t x) { return (5.37046e-02 + 3.19335e-03 * x); } */ /* Double_t a2e_sted1(Double_t x) { return (6.88457E-02+ 3.07383E-03* x); } Double_t a2e_sted2(Double_t x) { return (6.30046E-02+ 3.64816E-03* x); } Double_t a2e_sted3(Double_t x) { return (6.16885E-02+ 3.21011E-03* x); } Double_t a2e_sted4(Double_t x) { return (5.76290E-02+ 3.91348E-03* x); } Double_t a2e_sted5(Double_t x) { return (5.48915E-02+ 3.12774E-03* x); } Double_t a2e_sted6(Double_t x) { return (6.94109E-02+ 3.30446E-03* x); } Double_t a2e_sted7(Double_t x) { return (7.06719E-02+ 3.18890E-03* x); } Double_t a2e_sted8(Double_t x) { return (7.06719E-02 + 3.18890E-03 * x); } */ /* Double_t a2e_sted1(Double_t x) { return (8.49569E-02+ 3.02467E-03* x+ 5.01828E-08*x*x); } Double_t a2e_sted2(Double_t x) { return (6.63359E-02+ 3.62838E-03* x+ 6.36851E-09*x*x); } Double_t a2e_sted3(Double_t x) { return (6.90246E-02+ 3.17091E-03* x+ 4.80934E-08*x*x); } Double_t a2e_sted4(Double_t x) { return (5.83187E-02+ 3.93397E-03* x+ 1.38546E-08*x*x); } Double_t a2e_sted5(Double_t x) { return (7.26372E-02+ 3.03107E-03* x+ 6.15236E-08*x*x); } Double_t a2e_sted6(Double_t x) { return (6.63090E-02+ 3.34231E-03* x+ -4.15391E-08*x*x); } Double_t a2e_sted7(Double_t x) { return (7.39348E-02+ 3.21695E-03* x+ -3.38091E-08*x*x); } Double_t a2e_sted8(Double_t x) { return (7.39348E-02 + 3.21695E-03 * x + -3.38091E-08 * x * x); } */ /* Double_t a2e_sted1(Double_t x) { return (6.12436E-02+ 2.99626E-03* x + 1.45286E-09* x * x); } Double_t a2e_sted2(Double_t x) { return (3.54473E-02+ 3.66036E-03* x + -1.02808E-07* x * x); } Double_t a2e_sted3(Double_t x) { return (5.41069E-02+ 3.10199E-03* x + 3.61722E-08* x * x); } Double_t a2e_sted4(Double_t x) { return (5.82907E-02+ 3.73851E-03* x + 6.26526E-08* x * x); } Double_t a2e_sted5(Double_t x) { return (5.99435E-02+ 2.93709E-03* x + 7.71012E-08* x * x); } Double_t a2e_sted6(Double_t x) { return (6.55392E-02+ 3.18712E-03* x + 1.44503E-08* x * x); } Double_t a2e_sted7(Double_t x) { return (5.01775E-02+ 3.15280E-03* x + -1.29076E-08* x * x); } Double_t a2e_sted8(Double_t x) { return (7.39348E-02 + 3.21695E-03 * x + -3.38091E-08 * x * x); } */ Double_t a2e_sted1(Double_t x) { return (5.67257E-02+ 2.98739E-03* x + 5.53612E-09* x * x); } Double_t a2e_sted2(Double_t x) { return (3.28429E-02+ 3.65244E-03* x + -1.00906E-07* x * x); } Double_t a2e_sted3(Double_t x) { return (4.94516E-02+ 3.09050E-03* x + 4.55854E-08* x * x); } Double_t a2e_sted4(Double_t x) { return (5.28963E-02+ 3.72607E-03* x + 8.07590E-08* x * x); } Double_t a2e_sted5(Double_t x) { return (5.72747E-02+ 2.91606E-03* x + 9.73475E-08* x * x); } Double_t a2e_sted6(Double_t x) { return (6.56951E-02+ 3.15511E-03* x + 3.41401E-08* x * x); } Double_t a2e_sted7(Double_t x) { return (4.66976E-02+ 3.12827E-03* x + 7.80229E-09* x * x); } Double_t a2e_sted8(Double_t x) { return (7.39348E-02 + 3.21695E-03 * x + -3.38091E-08 * x * x); } int main() { Char_t prefix[] = "/eos/experiment/ntof/processing/official/done/run"; Char_t suffix[] = ".root"; Int_t runlist_cs[] = {216090, 216091, 216104, -1}; Int_t runlist_cmc[] = { 216162,216160,216164,216165,216166,216167,216168, -1 }; Int_t runlist_y[] = {216092, 216103, -1}; //Detector mounting changed between runs 216092 and 216103 Int_t runlist_ambe[] = {216099, 216100, 216101, 216137, 216138, 216139, -1}; Int_t runlist_au20mm[] = {216108, 216157, -1}; Int_t runlist_au22mm[] = {216109, 216158, -1}; Int_t runlist_dummy[] = {216105, 216106, 216107, 216110, 216111, 216112, 216113, 216114, 216115, 216116, 216117, 216118, 216119, 216120, 216121, 216122, -1}; Int_t runlist_30si[] = {216123, 216124, 216125, 216126, 216127, 216128, 216129, 216130, 216131, 216132, 216133, 216134, 216135, -1}; Int_t runlist_sinat[] = {216159, 216160,216161,216169,216170,216171,216172,216173, -1}; Int_t runlist_amb[] = { 216203,216206,216206,216209,216212,216220,216222,216223,216228,216250,216251,216252,216253,216254,216255,216261,216265,216269,216270,216286,216287,216288,216295,216296,216297,216301,216302,216303,216306,216307,-1 }; TTOFSort *a = new TTOFSort(); a->AddDetector(kC6D6, 2); //a->SetNewBinParsA(kC6D6, 0.0, 6500, 6500000.0); //a->SetNewBinParsT(kC6D6, -10.0, 2.0, 1e3, 5000, 1e9); //Double the nbins (10k here becomes 20k bpd spec) a->AddDetector(kSTED, 8); a->AddDetector(kSILI, 4); a->AddDetector(kPKUP, 1); a->PrintSettings(); a->SetNewFixedDeadtime(kSTED, 30.0);//fixed deadtime of 30 ns a->SetNewCoincidencetime(kSTED, 30.0);//Coincidences between 30 ns a->SetNewFixedDeadtime(kC6D6, 50.0);//fixed deadtime of 30 ns a->SetNewCoincidencetime(kC6D6, 50.0);//Coincidences between 30 ns //a->SetNewVariableNames_amplitude(kSILI, "amp"); a->SetNewVariableNames_amplitude(kC6D6, "amp"); a->SetNewVariableNames_amplitude(kSTED, "amp"); a->SetNewBinParsA(kC6D6, 0.0, 10000, 5000); //a->SetNewBinParsA(kSILI, 0.0, 6500, 5000); a->SetNewBinParsA(kSTED, 0.0, 10000, 5000); //a->SetHandleTgamma(kC6D6, kUsePkup, 0.0); a->SetPriorCut(kC6D6, "amp>50"); a->SetPriorCut(kSTED, "amp>50"); a->UseCalibration(kSTED, a2e_sted1, a2e_sted2, a2e_sted3, a2e_sted4, a2e_sted5, a2e_sted6, a2e_sted7, a2e_sted8); //a->SetNewVariableNames_amplitude(kC6D6, "amp"); //a->SetNewBinParsA(kC6D6, 0.0, 6500, 70000); //a->SetNewCutsAmp_all(kC6D6, 600, 50000); //a->UseCalibration(kC6D6, a2e_c6d61, a2e_c6d62, a2e_c6d63, a2e_c6d64); //a->SetNewCutsEg(kC6D6, 0.200, 8.0, 0.200, 8.0, 0.200, 8.0, 0.200, 8.0); //a->SetPriorCut(kC6D6, "PulseIntensity>1e12"); //a->SetNewBinParsA(kSILI, 0.0, 1e4, 1e5); //a->SetNewVariableNames_amplitude(kSILI, "amp"); //a->SetPriorCut(kSILI, "PulseIntensity>1e12"); //a->UseWeightingFunction(kC6D6, wf, wf, wf, wf); a->SetPriorCut(kC6D6, "PulseIntensity<1e7"); a->ProcessListOfRuns_Sum(prefix, runlist_cs, suffix, "EAR2/Sum_Cal.root", "Cs", "RECREATE"); a->ProcessListOfRuns_Sum(prefix, runlist_y, suffix, "EAR2/Sum_Cal.root", "Y", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_ambe, suffix, "EAR2/Sum_Cal.root", "AmBe", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_cmc, suffix, "EAR2/Sum_Cal.root", "CmC", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_amb, suffix, "EAR2/Sum_Amb.root", "Amb", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_ambe, suffix, "EAR2/Single_Cal.root", "Ambe", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_cs, suffix, "EAR2/Single_Cal.root", "Cs", "UPDATE"); //a->ProcessListOfRuns_Single(prefix, runlist_y, suffix, "EAR2/Single_Cal.root", "Y", "UPDATE"); //a->ProcessListOfRuns_Single(prefix, runlist_cmc, suffix, "EAR2/Single_Cal.root", "CmC", "UPDATE"); /* //Deticated pulse a->SetPriorCut(kC6D6, "PulseIntensity>5e+12"); a->SetPriorCut(kSILI, "PulseIntensity>5e+12"); a->SetPriorCut(kPKUP, "PulseIntensity>5e+12"); a->SetPriorCut(kSTED, "PulseIntensity>5e+12"); a->ProcessListOfRuns_Sum(prefix, runlist_30si, suffix, "EAR2/Dedicated_Sum_Beam.root", "Si", "RECREATE"); a->ProcessListOfRuns_Sum(prefix, runlist_au20mm, suffix, "EAR2/Dedicated_Sum_Beam.root", "Au20", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_au22mm, suffix, "EAR2/Dedicated_Sum_Beam.root", "Au22", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_dummy, suffix, "EAR2/Dedicated_Sum_Beam.root", "Dummy", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_sinat, suffix, "EAR2/Dedicated_Sum_Beam.root", "Sinat", "UPDATE"); //parasitic pulse a->SetPriorCut(kC6D6, "PulseIntensity>1e+12 && PulseIntensity<5e+12"); a->SetPriorCut(kSILI, "PulseIntensity>1e+12 && PulseIntensity<5e+12"); a->SetPriorCut(kPKUP, "PulseIntensity>1e+12 && PulseIntensity<5e+12"); a->SetPriorCut(kSTED, "PulseIntensity>1e+12 && PulseIntensity<5e+12"); a->ProcessListOfRuns_Sum(prefix, runlist_30si, suffix, "EAR2/Parasitic_Sum_Beam.root", "Si", "RECREATE"); a->ProcessListOfRuns_Sum(prefix, runlist_au20mm, suffix, "EAR2/Parasitic_Sum_Beam.root", "Au20", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_au22mm, suffix, "EAR2/Parasitic_Sum_Beam.root", "Au22", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_dummy, suffix, "EAR2/Parasitic_Sum_Beam.root", "Dummy", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_sinat, suffix, "EAR2/Parasitic_Sum_Beam.root", "Sinat", "UPDATE"); */ //a->SetPriorCut(kSILI, "PulseIntensity>1e+12"); //a->SetPriorCut(kPKUP, "PulseIntensity>1e+12"); //a->SetPriorCut(kSTED, "PulseIntensity>1e+12"); //a->SetPriorCut(kC6D6, "PulseIntensity>1e+12"); //a->ProcessListOfRuns_Sum(prefix, runlist_30si, suffix, "EAR2/Sum_Beam.root", "Si", "RECREATE"); //a->ProcessListOfRuns_Sum(prefix, runlist_au20mm, suffix, "EAR2/Sum_Beam.root", "Au20", "UPDATE"); //a->ProcessListOfRuns_Sum(prefix, runlist_au22mm, suffix, "EAR2/Sum_Beam.root", "Au22", "UPDATE"); //a->ProcessListOfRuns_Sum(prefix, runlist_dummy, suffix, "EAR2/Sum_Beam.root", "Dummy", "UPDATE"); //a->ProcessListOfRuns_Sum(prefix, runlist_sinat, suffix, "EAR2/Sum_Beam.root", "Sinat", "UPDATE"); //a->ProcessListOfRuns_Single(prefix, runlist_30si, suffix, "EAR2/Single_30Si.root", "Si", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_au20mm, suffix, "EAR2/Single_Au20.root", "Au20", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_au22mm, suffix, "EAR2/Single_Au22.root", "Au22", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_dummy, suffix, "EAR2/Single_Dummy.root", "Dummy", "RECREATE"); //a->ProcessListOfRuns_Single(prefix, runlist_sinat, suffix, "EAR2/Single_Sinat.root", "Sinat", "RECREATE"); return 0; }