@@ -84,32 +84,43 @@ struct lithium4Candidate {
8484 float recoPhiPr () const { return std::atan2 (momPr[1 ], momPr[0 ]); }
8585 float recoEtaPr () const { return std::asinh (momPr[2 ] / recoPtPr ()); }
8686
87- std::array<float , 3 > momHe3;
88- std::array<float , 3 > momPr;
87+ std::array<float , 3 > momHe3 = {99 .f , 99 .f , 99 .f };
88+ std::array<float , 3 > momPr = {99 .f , 99 .f , 99 .f };
89+
90+ bool isMatter = false ;
91+
92+ uint32_t PIDtrkHe3 = 0xFFFFF ; // PID in tracking
93+ uint32_t PIDtrkPr = 0xFFFFF ;
8994
9095 float nSigmaHe3 = -10 ;
9196 float nSigmaPr = -10 ;
9297 float massTOFHe3 = -10 ;
9398 float massTOFPr = -10 ;
9499
95- float he3DCAXY = -10 ;
96- float he3DCAZ = -10 ;
97- float protonDCAXY = -10 ;
98- float protonDCAZ = -10 ;
100+ float DCAxyHe3 = -10 ;
101+ float DCAzHe3 = -10 ;
102+ float DCAxyPr = -10 ;
103+ float DCAzPr = -10 ;
99104 uint16_t tpcSignalHe3 = 0u ;
100- float momHe3TPC = -10 .f;
101- float momPrTPC = -10 .f;
105+ float momHe3TPC = -99 .f;
106+ uint16_t tpcSignalPr = 0u ;
107+ float momPrTPC = -99 .f;
102108 float invMass = -10 .f;
109+
110+ uint32_t itsClSizeHe3 = 0u ;
111+ uint32_t itsClSizePr = 0u ;
103112 uint8_t nTPCClustersHe3 = 0u ;
104113
114+ float momHe3MC = -99 .f;
115+ float momPrMC = -99 .f;
116+
105117 uint8_t sharedClustersHe3 = 0u ;
106118 uint8_t sharedClustersPr = 0u ;
107119
108120 bool isBkgUS = false ;
109121 bool isBkgEM = false ;
110- bool isMatter = false ;
111122
112- float l4PtMC = -10 .f;
123+ float l4PtMC = -99 .f;
113124 float l4MassMC = -10 .f;
114125};
115126
@@ -146,15 +157,15 @@ struct lithium4analysis {
146157 histos.add (" hCentrality" , " Centrality distribution" , kTH1F , {{2001 , -0.5 , 2000.5 }});
147158 histos.add (" hVtxZ" , " Vertex distribution in Z;Z (cm)" , kTH1F , {{400 , -20.0 , 20.0 }});
148159 histos.add (" hNcontributor" , " Number of primary vertex contributor" , kTH1F , {{2000 , 0 .0f , 2000 .0f }});
149- histos.add (" hHe3Dcaxy " , " ;DCA_{xy} (cm)" , kTH1F , {{200 , -1 .0f , 1 .0f }});
150- histos.add (" hHe3Dcaz " , " ;DCA_{z} (cm)" , kTH1F , {{200 , -1 .0f , 1 .0f }});
160+ histos.add (" hDCAxyHe3 " , " ;DCA_{xy} (cm)" , kTH1F , {{200 , -1 .0f , 1 .0f }});
161+ histos.add (" hDCAzHe3 " , " ;DCA_{z} (cm)" , kTH1F , {{200 , -1 .0f , 1 .0f }});
151162 histos.add (" hLitInvMass" , " ; M(^{3}He + p) (GeV/#it{c}^{2})" , kTH1F , {{50 , 3 .74f , 3 .85f }});
152163 histos.add (" hHe3Pt" , " #it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})" , kTH1F , {{200 , 0 .0f , 6 .0f }});
153164 histos.add (" hProtonPt" , " Pt distribution; #it{p}_{T} (GeV/#it{c})" , kTH1F , {{200 , 0 .0f , 3 .0f }});
154165 histos.add (" h2NsigmaHe3TPC" , " NsigmaHe3 TPC distribution; Signed #it{p}/#it{z} (GeV/#it{c}); n#sigma_{TPC}({}^{3}He)" , kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }});
155166 histos.add (" h2NsigmaProtonTPC" , " NsigmaProton TPC distribution; Signed #it{p}/#it{z} (GeV/#it{c}); n#sigma_{TPC}(p)" , kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }});
156167 histos.add (" h2NsigmaProtonTOF" , " NsigmaProton TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)" , kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }});
157- histos.add (" hTrackSel" , " Accepted tracks" , kTH1F , {{Selections::kAll , -0.5 , + Selections::kAll - 0.5 }});
168+ histos.add (" hTrackSel" , " Accepted tracks" , kTH1F , {{Selections::kAll , -0.5 , static_cast < double >( Selections::kAll ) - 0.5 }});
158169
159170 for (int i = 0 ; i < 5 ; i++) {
160171 mBBparamsHe [i] = cfgBetheBlochParams->get (" He3" , Form (" p%i" , i));
@@ -172,7 +183,7 @@ struct lithium4analysis {
172183 {
173184
174185 if (candidate.itsNCls () < 5 ||
175- candidate.tpcNClsFound () < 70 ||
186+ candidate.tpcNClsFound () < 100 || // candidate.tpcNClsFound() < 70 ||
176187 candidate.tpcNClsCrossedRows () < 70 ||
177188 candidate.tpcNClsCrossedRows () < 0.8 * candidate.tpcNClsFindable () ||
178189 candidate.tpcChi2NCl () > 4 .f ||
@@ -231,22 +242,28 @@ struct lithium4analysis {
231242 return false ;
232243 }
233244
234- int he3Sign = candidateHe3.sign ();
235- int protonSign = candidatePr.sign ();
245+ l4Cand. PIDtrkHe3 = candidateHe3.pidForTracking ();
246+ l4Cand. PIDtrkPr = candidatePr.pidForTracking ();
236247
237- l4Cand.isBkgUS = he3Sign * protonSign < 0 ;
248+ l4Cand.isBkgUS = candidateHe3. sign () * candidatePr. sign () < 0 ;
238249 l4Cand.isBkgEM = mix;
239- l4Cand.isMatter = he3Sign > 0 ;
240- l4Cand.he3DCAXY = candidateHe3.dcaXY ();
241- l4Cand.he3DCAZ = candidateHe3.dcaZ ();
242- l4Cand.protonDCAXY = candidatePr.dcaXY ();
243- l4Cand.protonDCAZ = candidatePr.dcaZ ();
250+ l4Cand.isMatter = candidateHe3.sign () > 0 ;
251+ l4Cand.DCAxyHe3 = candidateHe3.dcaXY ();
252+ l4Cand.DCAzHe3 = candidateHe3.dcaZ ();
253+ l4Cand.DCAxyPr = candidatePr.dcaXY ();
254+ l4Cand.DCAzPr = candidatePr.dcaZ ();
255+
244256 l4Cand.tpcSignalHe3 = candidateHe3.tpcSignal ();
245257 l4Cand.momHe3TPC = candidateHe3.tpcInnerParam ();
258+ l4Cand.tpcSignalPr = candidatePr.tpcSignal ();
246259 l4Cand.momPrTPC = candidatePr.tpcInnerParam ();
247260 l4Cand.invMass = invMass;
248261
262+ l4Cand.itsClSizeHe3 = candidateHe3.itsClusterSizes ();
263+ l4Cand.itsClSizePr = candidatePr.itsClusterSizes ();
264+
249265 l4Cand.nTPCClustersHe3 = candidateHe3.tpcNClsFound ();
266+
250267 l4Cand.nSigmaHe3 = computeNSigmaHe3 (candidateHe3);
251268 l4Cand.nSigmaPr = candidatePr.tpcNSigmaPr ();
252269
@@ -264,8 +281,8 @@ struct lithium4analysis {
264281 histos.fill (HIST (" hHe3Pt" ), l4cand.recoPtHe3 ());
265282 histos.fill (HIST (" hProtonPt" ), l4cand.recoPtPr ());
266283 histos.fill (HIST (" hLitInvMass" ), l4cand.invMass );
267- histos.fill (HIST (" hHe3Dcaxy " ), l4cand.he3DCAXY );
268- histos.fill (HIST (" hHe3Dcaz " ), l4cand.he3DCAZ );
284+ histos.fill (HIST (" hDCAxyHe3 " ), l4cand.DCAxyHe3 );
285+ histos.fill (HIST (" hDCAzHe3 " ), l4cand.DCAzHe3 );
269286 histos.fill (HIST (" h2NsigmaHe3TPC" ), candSign * l4cand.momHe3TPC , l4cand.nSigmaHe3 );
270287 histos.fill (HIST (" h2NsigmaProtonTPC" ), candSign * l4cand.momPrTPC , l4cand.nSigmaPr );
271288 histos.fill (HIST (" h2NsigmaProtonTOF" ), l4cand.recoPtPr (), l4cand.nSigmaPr );
@@ -369,12 +386,15 @@ struct lithium4analysis {
369386 }
370387
371388 for (auto & l4Cand : l4Candidates) {
372- outputDataTable (l4Cand.isMatter , l4Cand. recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
389+ outputDataTable (l4Cand.recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
373390 l4Cand.recoPtPr (), l4Cand.recoEtaPr (), l4Cand.recoPhiPr (),
374- l4Cand.he3DCAXY , l4Cand.he3DCAZ , l4Cand.protonDCAXY , l4Cand.protonDCAZ ,
375- l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.nTPCClustersHe3 , l4Cand.nSigmaHe3 ,
376- l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr , l4Cand.sharedClustersHe3 ,
377- l4Cand.sharedClustersPr , l4Cand.isBkgUS , l4Cand.isBkgEM );
391+ l4Cand.DCAxyHe3 , l4Cand.DCAzHe3 , l4Cand.DCAxyPr , l4Cand.DCAzPr ,
392+ l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.tpcSignalPr , l4Cand.momPrTPC ,
393+ l4Cand.nTPCClustersHe3 ,
394+ l4Cand.nSigmaHe3 , l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr ,
395+ l4Cand.PIDtrkHe3 , l4Cand.PIDtrkPr , l4Cand.itsClSizeHe3 , l4Cand.itsClSizePr ,
396+ l4Cand.sharedClustersHe3 , l4Cand.sharedClustersPr ,
397+ l4Cand.isBkgUS , l4Cand.isBkgEM );
378398 }
379399 }
380400 PROCESS_SWITCH (lithium4analysis, processSameEvent, " Process Same event" , false );
@@ -444,12 +464,15 @@ struct lithium4analysis {
444464 }
445465
446466 for (auto & l4Cand : l4Candidates) {
447- outputDataTable (l4Cand.isMatter , l4Cand. recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
467+ outputDataTable (l4Cand.recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
448468 l4Cand.recoPtPr (), l4Cand.recoEtaPr (), l4Cand.recoPhiPr (),
449- l4Cand.he3DCAXY , l4Cand.he3DCAZ , l4Cand.protonDCAXY , l4Cand.protonDCAZ ,
450- l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.nTPCClustersHe3 , l4Cand.nSigmaHe3 ,
451- l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr , l4Cand.sharedClustersHe3 ,
452- l4Cand.sharedClustersPr , l4Cand.isBkgUS , l4Cand.isBkgEM );
469+ l4Cand.DCAxyHe3 , l4Cand.DCAzHe3 , l4Cand.DCAxyPr , l4Cand.DCAzPr ,
470+ l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.tpcSignalPr , l4Cand.momPrTPC ,
471+ l4Cand.nTPCClustersHe3 ,
472+ l4Cand.nSigmaHe3 , l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr ,
473+ l4Cand.PIDtrkHe3 , l4Cand.PIDtrkPr , l4Cand.itsClSizeHe3 , l4Cand.itsClSizePr ,
474+ l4Cand.sharedClustersHe3 , l4Cand.sharedClustersPr ,
475+ l4Cand.isBkgUS , l4Cand.isBkgEM );
453476 }
454477 }
455478 PROCESS_SWITCH (lithium4analysis, processMixedEvent, " Process Mixed event" , false );
@@ -550,7 +573,10 @@ struct lithium4analysis {
550573 beta = std::min (1 .f - 1 .e -6f , std::max (1 .e -4f , beta)); // / sometimes beta > 1 or < 0, to be checked
551574 cand.massTOFPr = track2.tpcInnerParam () * std::sqrt (1 .f / (beta * beta) - 1 .f );
552575 }
553- cand.l4PtMC = mothertrack.pt ();
576+
577+ cand.momHe3MC = mctrackHe3.pt () * (mctrackHe3.pdgCode () > 0 ? 1 : -1 );
578+ cand.momPrMC = mctrackPr.pt () * (mctrackPr.pdgCode () > 0 ? 1 : -1 );
579+ cand.l4PtMC = mothertrack.pt () * (mothertrack.pdgCode () > 0 ? 1 : -1 );
554580 double eLit = mctrackHe3.e () + mctrackPr.e ();
555581 cand.l4MassMC = std::sqrt (eLit * eLit - mothertrack.p () * mothertrack.p ());
556582 filledMothers.push_back (mothertrack.globalIndex ());
@@ -579,31 +605,43 @@ struct lithium4analysis {
579605 auto daughtHe3 = false ;
580606 auto daughtPr = false ;
581607 double eLit = 0 ;
608+ int signHe3 = 0 , signPr = 0 ;
609+ double ptHe3 = 0 , ptPr = 0 ;
582610 for (auto kCurrentDaughter : kDaughters ) {
583611 if (std::abs (kCurrentDaughter .pdgCode ()) == he3PDG) {
584612 daughtHe3 = true ;
613+ signHe3 = kCurrentDaughter .pdgCode () > 0 ? 1 : -1 ;
614+ ptHe3 = kCurrentDaughter .pt ();
585615 eLit += kCurrentDaughter .e ();
586616 } else if (std::abs (kCurrentDaughter .pdgCode ()) == protonPDG) {
587617 daughtPr = true ;
618+ signPr = kCurrentDaughter .pdgCode () > 0 ? 1 : -1 ;
619+ ptPr = kCurrentDaughter .pt ();
588620 eLit += kCurrentDaughter .e ();
589621 }
590622 }
591623 if (daughtHe3 && daughtPr) {
592624 lithium4Candidate l4Candidate;
593- int sign = mcParticle.pdgCode () > 0 ? 1 : -1 ;
594- l4Candidate.l4PtMC = mcParticle.pt () * sign;
625+ int signLi = mcParticle.pdgCode () > 0 ? 1 : -1 ;
626+ l4Candidate.l4PtMC = mcParticle.pt () * signLi;
627+ l4Candidate.momHe3MC = ptHe3 * signHe3;
628+ l4Candidate.momPrMC = ptPr * signPr;
595629 l4Candidate.l4MassMC = std::sqrt (eLit * eLit - mcParticle.p () * mcParticle.p ());
596630 l4Candidates.push_back (l4Candidate);
597631 }
598632 }
599633
600634 for (auto & l4Cand : l4Candidates) {
601- outputMCTable (l4Cand.isMatter , l4Cand. recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
635+ outputMCTable (l4Cand.recoPtHe3 (), l4Cand.recoEtaHe3 (), l4Cand.recoPhiHe3 (),
602636 l4Cand.recoPtPr (), l4Cand.recoEtaPr (), l4Cand.recoPhiPr (),
603- l4Cand.he3DCAXY , l4Cand.he3DCAZ , l4Cand.protonDCAXY , l4Cand.protonDCAZ ,
604- l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.nTPCClustersHe3 , l4Cand.nSigmaHe3 ,
605- l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr , l4Cand.sharedClustersHe3 ,
606- l4Cand.sharedClustersPr , l4Cand.isBkgUS , l4Cand.isBkgEM ,
637+ l4Cand.DCAxyHe3 , l4Cand.DCAzHe3 , l4Cand.DCAxyPr , l4Cand.DCAzPr ,
638+ l4Cand.tpcSignalHe3 , l4Cand.momHe3TPC , l4Cand.tpcSignalPr , l4Cand.momPrTPC ,
639+ l4Cand.nTPCClustersHe3 ,
640+ l4Cand.nSigmaHe3 , l4Cand.nSigmaPr , l4Cand.massTOFHe3 , l4Cand.massTOFPr ,
641+ l4Cand.PIDtrkHe3 , l4Cand.PIDtrkPr , l4Cand.itsClSizeHe3 , l4Cand.itsClSizePr ,
642+ l4Cand.sharedClustersHe3 , l4Cand.sharedClustersPr ,
643+ l4Cand.isBkgUS , l4Cand.isBkgEM ,
644+ l4Cand.momHe3MC , l4Cand.momPrMC ,
607645 l4Cand.l4PtMC , l4Cand.l4MassMC );
608646 }
609647 }
0 commit comments