65 string ax =
"Yield/Event";
66 string axMinvX =
"M_{ee} [GeV/c^{2}]";
67 string axMinvY =
"dN/dM_{ee} [GeV/c^{2}]^{-1}";
70 fH.CreateH1(
"hEventNumber",
"",
"", 1, 0, 1.);
71 fH.CreateH1(
"hJobNumber",
"",
"", 1, 0, 1.);
75 fH.CreateH1(
"hMom",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]", ax, 100, 0., 10.);
76 fH.CreateH2(
"hMomPt",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"P_{t} [GeV/c]", ax, 100, 0., 10., 100, 0., 4.);
77 fH.CreateH2(
"hRecoPrec_Mom",
fH.fCandNames,
fH.fAnaStepNames,
"P_{MC} [GeV/c]",
"Ratio P_{rec}/P_{MC}", ax, 100, 0.,
79 fH.CreateH2(
"hRecoPrec_Mom_ID", {
"true",
"misid"},
"P_{MC} [GeV/c]",
"Ratio P_{rec}/P_{MC}", ax, 100, 0., 10., 100.,
81 fH.CreateH2(
"hMomVsAnglePairSignalMc",
"#sqrt{P_{e^{#pm}} P_{e^{#mp}}} [GeV/c]",
"#theta_{e^{+},e^{-}} [deg]",
82 "Counter", 100, 0., 5., 100, 0., 50.);
83 fH.CreateH1(
"hElMom", {
"all",
"prim"}, {
"mc",
"acc",
"recSts",
"recStsRich",
"recStsRichTrd",
"recStsRichTrdTof"},
84 "P [GeV/c]", ax, 100, 0., 10.);
85 fH.CreateH1(
"hPiMom", {
"all",
"prim"}, {
"mc",
"acc",
"recSts",
"recStsRich",
"recStsRichTrd",
"recStsRichTrdTof"},
86 "P [GeV/c]", ax, 100, 0., 10.);
87 fH.CreateH1(
"hProtonMom", {
"all",
"prim"}, {
"mc",
"acc",
"recSts",
"recStsRich",
"recStsRichTrd",
"recStsRichTrdTof"},
88 "P [GeV/c]", ax, 100, 0., 10.);
89 fH.CreateH1(
"hKaonMom", {
"all",
"prim"}, {
"mc",
"acc",
"recSts",
"recStsRich",
"recStsRichTrd",
"recStsRichTrdTof"},
90 "P [GeV/c]", ax, 100, 0., 10.);
91 fH.CreateH1(
"hMomPairSignal",
fH.fAnaStepNames,
"P [GeV/c]", ax, 100, 0., 15.);
92 for (
const string suff : {
"",
"+",
"-"}) {
93 fH.CreateH1(
"hMom" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"P [GeV/c]", ax, 100, 0., 10.);
94 fH.CreateH1(
"hMomPx" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"Px [GeV/c]", ax, 120, -3., 3.);
95 fH.CreateH1(
"hMomPy" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"Py [GeV/c]", ax, 120, -3., 3.);
96 fH.CreateH1(
"hMomPz" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"Pz [GeV/c]", ax, 120, -1., 11.);
97 fH.CreateH1(
"hPt" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"P_{t} [GeV/c]", ax, 100, 0., 4.);
98 fH.CreateH1(
"hRapidity" + suff,
fH.fSrcNames,
fH.fAnaStepNames,
"Rapidity", ax, 100, 0., 5.);
99 if (suff ==
"")
continue;
100 fH.CreateH1(
"hMom" + suff +
"_trueEl_bg_elid",
"P [GeV/c]", ax, 100, 0., 10.);
102 fH.CreateH1(
"hMomAcc+", {
"sts",
"rich",
"trd",
"tof"},
fH.fSrcNames,
"P [GeV/c]", ax, 100, 0., 10.);
103 fH.CreateH1(
"hMomAcc-", {
"sts",
"rich",
"trd",
"tof"},
fH.fSrcNames,
"P [GeV/c]", ax, 100, 0., 10.);
107 fH.CreateH1(
"hMotherPdg_mc",
"Pdg code",
"Particles / Event", 7000, -3500., 3500.);
108 fH.CreateH1(
"hCandPdg",
fH.fAnaStepNames,
"Pdg code",
"Particles / Event", 7001, -3500., 3500.);
109 fH.CreateH2(
"hCandPdgVsMom",
fH.fAnaStepNames,
"P [GeV/c]",
"Particle",
"Yield/(Event * Bin)", 100, 0., 10., 7, 0.,
111 fH.CreateH2(
"hCandPdgVsMom+",
"P [GeV/c]",
"Particle",
"Yield/(Event * Bin)", 100, 0., 10., 7, 0., 7.);
112 fH.CreateH2(
"hCandPdgVsMom-",
"P [GeV/c]",
"Particle",
"Yield/(Event * Bin)", 100, 0., 10., 7, 0., 7.);
114 fH.CreateH2(
"hCandElSrc",
"Analysis step",
"Mother of Electron Candidate", ax,
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps,
116 fH.CreateH2(
"hPdgVsMom", {
"rich",
"trd",
"tof"}, {
"rec",
"acc",
"chi2prim"},
"P [GeV/c]",
"Misid. Particle",
117 "Yield/(Event * Bin)", 100, 0., 10., 6, 0., 6.);
121 fH.CreateH2(
"hVertexGammaXZ",
fH.fAnaStepNames,
"Z [cm]",
"X [cm]", ax, 100, -10., 190., 100, -130., 130.);
122 fH.CreateH2(
"hVertexGammaYZ",
fH.fAnaStepNames,
"Z [cm]",
"Y [cm]", ax, 100, -10., 190., 100, -130., 130.);
123 fH.CreateH2(
"hVertexGammaXY",
fH.fAnaStepNames,
"X [cm]",
"Y [cm]", ax, 100, -130., 130., 100, -130., 130.);
124 fH.CreateH2(
"hVertexGammaRZ",
fH.fAnaStepNames,
"Z [cm]",
"#sqrt{X^{2}+Y^{2}} [cm]", ax, 110,
fZ - 10.,
fZ + 100., 50,
126 fH.CreateH2(
"hVertexGTrackRZ",
"Z [cm]",
"R [cm]", ax, 100, -50., 100., 100, -50., 50.);
129 fH.CreateH2(
"hVertexXZ_misidTof",
fH.fAnaStepNames,
"Z [cm]",
"X [cm]", ax, 110,
fZ - 10.,
fZ + 100., 100, -50., 50.);
130 fH.CreateH2(
"hVertexYZ_misidTof",
fH.fAnaStepNames,
"Z [cm]",
"Y [cm]", ax, 110,
fZ - 10.,
fZ + 100., 100, -50., 50.);
131 fH.CreateH2(
"hVertexXY_misidTof",
fH.fAnaStepNames,
"X [cm]",
"Y [cm]", ax, 100, -50., 50., 100, -50., 50.);
132 fH.CreateH2(
"hVertexRZ_misidTof",
fH.fAnaStepNames,
"Z [cm]",
"#sqrt{X^{2}+Y^{2}} [cm]", ax, 110,
fZ - 10.,
fZ + 100.,
137 fH.CreateH1(
"hNofMcTracks",
"Particle",
"Particles / Event", 7, 0., 7.);
138 fH.CreateH1(
"hNofGTracks",
"Particle",
"Particles / Event", 6, 0., 6.);
139 fH.CreateH1(
"hNofBgTracks",
"Analysis step",
"Tracks/event",
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps);
140 fH.CreateH1(
"hNofSignalTracks",
"Analysis step",
"Tracks/event",
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps);
141 fH.CreateH2(
"hBgSrcTracks",
"Analysis step",
"Candidate Source", ax,
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps, 8, 0., 8.);
142 fH.CreateH1(
"hNofTopoPairs", {
"gamma",
"pi0"},
"Pair type",
"Pairs/event", 8, 0., 8);
143 fH.CreateH1(
"hNofMismatches", {
"all",
"rich",
"trd",
"tof"},
"Analysis step",
"Tracks/event",
fH.fNofAnaSteps, 0.,
145 fH.CreateH1(
"hNofMismatches_gTracks",
fH.fGTrackNames,
"Detector", ax, 7., 0., 7.);
146 fH.CreateH1(
"hNofMismatchedTrackSegments",
fH.fGTrackNames,
"nof mism. track segments", ax, 4., 0., 4.);
147 fH.CreateH2(
"hMatchId_gTracks",
fH.fGTrackNames,
"Nof mismatched Track Segments",
"Identification", ax, 4., 0., 4.,
149 fH.CreateH1(
"hNofGhosts",
"Analysis step",
"Tracks/event",
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps);
150 fH.CreateH1(
"hNofMvdHits",
fH.fSrcNames,
"Number of hits in MVD", ax, 5, -0.5, 4.5);
151 fH.CreateH1(
"hNofStsHits",
fH.fSrcNames,
"Number of hits in STS", ax, 9, -0.5, 8.5);
152 fH.CreateH2(
"hNofHitsVsMom", {
"sts",
"rich",
"trd",
"tof"},
fH.fGTrackNames,
"P [GeV/c]",
"Number of Hits", ax, 100.,
153 0., 10., 50, -0.5, 49.5);
157 fH.CreateH2(
"hSrcBgPairs",
"Analysis step",
"Pair", ax,
fH.fNofAnaSteps, 0.,
fH.fNofAnaSteps,
fH.fNofBgPairSrc, 0.,
159 fH.CreateH2(
"hSrcBgPairsEpEm",
fH.fAnaStepNames,
"mother particle e+",
"mother particle e-", ax, 4, 0., 4., 4, 0.,
161 for (
int iMinv = 0; iMinv <= 24; iMinv++) {
162 for (
const string comb : {
"PM",
"PP",
"MM"}) {
163 for (
const string type : {
"pMc",
"pRec"}) {
165 fH.CreateH2(hName,
"PDG e^{+}",
"PDG e^{-}",
"Yield", 8, 0., 8., 8, 0., 8.);
169 fH.CreateH1(
"hMinvBgMatch", {
"trueMatch",
"trueMatchEl",
"trueMatchNotEl",
"mismatch"},
fH.fAnaStepNames, axMinvX, ax,
171 fH.CreateH1(
"hMinvBgSource",
fH.fBgPairSrcNames,
fH.fAnaStepNames, axMinvX, axMinvY, 250, 0., 2.5);
172 fH.CreateH1(
"hMinvBgSource2",
fH.fAnaStepNames,
173 {
"gg",
"pipi",
"pi0pi0",
"oo",
"gpi",
"gpi0",
"go",
"pipi0",
"pio",
"pi0o"}, axMinvX, axMinvY, 250, 0.,
178 fH.CreateH1(
"hChi2_truematch", {
"rich",
"trd",
"tof"},
fH.fGTrackNames,
"#chi^{2}", ax, 200, 0., 20.);
179 fH.CreateH1(
"hChi2_mismatch", {
"rich",
"trd",
"tof"},
fH.fGTrackNames,
"#chi^{2}", ax, 200, 0., 20.);
180 fH.CreateH1(
"hChi2Sts",
fH.fSrcNames,
"#chi^{2}", ax, 200, 0., 20.);
181 fH.CreateH1(
"hChi2PrimVertex",
fH.fSrcNames,
"#chi^{2}_{prim}", ax, 200, 0., 20.);
182 for (
const string det : {
"sts",
"rich",
"trd",
"tof"}) {
183 fH.CreateH2(
"hChi2Dets_" + det,
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"#chi^{2}", ax, 100., 0., 10., 100,
186 fH.CreateH2(
"hChi2Comb", {
"StsRich",
"StsTrd",
"StsTof",
"RichTrd",
"RichTof",
"TrdTof"},
fH.fCandNames,
187 "#chi^{2}_{1}",
"#chi^{2}_{2}", ax, 100., 0., 20., 100, 0., 20.);
191 for (
const string cat : {
"",
"_trueEl",
"_urqmdAll",
"_urqmdEl"}) {
192 fH.CreateH1(
"hMinv" + cat,
fH.fSrcNames,
fH.fAnaStepNames, axMinvX, axMinvY, 250, 0., 2.5,
true);
194 for (
const string comb : {
"PM",
"PP",
"MM"}) {
195 fH.CreateH1(
"hMinv" + comb, {
"sameEv",
"mixedEv"}, axMinvX, axMinvY, 250, 0., 2.5,
true);
198 fH.CreateH2(
"hRecoPrec_Minv",
"M_{ee, MC} [GeV/c^{2}]",
"Ratio M_{ee, rec}/M_{ee, MC}", ax, 250, 0., 2.5, 200., 0.,
200 fH.CreateH1(
"hMinv_unscaled", axMinvX, axMinvY, 250, 0., 2.5);
201 fH.CreateH1(
"hMinv", {
"tt",
"tm",
"mt",
"mm"}, axMinvX, axMinvY, 250, 0., 2.5,
true);
205 fH.CreateH2(
"hTtCut", {
"all",
"pion",
"truePair"},
fH.fSrcNames,
"#sqrt{p_{e^{#pm}} p_{rec}} [GeV/c]",
206 "#theta_{e^{+},e^{-}} [deg]", ax, 100, 0., 5., 100, 0., 5.);
207 fH.CreateH2(
"hStCut", {
"all",
"pion",
"truePair"},
fH.fSrcNames,
"#sqrt{p_{e^{#pm}} p_{rec}} [GeV/c]",
208 "#theta_{e^{#pm},rec} [deg]", ax, 100, 0., 5., 100, 0., 5.);
209 fH.CreateH2(
"hRtCut", {
"all",
"pion",
"truePair"},
fH.fSrcNames,
"#sqrt{p_{e^{#pm}} p_{rec}} [GeV/c]",
210 "#theta_{e^{#pm},rec} [deg]", ax, 100, 0., 5., 100, 0., 5.);
214 for (
const string comb : {
"PM",
"PP",
"MM"}) {
215 string hName =
"hMinvComb" + comb;
216 for (
const string cat : {
"",
"_trueEl",
"_urqmdAll",
"_urqmdEl"}) {
217 string hNameCat = hName + cat;
218 fH.CreateH1(hNameCat, {
"sameEv",
"mixedEv"},
fH.fAnaStepNames, axMinvX, axMinvY, 250, 0., 2.5,
true);
220 fH.CreateH2(hName, {
"px",
"py",
"px_mother",
"py_mother"},
"P [GeV/c]",
"P [GeV/c]", ax, 30, -3., 3., 30, -3., 3.);
221 fH.CreateH2(hName, {
"R",
"R_mother"},
"Start Vertex #sqrt{X_{1}^{2}+Y_{1}^{2}} [cm]",
222 "Start Vertex #sqrt{X_{2}^{2}+Y_{2}^{2}} [cm]", ax, 50., 0., 50., 50., 0., 50.);
223 fH.CreateH2(hName +
"_theta-minv", axMinvX,
"#theta [#circ]", ax, 100, 0., 2.5, 20, 0., 80.);
225 fH.CreateH1(
"hMinvCombPM_same", {
"tt",
"tm",
"mt",
"mm"}, axMinvX, axMinvY, 250, 0., 2.5);
229 const Int_t nDim = 3;
232 std::array<Int_t, nDim> FSnBinsMom = {nBinsMom, nBinsMom, nBinsMom};
233 std::array<Double_t, nDim> FSMomMin = {-3., -3., 0.};
234 std::array<Double_t, nDim> FSMomMax = {3., 3., 10.};
236 string stepname =
fH.fAnaStepNames[
static_cast<int>(step)];
239 for (
const string charge : {
"plus",
"minus",
"plusEl",
"minusEl"}) {
241 string hNameMultUrqmd =
"hfsc_mult_urqmd_urqmd_" + charge +
"_" + stepname;
242 string hNameMomUrqmd =
"hfsc_mom_urqmd_urqmd_" + charge +
"_" + stepname;
243 string titleMomUrqmd = hNameMomUrqmd +
"; P_{x} [GeV/c]; P_{y} [GeV/c]; P_{z} [GeV/c]";
244 fH.CreateH1(hNameMultUrqmd,
"N / Event", ax, nBinsMult, 0., nBinsMult);
245 fH.fHM.CreateSparse<THnSparseD, nDim>(hNameMomUrqmd, titleMomUrqmd, FSnBinsMom, FSMomMin, FSMomMax);
247 if (charge ==
"plusEl" || charge ==
"minusEl")
continue;
248 string hNameMultPluto =
"hfsc_mult_pluto_" +
fParticle +
"_" + charge +
"_" + stepname;
249 string hNameMomPluto =
"hfsc_mom_pluto_" +
fParticle +
"_" + charge +
"_" + stepname;
250 string titleMomPluto = hNameMomPluto +
"; P_{x} [GeV/c]; P_{y} [GeV/c]; P_{z} [GeV/c]";
251 fH.CreateH1(hNameMultPluto,
"N / Event", ax, nBinsMult, 0., nBinsMult);
252 fH.fHM.CreateSparse<THnSparseD, nDim>(hNameMomPluto, titleMomPluto, FSnBinsMom, FSMomMin, FSMomMax);
256 for (
const string& ptcl :
fH.fFSCandNames) {
257 for (
const string charge : {
"plus",
"minus"}) {
258 string hNameMultUrqmd =
"hfsp_mult_urqmd_" + ptcl +
"_" + charge +
"_" + stepname;
259 string hNameMomUrqmd =
"hfsp_mom_urqmd_" + ptcl +
"_" + charge +
"_" + stepname;
260 string titleMomUrQmd = hNameMomUrqmd +
"; P_{x} [GeV/c]; P_{y} [GeV/c]; P_{z} [GeV/c]";
261 fH.CreateH1(hNameMultUrqmd,
"N / Event", ax, nBinsMult, 0., nBinsMult);
262 fH.fHM.CreateSparse<THnSparseD, nDim>(hNameMomUrqmd, titleMomUrQmd, FSnBinsMom, FSMomMin, FSMomMax);
269 fH.CreateH1(
"hLikeSignCorr",
fH.fAnaStepNames,
"Decay Mode",
"N / Event", 6, 0., 6.);
273 fH.CreateH2(
"hELossSts",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"E-Loss [e/300 #mum]", ax, 100., 0., 10., 100,
278 fH.CreateH2(
"hMvdCut", {
"1",
"2"},
fH.fSrcNames,
"d_{MVD} [cm]",
"P_{e} [GeV/c]", ax, 100, 0., 1., 100, 0., 5.);
279 fH.CreateH2(
"hMvdXY", {
"1",
"2"},
fH.fSrcNames,
"X [cm]",
"Y [cm]", ax, 60, -6., 6., 60, -6., 6.);
280 fH.CreateH1(
"hMvdR", {
"1",
"2"},
fH.fSrcNames,
"#sqrt{X^{2}+Y^{2}} [cm]", ax, 60, 0., 6.);
281 fH.CreateH1(
"hMvdCutQa", {
"1",
"2"},
fH.fSrcNames,
"MVD hit assignment", ax, 2, 0., 2.);
282 fH.CreateH1(
"hMvdMcDist", {
"1",
"2"},
fH.fSrcNames,
"Track-Hit distance [cm]", ax, 100, 0., 10.);
286 fH.CreateH2(
"hPmtXY",
fH.fSrcNames,
"X [cm]",
"Y [cm]",
"Counter", 100, -110, 110, 100, -200, 200);
287 fH.CreateH1(
"hNofRichHits",
"NofRichHits / Event", ax, 30, 0., 3000.);
288 fH.CreateH1(
"hNofRichRings",
"NofRichRings / Event", ax, 30, 0., 60.);
289 fH.CreateH2(
"hRichAnnSrc",
fH.fSrcNames,
"P [GeV/c]",
"RICH ANN output", ax, 100, 0., 10., 100, -1.1, 1.1);
290 fH.CreateH2(
"hRichAnn",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"RICH ANN output", ax, 100, 0., 10., 100, -1.1,
292 fH.CreateH1(
"hRichRingTrackDist",
fH.fCandNames,
fH.fAnaStepNames,
"D [cm]", ax, 100, 0., 20.);
293 fH.CreateH2(
"hRichRingTrackDistVsMom",
fH.fCandNames,
fH.fAnaStepNames,
"P_{rec} [GeV/c]",
"D [cm]",
"Yield", 100, 0.,
295 fH.CreateH1(
"hRichRingBoA",
fH.fAnaStepNames,
"B/A", ax, 24, 0., 1.2);
296 fH.CreateH2(
"RichRingNeighbour_all", {
"next",
"secondnext"},
fH.fCandNames,
"r [cm]",
"Ring-Track-Dist [cm]", ax, 150,
297 100., 250., 100, 0., 20.);
298 fH.CreateH2(
"RichRingNeighbour_elid", {
"next",
"secondnext"},
fH.fCandNames,
"r [cm]",
"Ring-Track-Dist [cm]", ax,
299 150, 100., 250., 100, 0., 20.);
303 fH.CreateH2(
"hTrdElLike",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"Likelihood output", ax, 100, 0., 10., 100,
308 fH.CreateH2(
"hTofM2Src",
fH.fSrcNames,
"P [GeV/c]",
"m^{2} [GeV/c^{2}]^{2}", ax, 100, 0., 6., 100, -0.3, 1.0);
309 fH.CreateH2(
"hTofM2",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"m^{2} [GeV/c^{2}]^{2}", ax, 100, 0., 10., 400,
311 fH.CreateH2(
"hTofM2_woDoubleIndex", {
"1",
"2",
"3+"},
fH.fCandNames,
"P [GeV/c]",
"m^{2} [GeV/c^{2}]^{2}", ax, 100,
312 0., 10., 300, -0.5, 1.);
313 fH.CreateH2(
"hTofM2", {
"truematch",
"mismatch"},
fH.fCandNames,
"P [GeV/c]",
"m^{2} [GeV/c^{2}]^{2}", ax, 100, 0.,
315 fH.CreateH2(
"hTofDist",
fH.fCandNames,
fH.fAnaStepNames,
"P [GeV/c]",
"Distance (norm.)", ax, 100, 0., 10., 100, 0.,
317 fH.CreateH2(
"hTofDist", {
"truematch",
"mismatch"},
fH.fCandNames,
"P [GeV/c]",
"Distance (norm.)", ax, 100, 0., 10.,
319 fH.CreateH2(
"hTofM2_chi2prim", {
"50",
"100",
"150",
"200",
"300",
"400",
"500"},
fH.fCandNames,
"P [GeV/c]",
320 "m^{2} [GeV/c^{2}]^{2}", ax, 100, 0., 10., 100, -0.5, 1.);
321 fH.CreateH2(
"hTofM2_elid", {
"50",
"100",
"150",
"200",
"300",
"400",
"500"},
fH.fCandNames,
"P [GeV/c]",
322 "m^{2} [GeV/c^{2}]^{2}", ax, 100, 0., 10., 100, -0.5, 1.);
323 fH.CreateH2(
"hTofChi2", {
"all",
"elid"},
fH.fCandNames,
"P [GeV/c]",
"#chi^2_{TOF}", ax, 100, 0., 10., 100., 0., 20.);
324 fH.CreateH1(
"hMatch", {
"rich",
"trd",
"tof"},
"Match", ax, 2, 0., 2.);
328 for (
size_t iP = 4; iP <
fH.fCandNames.size(); iP++) {
329 fH.CreateH1(
"hMom_" +
fH.fCandNames[iP], {
"true",
"misid"},
"P [GeV/c]", ax, 100, 0., 10.);
330 fH.CreateH2(
"hPtY_" +
fH.fCandNames[iP], {
"true",
"misid"},
"Rapidity",
"P_{t} [GeV/c]", ax, 40, 0., 4., 40, 0.,
332 fH.CreateH2(
"hTofM2_" +
fH.fCandNames[iP], {
"true",
"misid"},
"P [GeV/c]",
"m^{2} [GeV/c^{2}]^{2}", ax, 100, 0.,
338 fH.CreateH2(
"hElossTime_chi2prim", {
"Seg1Mom1",
"Seg1Mom2",
"Seg2Mom1",
"Seg2Mom2"},
fH.fCandNames,
"Time (ct) [m]",
339 "E-Loss [e/300 #mum]", ax, 80, 8., 16., 100, 1e4, 1e5);
340 fH.CreateH2(
"hElossTime_elid", {
"Seg1Mom1",
"Seg1Mom2",
"Seg2Mom1",
"Seg2Mom2"},
fH.fCandNames,
"Time (ct) [m]",
341 "E-Loss [e/300 #mum]", ax, 80, 8., 16., 100, 1e4, 1e5);
342 fH.CreateH2(
"hMinvPt",
fH.fSrcNames,
fH.fAnaStepNames, axMinvX,
"P_{t} [GeV/c]", ax, 100, 0., 2., 25, 0., 2.5);
343 fH.CreateH2(
"hPtYPairSignal",
fH.fAnaStepNames,
"Rapidity",
"P_{t} [GeV/c]", ax, 40, 0., 4., 20, 0., 2.);
344 fH.CreateH1(
"hAnglePair",
fH.fSrcNames,
fH.fAnaStepNames,
"#Theta_{1,2} [deg]", ax, 80, 0., 80.);
345 fH.CreateH1(
"hSuppression", {
"pion",
"proton"}, {
"mc",
"reco",
"acc",
"elid",
"ttcut",
"ptcut"},
"P_{MC} [GeV/c]", ax,
347 fH.CreateH2(
"hPtY",
fH.fCandNames,
fH.fAnaStepNames,
"Rapidity",
"P_{t} [GeV/c]", ax, 40, 0., 4., 20, 0., 2.);
348 fH.CreateH2(
"hBetaMom",
fH.fCandNames,
"P * Q ",
"#beta", ax, 200, -10., 10., 150., 0., 1.5);
349 fH.CreateH2(
"hCandProperties", {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11"},
fH.fCandNames,
"Property",
350 "Value", ax, 16, 0., 16., 100, 0., 10.);
1458 for (
size_t iC1 = 0; iC1 < nCands - 1; iC1++) {
1460 for (
size_t iC2 = iC1 + 1; iC2 < nCands; iC2++) {
1463 if (cand1.fCharge * cand2.fCharge < 0)
1465 else if (cand1.fCharge > 0 && cand2.fCharge > 0)
1467 else if (cand1.fCharge < 0 && cand2.fCharge < 0)
1470 int pdg1 = std::abs(cand1.fMcPdg);
1471 int pdg2 = std::abs(cand2.fMcPdg);
1473 bool isSameEvent = (cand1.fEventNumber == cand2.fEventNumber);
1476 for (
auto step :
fH.fAnaSteps) {
1478 if (!(cand1.IsCutTill(step) && cand2.IsCutTill(step)))
continue;
1483 fH.FillH1(
"hMinv" + comb +
"_sameEv", pRec.
fMinv, w);
1485 fH.FillH1(
"hMinv" + comb +
"_mixedEv", pRec.
fMinv, w);
1489 if (step ==
ELmvmAnaStep::ElId && isSameEvent && cand1.fCharge * cand2.fCharge < 0) {
1490 bool isC1El = (pdg1 == 11);
1491 bool isC2El = (pdg2 == 11);
1492 bool isC1Plus = (cand1.fCharge > 0);
1493 bool isC2Plus = (cand2.fCharge > 0);
1495 bool cand1PlusTrue = (isC1Plus && isC1El);
1496 bool cand1MinusTrue = (!isC1Plus && isC1El);
1497 bool cand1PlusMis = (isC1Plus && !isC1El);
1498 bool cand1MinusMis = (!isC1Plus && !isC1El);
1500 bool cand2PlusTrue = (isC2Plus && isC2El);
1501 bool cand2MinusTrue = (!isC2Plus && isC2El);
1502 bool cand2PlusMis = (isC2Plus && !isC2El);
1503 bool cand2MinusMis = (!isC2Plus && !isC2El);
1505 if (isC1El && isC2El)
1506 fH.FillH1(
"hMinvCombPM_same_tt", pRec.
fMinv, w);
1507 else if (!isC1El && !isC2El)
1508 fH.FillH1(
"hMinvCombPM_same_mm", pRec.
fMinv, w);
1509 else if ((cand1PlusTrue && cand2MinusMis) || (cand1MinusMis && cand2PlusTrue))
1510 fH.FillH1(
"hMinvCombPM_same_tm", pRec.
fMinv, w);
1511 else if ((cand1PlusMis && cand2MinusTrue) || (cand1MinusTrue && cand2PlusMis))
1512 fH.FillH1(
"hMinvCombPM_same_mt", pRec.
fMinv, w);
1522 TVector3 v1, v2, v1Mother, v2Mother;
1525 double theta = pRec.
fAngle;
1526 double R1 =
sqrt(v1.X() * v1.X() + v1.Y() * v1.Y());
1527 double R2 =
sqrt(v2.X() * v2.X() + v2.Y() * v2.Y());
1528 double R1mother = 0.;
1529 double R2mother = 0.;
1530 if (mother1 !=
nullptr && mother2 !=
nullptr) {
1533 R1mother =
sqrt(v1Mother.X() * v1Mother.X() + v1Mother.Y() * v1Mother.Y());
1534 R2mother =
sqrt(v2Mother.X() * v2Mother.X() + v2Mother.Y() * v2Mother.Y());
1537 if (cand1.fCharge * cand2.fCharge < 0) {
1538 fH.FillH2(
"hMinvCombPM_px", cand1.fMomentum.X(), cand2.fMomentum.X(), w);
1539 fH.FillH2(
"hMinvCombPM_py", cand1.fMomentum.Y(), cand2.fMomentum.Y(), w);
1540 fH.FillH2(
"hMinvCombPM_R", R1, R2, w);
1541 fH.FillH2(
"hMinvCombPM_theta-minv", pRec.
fMinv, theta, w);
1542 if (mother1 !=
nullptr && mother2 !=
nullptr) {
1543 fH.FillH2(
"hMinvCombPM_px_mother", mother1->
GetPx(), mother2->
GetPx(), w);
1544 fH.FillH2(
"hMinvCombPM_py_mother", mother1->
GetPy(), mother2->
GetPy(), w);
1545 fH.FillH2(
"hMinvCombPM_R_mother", R1mother, R2mother, w);
1548 else if (cand1.fCharge > 0 && cand2.fCharge > 0) {
1549 fH.FillH2(
"hMinvCombPP_px", cand1.fMomentum.X(), cand2.fMomentum.X(), w);
1550 fH.FillH2(
"hMinvCombPP_py", cand1.fMomentum.Y(), cand2.fMomentum.Y(), w);
1551 fH.FillH2(
"hMinvCombPP_R", R1, R2, w);
1552 fH.FillH2(
"hMinvCombPP_theta-minv", pRec.
fMinv, theta, w);
1553 if (mother1 !=
nullptr && mother2 !=
nullptr) {
1554 fH.FillH2(
"hMinvCombPP_px_mother", mother1->
GetPx(), mother2->
GetPx(), w);
1555 fH.FillH2(
"hMinvCombPP_py_mother", mother1->
GetPy(), mother2->
GetPy(), w);
1556 fH.FillH2(
"hMinvCombPP_R_mother", R1mother, R2mother, w);
1559 else if (cand1.fCharge < 0 && cand2.fCharge < 0) {
1560 fH.FillH2(
"hMinvCombMM_px", cand1.fMomentum.X(), cand2.fMomentum.X(), w);
1561 fH.FillH2(
"hMinvCombMM_py", cand1.fMomentum.Y(), cand2.fMomentum.Y(), w);
1562 fH.FillH2(
"hMinvCombMM_R", R1, R2, w);
1563 fH.FillH2(
"hMinvCombMM_theta-minv", pRec.
fMinv, theta, w);
1564 if (mother1 !=
nullptr && mother2 !=
nullptr) {
1565 fH.FillH2(
"hMinvCombMM_px_mother", mother1->
GetPx(), mother2->
GetPx(), w);
1566 fH.FillH2(
"hMinvCombMM_py_mother", mother1->
GetPy(), mother2->
GetPy(), w);
1567 fH.FillH2(
"hMinvCombMM_R_mother", R1mother, R2mother, w);
2007 for (
const auto& cand :
fCands) {
2008 double w = cand.fWeight;
2010 if (mcTrack ==
nullptr)
continue;
2013 double pRec = cand.fMomentum.Mag();
2014 double pMc = mcTrack->
GetP();
2018 string matchString = (isMismatch) ?
"mismatch" :
"truematch";
2019 fH.FillH2(
"hTofDist_" + matchString +
"_" + pidString, pRec, cand.fTofDist, w);
2021 for (
auto step :
fH.fAnaSteps) {
2022 fH.FillH2(
"hPtY_" + pidString, step, cand.fRapidity, cand.fMomentum.Perp(), w);
2024 if (cand.IsCutTill(step)) {
2026 fH.FillH1(
"hCandPdg", step, cand.fMcPdg, w);
2027 fH.FillH1(
"hMom_" + pidString, step, pRec, w);
2028 fH.FillH2(
"hMomPt_" + pidString, step, pRec, cand.fMomentum.Perp(), w);
2029 fH.FillH2(
"hELossSts_" + pidString, step, pRec, cand.fELossSts, w);
2030 fH.FillH2(
"hRichAnn_" + pidString, step, pRec, cand.fRichAnn, w);
2031 fH.FillH2(
"hTrdElLike_" + pidString, step, pRec, cand.fTrdLikeEl, w);
2032 fH.FillH2(
"hChi2Dets_sts_" + pidString, step, pRec, cand.fChi2Sts, w);
2033 fH.FillH2(
"hChi2Dets_rich_" + pidString, step, pRec, cand.fChi2Rich, w);
2034 fH.FillH2(
"hChi2Dets_trd_" + pidString, step, pRec, cand.fChi2Trd, w);
2035 fH.FillH2(
"hTofM2_" + pidString, step, pRec, cand.fMass2, w);
2036 fH.FillH2(
"hTofDist_" + pidString, step, pRec, cand.fTofDist, w);
2037 if (step ==
ELmvmAnaStep::ElId)
fH.FillH2(
"hTofChi2_elid_" + pidString, pRec, cand.fChi2Tof, w);
2039 if (mcTrack !=
nullptr) {
2046 if (std::abs(pdg) == 211)
fH.FillH1(
"hSuppression_pion_reco", pMc, w);
2047 if (pdg == 2212)
fH.FillH1(
"hSuppression_proton_reco", pMc, w);
2050 if (std::abs(pdg) == 211)
fH.FillH1(
"hSuppression_pion_acc", pMc, w);
2051 if (pdg == 2212)
fH.FillH1(
"hSuppression_proton_acc", pMc, w);
2054 if (std::abs(pdg) == 211)
fH.FillH1(
"hSuppression_pion_elid", pMc, w);
2055 if (pdg == 2212)
fH.FillH1(
"hSuppression_proton_elid", pMc, w);
2058 if (std::abs(pdg) == 211)
fH.FillH1(
"hSuppression_pion_ttcut", pMc, w);
2059 if (pdg == 2212)
fH.FillH1(
"hSuppression_proton_ttcut", pMc, w);
2062 if (std::abs(pdg) == 211)
fH.FillH1(
"hSuppression_pion_ptcut", pMc, w);
2063 if (pdg == 2212)
fH.FillH1(
"hSuppression_proton_ptcut", pMc, w);
2067 fH.FillH1(
"hRichRingTrackDist_" + pidString, step, richDist);
2068 fH.FillH1(
"hRichRingTrackDistVsMom_" + pidString, step, pRec, richDist);
2075 fH.FillH2(
"hChi2Comb_StsRich_" + pidString, cand.fChi2Sts, cand.fChi2Rich, w);
2076 fH.FillH2(
"hChi2Comb_StsTrd_" + pidString, cand.fChi2Sts, cand.fChi2Trd, w);
2077 fH.FillH2(
"hChi2Comb_RichTrd_" + pidString, cand.fChi2Rich, cand.fChi2Trd, w);
2081 for (
int iT = 0; iT <
fTofTracks->GetEntriesFast(); iT++) {
2086 fH.FillH2(
"hTofM2_woDoubleIndex_1_" + pidString, pRec, cand.fMass2, w);
2088 fH.FillH2(
"hTofM2_woDoubleIndex_2_" + pidString, pRec, cand.fMass2, w);
2090 fH.FillH2(
"hTofM2_woDoubleIndex_3+_" + pidString, pRec, cand.fMass2, w);
2094 fH.FillH2(
"hTofChi2_all_" + pidString, pRec, cand.fChi2Tof, w);
2096 double hitX = tofHit->
GetX();
2097 double hitY = tofHit->
GetY();
2101 for (
int pos : {50, 100, 150, 200, 300, 400, 500}) {
2102 if (cand.fIsChi2Prim) {
2104 if (
IsInBox(
pos, -
pos, hitX, hitY, width))
fH.FillH2(hName, pMc, cand.fMass2, w);
2106 if (cand.fIsElectron) {
2108 if (
IsInBox(
pos, -
pos, hitX, hitY, width))
fH.FillH2(hName, pMc, cand.fMass2, w);
2114 if (cand.fStsMcTrackId == cand.fTofMcTrackId)
2115 fH.FillH2(
"hTofM2_truematch_" + pidString, pMc, cand.fMass2, w);
2117 fH.FillH2(
"hTofM2_mismatch_" + pidString, pMc, cand.fMass2, w);
2121 if (tofHit !=
nullptr) {
2127 if (cand.fIsChi2Prim) {
2128 if (hitX > (x1 - wi) && hitX < (x1 + wi) && hitY > (y1 - wi) && hitY < (y1 + wi) && pMc > 0.5 && pMc <= 1.0)
2129 fH.FillH2(
"hElossTime_chi2prim_Seg1Mom1_" + pidString, cand.fTime, cand.fELossSts, w);
2130 if (hitX > (x1 - wi) && hitX < (x1 + wi) && hitY > (y1 - wi) && hitY < (y1 + wi) && pMc > 1.0 && pMc <= 2.0)
2131 fH.FillH2(
"hElossTime_chi2prim_Seg1Mom2_" + pidString, cand.fTime, cand.fELossSts, w);
2132 if (hitX > (x2 - wi) && hitX < (x2 + wi) && hitY > (y2 - wi) && hitY < (y2 + wi) && pMc > 0.5 && pMc <= 1.0)
2133 fH.FillH2(
"hElossTime_chi2prim_Seg2Mom1_" + pidString, cand.fTime, cand.fELossSts, w);
2134 if (hitX > (x2 - wi) && hitX < (x2 + wi) && hitY > (y2 - wi) && hitY < (y2 + wi) && pMc > 1.0 && pMc <= 2.0)
2135 fH.FillH2(
"hElossTime_chi2prim_Seg2Mom2_" + pidString, cand.fTime, cand.fELossSts, w);
2137 if (cand.fIsElectron) {
2138 if (hitX > (x1 - wi) && hitX < (x1 + wi) && hitY > (y1 - wi) && hitY < (y1 + wi) && pMc > 0.5 && pMc <= 1.0)
2139 fH.FillH2(
"hElossTime_elid_Seg1Mom1_" + pidString, cand.fTime, cand.fELossSts, w);
2140 if (hitX > (x1 - wi) && hitX < (x1 + wi) && hitY > (y1 - wi) && hitY < (y1 + wi) && pMc > 1.0 && pMc <= 2.0)
2141 fH.FillH2(
"hElossTime_elid_Seg1Mom2_" + pidString, cand.fTime, cand.fELossSts, w);
2142 if (hitX > (x2 - wi) && hitX < (x2 + wi) && hitY > (y2 - wi) && hitY < (y2 + wi) && pMc > 0.5 && pMc <= 1.0)
2143 fH.FillH2(
"hElossTime_elid_Seg2Mom1_" + pidString, cand.fTime, cand.fELossSts, w);
2144 if (hitX > (x2 - wi) && hitX < (x2 + wi) && hitY > (y2 - wi) && hitY < (y2 + wi) && pMc > 1.0 && pMc <= 2.0)
2145 fH.FillH2(
"hElossTime_elid_Seg2Mom2_" + pidString, cand.fTime, cand.fELossSts, w);
2151 double m = cand.fMass;
2152 double r = pRec / m;
2153 double beta = r /
sqrt(1. + r * r);
2154 double q = (cand.fCharge > 0) ? 1 : (cand.fCharge < 0) ? -1. : 0.;
2155 fH.FillH2(
"hBetaMom_" + ptcl, q * pRec, beta);
2159 for (
size_t iC1 = 0; iC1 <
fCands.size() - 1; iC1++) {
2162 if (mctrack1 ==
nullptr)
continue;
2163 for (
size_t iC2 = iC1 + 1; iC2 <
fCands.size(); iC2++) {
2166 if (mctrack2 ==
nullptr)
continue;
2169 for (
auto step :
fH.fAnaSteps) {
2183 for (
const auto& cand :
fCands) {
2185 double w = cand.fWeight;
2186 string hName =
"hCandProperties";
2189 if (cand.fMomentum.Mag() >= 0 && cand.fMomentum.Mag() < 1.)
2191 else if (cand.fMomentum.Mag() >= 1. && cand.fMomentum.Mag() < 2.)
2193 else if (cand.fMomentum.Mag() >= 2. && cand.fMomentum.Mag() < 3.)
2195 else if (cand.fMomentum.Mag() >= 3. && cand.fMomentum.Mag() < 4.)
2197 else if (cand.fMomentum.Mag() >= 4. && cand.fMomentum.Mag() < 5.)
2199 else if (cand.fMomentum.Mag() >= 5. && cand.fMomentum.Mag() < 6.)
2201 else if (cand.fMomentum.Mag() >= 6. && cand.fMomentum.Mag() < 7.)
2203 else if (cand.fMomentum.Mag() >= 7. && cand.fMomentum.Mag() < 8.)
2205 else if (cand.fMomentum.Mag() >= 8. && cand.fMomentum.Mag() < 9.)
2207 else if (cand.fMomentum.Mag() >= 9. && cand.fMomentum.Mag() <= 10.)
2209 else if (cand.fMomentum.Mag() > 10.)
2213 string hFullName = hName +
"_" + pRange +
"_" + ptclString;
2215 double px = cand.fMomentum.X();
2216 double py = cand.fMomentum.Y();
2217 double chi2Prim = cand.fChi2Prim;
2218 double chi2Sts = cand.fChi2Sts;
2219 double chi2Rich = cand.fChi2Rich;
2220 double fChi2Trd = cand.fChi2Trd / 2.;
2221 double stsELoss = cand.fELossSts / 1e4;
2222 double richAnn = cand.fRichAnn + 2.;
2223 double trdLikeEl = cand.fTrdLikeEl;
2224 double trdLikePi = cand.fTrdLikePi;
2225 double tofM2 = cand.fMass2 + 1.;
2226 double toftime = cand.fTime;
2227 double nHitsSts = cand.fNofHitsSts;
2228 double nHitsRich = cand.fNofHitsRich / 5.;
2229 double nHitsTrd = cand.fNofHitsTrd;
2230 double chi2Tof = cand.fChi2Tof;
2232 fH.FillH2(hFullName, 0.5, px, w);
2233 fH.FillH2(hFullName, 1.5, py, w);
2234 fH.FillH2(hFullName, 2.5, chi2Prim, w);
2235 fH.FillH2(hFullName, 3.5, chi2Sts, w);
2236 fH.FillH2(hFullName, 4.5, chi2Rich, w);
2237 fH.FillH2(hFullName, 5.5, fChi2Trd, w);
2238 fH.FillH2(hFullName, 6.5, stsELoss, w);
2239 fH.FillH2(hFullName, 7.5, richAnn, w);
2240 fH.FillH2(hFullName, 8.5, trdLikeEl, w);
2241 fH.FillH2(hFullName, 9.5, trdLikePi, w);
2242 fH.FillH2(hFullName, 10.5, tofM2, w);
2243 fH.FillH2(hFullName, 11.5, toftime, w);
2244 fH.FillH2(hFullName, 12.5, chi2Tof, w);
2245 fH.FillH2(hFullName, 13.5, nHitsSts, w);
2246 fH.FillH2(hFullName, 14.5, nHitsRich, w);
2247 fH.FillH2(hFullName, 15.5, nHitsTrd, w);