// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full #include #include #include #include #include #include #include #include #include #include #include #include #include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h" #ifndef __CINT__ #include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx" #endif using namespace std; Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);} //Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);} //Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);} Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);} Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);} Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);} Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);} Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);} Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0 Double_t dummy_function(Double_t x){return 0.;} int Zn68(){ Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run"; Char_t suffix[] = ".root"; //Int_t runlist_ZnP[]={108570, 108569, 108568, 108567, 108566, 108565, 108560, 108558, -1}; //Int_t runlist_Zn[]={108347,108348,108349,108350,108351,108352,108353,108354,\ 108355,108357,108359,108360,108361,108362,108363,\ 108364,108400,108399,108398,108397,108396,108395,\ 108411,108410,108409,108408,108407,108406,\ 108419,108418,108417,108416,108415,108414,\ 108444,108443,108442,108441,108440,108439,108438,108437,108436,\ 108435,108434,108433,108432,108431,108430,108429,108428,108427,\ 108426,108425,108423,108422,108462,108461,108460,108459,108458,\ 108457,108520,108519,108518,108517,108516,108515,108514,108513,\ 108512,108523,108527,108526,108525,108524,108539,108538,108537,\ 108536,108535,108560,108559,108548,\ 108570, 108569, 108568, 108567,108566, 108565, 108560, 108558,-1}; Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1}; Int_t runlist_Au[]={108339,108340,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1}; // isue with 108341? remove? TTOFSort *a = new TTOFSort(); a->SetEnableMonitorPerBunch(); // include information on monitors per bunch a->AddDetector(kC6D6, 4); a->AddDetector(kSILI,4); a->AddDetector(kPKUP,1); a->SetNewVariableNames_amplitude(kC6D6, "amp"); // use instead of variable amp a->SetNewVariableNames_amplitude(kSILI ,"amp"); a->SetNewVariableNames_amplitude(kPKUP ,"amp"); //a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12"); //a->SetPriorCut(kC6D6,"PulseIntensity>5E12 && detn!=1 && detn!=4 && detn!=5 && detn!=6"); a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000); // CLW: CHANGED BINNING a->SetNewBinParsA(kSILI, 0.0, 7000, 70000); // CLW: CHANGED BINNING a->SetNewVariableNames_amplitude(kC6D6, "amp"); a->SetNewFixedDeadtime(kC6D6, 50.0); // fixed deadtime of 30 ns a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns a->UseWeightingFunction(kC6D6, wfau1, wfau2, wfau3, wfau4); //Zero the additonal two C6D6s a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4); a->SetNewCutsEg(kC6D6, 0.200, 10.0); a->ProcessListOfRuns_Single(prefix, runlist_Au, suffix, "Au_single.root", "Au", "RECREATE"); a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Au_single.root", "E", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_Au, suffix, "Au_sum.root", "Au", "RECREATE"); a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Au_sum.root", "E", "UPDATE"); return 0; }