9 #ifndef DODELTAPTCUTSTUDY_C
10 #define DODELTAPTCUTSTUDY_C
20 #include "/sphenix/user/danderson/install/include/sdeltaptcutstudy/SDeltaPtCutStudy.h"
25 R__LOAD_LIBRARY(/sphenix/user/danderson/install/lib/libsdeltaptcutstudy.so)
29 static const
size_t NPar = 3;
40 const TString sInFile(
"../TruthMatching/input/merged/sPhenixG4_testingNewMatcher_oldEvaluator.pt020num10evt500pipm.d15m9y2023.root");
41 const TString sOutFile(
"deltaPtStudy.testingSignChange_piboth.pt020num5evt500pipm.d3m10y2023.root");
42 const TString sInTrack(
"ntp_track");
43 const TString sInTruth(
"ntp_gtrack");
51 const vector<tuple<double, TString, uint32_t, uint32_t, uint32_t>> projParams = {
69 const vector<tuple<double, TString, uint32_t, uint32_t, bool>> flatParams = {
87 const vector<tuple<double, TString, uint32_t, uint32_t, uint32_t, bool>> ptDependParams = {
88 make_tuple(1.0,
"_sigDPt10", 899, 24, 893,
false),
89 make_tuple(1.5,
"_sigDPt15", 909, 26, 903,
false),
90 make_tuple(2.0,
"_sigDPt20", 879, 32, 873,
true),
91 make_tuple(2.5,
"_sigDPt25", 889, 25, 883,
false),
92 make_tuple(3.0,
"_sigDPt30", 859, 27, 863,
false)
96 array<float, NPar> sigHiGuess = {1., -1., 1.};
97 array<float, NPar> sigLoGuess = {1., -1., 1.};
98 pair<float, float> normRange = {0.2, 1.2};
99 pair<float, float> ptFitRange = {0.5, 40.};
100 pair<float, float> deltaFitRange = {0., 0.1};
103 const uint32_t nInttTrkMin = 1;
104 const uint32_t nMVtxTrkMin = 2;
105 const uint32_t nTpcTrkMin = 35;
106 const double qualTrkMax = 10.;
107 const double vzTrkMax = 10.;
108 const double ptTrkMin = 0.1;
111 const pair<float, float> rPtRange = {0., 60.};
112 const pair<float, float> rFracRange = {0., 4.};
113 const pair<float, float> rDeltaRange = {0., 0.1};
114 const array<uint32_t, NTypes> arrColGraph = {923, 923, 809};
115 const array<uint32_t, NTypes> arrMarGraph = {20, 20, 46};
118 const uint32_t fFil = 0;
119 const uint32_t fLin = 1;
120 const uint32_t fWid = 1;
121 const uint32_t fTxt = 42;
122 const uint32_t fAln = 12;
123 const uint32_t fCnt = 1;
126 const TString sPtProjBase(
"DeltaPtProj");
127 const TString sPtDeltaBase(
"DeltaPt");
128 const TString sPtTrueBase(
"PtTrue");
129 const TString sPtRecoBase(
"PtReco");
130 const TString sPtFracBase(
"PtFrac");
131 const TString sPtTrkTruBase(
"PtTrkTruth");
134 const vector<TString> sPlotTxt = {
135 "#bf{#it{sPHENIX}} Simulation",
136 "5 #pi^{-} + 5 #pi^{+}/event, p_{T} #in (0, 20) GeV/c",
137 "#bf{Only #pi^{#pm}}"
141 bool doEffRebin =
true;
142 size_t nEffRebin = 5;
146 study -> SetInputOutputFiles(sInFile, sOutFile);
147 study -> SetInputTuples(sInTrack, sInTruth);
148 study -> SetGeneralTrackCuts(nInttTrkMin, nMVtxTrkMin, nTpcTrkMin, qualTrkMax, vzTrkMax, ptTrkMin);
149 study -> SetSigmaFitGuesses(sigHiGuess, sigLoGuess);
150 study -> SetNormAndFitRanges(normRange, ptFitRange, deltaFitRange);
151 study -> SetPlotRanges(rPtRange, rFracRange, rDeltaRange);
152 study -> SetGeneralStyleParameters(arrColGraph, arrMarGraph);
153 study -> SetGeneralHistParameters(fFil, fLin, fWid, fTxt, fAln, fCnt);
154 study -> SetHistBaseNames(sPtProjBase, sPtDeltaBase, sPtTrueBase, sPtRecoBase, sPtFracBase, sPtTrkTruBase);
155 study -> SetPlotText(sPlotTxt);
156 study -> SetEffRebinParameters(doEffRebin, nEffRebin);
157 study -> SetProjectionParameters(projParams);
158 study -> SetFlatCutParameters(flatParams);
159 study -> SetPtDependCutParameters(ptDependParams);