// 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_Zn[]={108347,108348,108349,108350,108351,108352,108353,108355,108357,108359,108360,108361,108362,\ 108363,108364,108397,108398,108399,108400,108406,108408,\ 108409,108410,108411,108414,108415,108416,108417,108418,108419,\ 108422,108423,108425,108426,108427,108428,108429,\ 108430,108431,108432,108433,108434,108435,108436,108437,108438,108440,\ 108441,108442,108443,108444,108459,108460,108461,\ 108512,108513,108514,108515,108516,108517,108518,108519,\ 108520,108523,108524,108525,108526,108527,\ 108535,108536,108537,108538,108539,108548,108559,108565,-1}; Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1}; //Int_t runlist_Au[]={108339,108340,108342,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1}; TTOFSort *a = new TTOFSort(); a->SetEnableMonitorPerBunch(); // include information on monitors per bunch a->AddDetector(kC6D6, 6); 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>2E12 && PulseIntensity<5E12"); //a->SetPriorCut(kC6D6,"PulseIntensity>5E12 && detn!=1 && detn!=4"); a->SetPriorCut(kSILI,"PulseIntensity>2E12 && PulseIntensity<5E12"); a->SetPriorCut(kPKUP,"PulseIntensity>2E12 && PulseIntensity<5E12"); 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, wfzn1, wfzn2, wfzn3, wfzn4); //Zero the additonal two C6D6s a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4); a->SetNewCutsEg(kC6D6, 0.200, 10.0); a->ProcessListOfRuns_Single(prefix, runlist_Zn, suffix, "Zn_single_ALL_parasitic.root", "Zn", "RECREATE"); a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Zn_single_ALL_parasitic.root", "E", "UPDATE"); a->ProcessListOfRuns_Sum(prefix, runlist_Zn, suffix, "Zn_sum_ALL_parasitic.root", "Zn", "RECREATE"); a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Zn_sum_ALL_parasitic.root", "E", "UPDATE"); return 0; }