@@ -299,6 +299,8 @@ struct OnTheFlyTracker {
299299 int nSiliconHits = 0 ; // /< number of silicon hits
300300 int nTPCHits = 0 ; // /< number of TPC hits
301301 TrackType trackType = TrackType::kNone ;
302+ float trackIU = -1 .f; // /< radius of the innermost hit (-1 if not available)
303+ float trackOU = -1 .f; // /< radius of the outermost hit (-1 if not available)
302304 };
303305
304306 // Helper struct to pass cascade information
@@ -1828,7 +1830,7 @@ struct OnTheFlyTracker {
18281830 tableTrackSelection (static_cast <uint8_t >(0 ), false , false , false , false , false , false );
18291831 tableTrackSelectionExtension (false , false , false , false , false , false , false , false , false , false , false , false , false , false , false , false , false );
18301832 }
1831- tableTracksAlice3 (true );
1833+ tableTracksAlice3 (true , trackParCov. trackIU , trackParCov. trackOU );
18321834 }
18331835 }
18341836
@@ -1949,12 +1951,14 @@ struct OnTheFlyTracker {
19491951
19501952 bool reconstructed = true ;
19511953 int nTrkHits = 0 ;
1954+ std::array<float , 2 > hitRadii = {-1 .f , -1 .f }; // {innermost, outermost}
19521955 if (enablePrimarySmearing) {
19531956 if (fastPrimaryTrackerSettings.fastTrackPrimaries && longLivedToBeHandled) {
19541957 o2::track::TrackParCov perfectTrackParCov = o2::upgrade::convertMCParticleToO2Track (mcParticle, pdgDB);
19551958 perfectTrackParCov.setPID (pdgCodeToPID (mcParticle.pdgCode ()));
19561959 computeBremsstrahlungLoss (mcParticle, perfectTrackParCov);
19571960 nTrkHits = fastTracker[icfg]->fastTrack (perfectTrackParCov, trackParCov, dNdEta);
1961+ hitRadii = {fastTracker[icfg]->getTrackIU (), fastTracker[icfg]->getTrackOU ()};
19581962 if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits ) {
19591963 reconstructed = false ;
19601964 }
@@ -1965,6 +1969,7 @@ struct OnTheFlyTracker {
19651969 const std::array<float , 3 > decayVtx = decayer.generateDecayVertex (mcParticle, pdgDB);
19661970 const float decayRadius2D = std::hypot (decayVtx[0 ], decayVtx[1 ]);
19671971 nTrkHits = fastTracker[icfg]->fastTrack (perfectTrackParCov, trackParCov, dNdEta, decayRadius2D);
1972+ hitRadii = {fastTracker[icfg]->getTrackIU (), fastTracker[icfg]->getTrackOU ()};
19681973 if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits ) {
19691974 reconstructed = false ;
19701975 }
@@ -2033,8 +2038,12 @@ struct OnTheFlyTracker {
20332038 bool isPVContributor = trackType == TrackType::kRecoPrimary ;
20342039 if (reconstructed) {
20352040 recoPrimaries.push_back (TrackAlice3{trackParCov, mcParticle.globalIndex (), trackTime, TimeResolutionUs, isDecayDaughter, isPVContributor, false , 0 , nTrkHits, trackType});
2041+ recoPrimaries.back ().trackIU = hitRadii[0 ];
2042+ recoPrimaries.back ().trackOU = hitRadii[1 ];
20362043 } else {
20372044 ghostPrimaries.push_back (TrackAlice3{trackParCov, mcParticle.globalIndex (), trackTime, TimeResolutionUs, isDecayDaughter, isPVContributor, false , 0 , nTrkHits, trackType});
2045+ ghostPrimaries.back ().trackIU = hitRadii[0 ];
2046+ ghostPrimaries.back ().trackOU = hitRadii[1 ];
20382047 }
20392048 }
20402049
@@ -2176,6 +2185,7 @@ struct OnTheFlyTracker {
21762185
21772186 bool reconstructed = false ;
21782187 int nTrkHits = 0 ;
2188+ std::array<float , 2 > hitRadii = {-1 .f , -1 .f }; // {innermost, outermost}
21792189 const bool isSecondary = !otfParticle.isPrimary () && otfParticle.checkBit (o2::upgrade::DecayerBits::ProducedByDecayer) && otfParticle.isAlive ();
21802190 if (enablePrimarySmearing && longLivedToBeHandled && otfParticle.isPrimary ()) {
21812191 o2::upgrade::convertMCParticleToO2Track (mcParticle, trackParCov, pdgDB);
@@ -2186,6 +2196,7 @@ struct OnTheFlyTracker {
21862196 perfectTrackParCov.setPID (pdgCodeToPID (mcParticle.pdgCode ()));
21872197 computeBremsstrahlungLoss (mcParticle, perfectTrackParCov);
21882198 nTrkHits = fastTracker[icfg]->fastTrack (perfectTrackParCov, trackParCov, dNdEta, mcParticle.decayRadius ());
2199+ hitRadii = {fastTracker[icfg]->getTrackIU (), fastTracker[icfg]->getTrackOU ()};
21892200 getHist<TH2 >(histPath + " h2dGenShortLivedParticleRadius" )->Fill (mcParticle.decayRadius (), perfectTrackParCov.getPt ());
21902201 getHist<TH2 >(histPath + " h2dGenRadiusIniVsDecay" )->Fill (std::hypot (perfectTrackParCov.getX (), perfectTrackParCov.getY ()), mcParticle.decayRadius ());
21912202 if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits ) {
@@ -2203,6 +2214,7 @@ struct OnTheFlyTracker {
22032214 computeBremsstrahlungLoss (mcParticle, perfectTrackParCov);
22042215 perfectTrackParCov.setPID (pdgCodeToPID (mcParticle.pdgCode ()));
22052216 nTrkHits = fastTracker[icfg]->fastTrack (perfectTrackParCov, trackParCov, dNdEta);
2217+ hitRadii = {fastTracker[icfg]->getTrackIU (), fastTracker[icfg]->getTrackOU ()};
22062218 reconstructed = nTrkHits >= fastTrackerSettings.minSiliconHits ;
22072219 }
22082220
@@ -2260,9 +2272,13 @@ struct OnTheFlyTracker {
22602272
22612273 if (reconstructed) {
22622274 tracksAlice3.push_back (TrackAlice3{trackParCov, mcParticle.globalIndex (), time, TimeResolutionUs, isSecondary, true , false , 0 , nTrkHits, kRecoPrimary });
2275+ tracksAlice3.back ().trackIU = hitRadii[0 ];
2276+ tracksAlice3.back ().trackOU = hitRadii[1 ];
22632277 getHist<TH1 >(histPath + " hPtReconstructedPr" )->Fill (trackParCov.getPt ());
22642278 } else {
22652279 ghostTracksAlice3.push_back (TrackAlice3{trackParCov, mcParticle.globalIndex (), time, TimeResolutionUs, isSecondary, false , false , false , 0 , nTrkHits, kGhostPrimary });
2280+ ghostTracksAlice3.back ().trackIU = hitRadii[0 ];
2281+ ghostTracksAlice3.back ().trackOU = hitRadii[1 ];
22662282 }
22672283 }
22682284
0 commit comments