@@ -91,7 +91,7 @@ struct hyperCandidate {
9191 float genPhi () const { return std::atan2 (gMom [1 ], gMom [0 ]); }
9292 float genEta () const { return std::asinh (gMom [2 ] / genPt ()); }
9393
94- int v0ID;
94+ int v0ID = - 1 ;
9595 int heTrackID;
9696 int piTrackID;
9797 float dcaV0dau = -10 ;
@@ -121,7 +121,7 @@ struct hyperCandidate {
121121 uint32_t clusterSizeITSPi = 0u ;
122122
123123 // collision information
124- unsigned int collisionID = 0 ;
124+ int64_t collisionID = 0 ;
125125
126126 bool isMatter = false ;
127127 bool isSignal = false ; // true MC signal
@@ -137,6 +137,7 @@ struct hyperRecoTask {
137137 Produces<aod::DataHypCands> outputDataTable;
138138 Produces<aod::DataHypCandsFlow> outputDataTableWithFlow;
139139 Produces<aod::MCHypCands> outputMCTable;
140+ Produces<aod::DataHypCandsWColl> outputDataTableWithCollID;
140141 Service<o2::ccdb::BasicCCDBManager> ccdb;
141142 Zorro zorro;
142143 OutputObj<ZorroSummary> zorroSummary{" zorroSummary" };
@@ -409,10 +410,10 @@ struct hyperRecoTask {
409410 hypCand.nSigmaHe3 = computeNSigmaHe3 (heTrack);
410411 hypCand.nTPCClustersHe3 = heTrack.tpcNClsFound ();
411412 hypCand.tpcSignalHe3 = heTrack.tpcSignal ();
412- hypCand.nTPCpidClusHe3 = ( int16_t ) heTrack.tpcNClsFindable () - heTrack.tpcNClsFindableMinusPID ();
413+ hypCand.nTPCpidClusHe3 = static_cast < int16_t >( heTrack.tpcNClsFindable () ) - heTrack.tpcNClsFindableMinusPID ();
413414 hypCand.clusterSizeITSHe3 = heTrack.itsClusterSizes ();
414415 hypCand.nTPCClustersPi = piTrack.tpcNClsFound ();
415- hypCand.nTPCpidClusPi = ( int16_t ) piTrack.tpcNClsFindable () - piTrack.tpcNClsFindableMinusPID ();
416+ hypCand.nTPCpidClusPi = static_cast < int16_t >( piTrack.tpcNClsFindable () ) - piTrack.tpcNClsFindableMinusPID ();
416417 hypCand.tpcSignalPi = piTrack.tpcSignal ();
417418 hypCand.tpcChi2He3 = heTrack.tpcChi2NCl ();
418419 hypCand.itsChi2He3 = heTrack.itsChi2NCl ();
@@ -733,6 +734,34 @@ struct hyperRecoTask {
733734 }
734735 PROCESS_SWITCH (hyperRecoTask, processDataWithFlow, " Data analysis with flow" , false );
735736
737+ void processDataWithCollID (CollisionsFull const & collisions, aod::V0s const & V0s, TracksFull const & tracks, aod::AmbiguousTracks const & ambiTracks, aod::BCsWithTimestamps const & bcs)
738+ {
739+ goodCollision.clear ();
740+ goodCollision.resize (collisions.size (), false );
741+ hyperCandidates.clear ();
742+
743+ selectGoodCollisions (collisions);
744+ useCustomVertexer ? fillCustomV0s (collisions, tracks, ambiTracks, bcs) : fillV0s (collisions, tracks, V0s);
745+
746+ for (auto & hypCand : hyperCandidates) {
747+ auto collision = collisions.rawIteratorAt (hypCand.collisionID );
748+ float trackedHypClSize = !trackedClSize.empty () ? trackedClSize[hypCand.v0ID ] : 0 ;
749+ outputDataTableWithCollID (hypCand.collisionID , collision.centFT0A (), collision.centFT0C (), collision.centFT0M (),
750+ collision.posX (), collision.posY (), collision.posZ (),
751+ hypCand.isMatter ,
752+ hypCand.recoPtHe3 (), hypCand.recoPhiHe3 (), hypCand.recoEtaHe3 (),
753+ hypCand.recoPtPi (), hypCand.recoPhiPi (), hypCand.recoEtaPi (),
754+ hypCand.decVtx [0 ], hypCand.decVtx [1 ], hypCand.decVtx [2 ],
755+ hypCand.dcaV0dau , hypCand.he3DCAXY , hypCand.piDCAXY ,
756+ hypCand.nSigmaHe3 , hypCand.nTPCClustersHe3 , hypCand.nTPCClustersPi ,
757+ hypCand.nTPCpidClusHe3 , hypCand.nTPCpidClusPi ,
758+ hypCand.momHe3TPC , hypCand.momPiTPC , hypCand.tpcSignalHe3 , hypCand.tpcSignalPi , hypCand.tpcChi2He3 , hypCand.itsChi2He3 , hypCand.itsChi2Pi ,
759+ hypCand.massTOFHe3 ,
760+ hypCand.clusterSizeITSHe3 , hypCand.clusterSizeITSPi , hypCand.flags , trackedHypClSize);
761+ }
762+ }
763+ PROCESS_SWITCH (hyperRecoTask, processDataWithCollID, " Data analysis with collision ID" , false );
764+
736765 void processMC (CollisionsFullMC const & collisions, aod::McCollisions const & mcCollisions, aod::V0s const & V0s, TracksFull const & tracks, aod::AmbiguousTracks const & ambiTracks, aod::BCsWithTimestamps const & bcs, aod::McTrackLabels const & trackLabelsMC, aod::McParticles const & particlesMC)
737766 {
738767 filledMothers.clear ();
0 commit comments