@@ -210,7 +210,7 @@ struct PiNucleiFemto {
210210 BinningType binningPolicy{{axisVertex, axisCentrality}, true };
211211 SliceCache cache;
212212 SameKindPair<CollisionsFull, TrackCandidates, BinningType> mPair {binningPolicy, settingNoMixedEvents, -1 , &cache};
213- // Pair<CollisionsFull, TrackCandidates, o2::aod::DataHypCandsWColl, BinningType> hyperPair{binningPolicy, settingNoMixedEvents, -1, &cache};
213+ // Pair<CollisionsFull, TrackCandidates, o2::aod::DataHypCandsWColl, BinningType> hyperPair{binningPolicy, settingNoMixedEvents, -1, &cache};
214214
215215 std::array<float , 6 > mBBparamsDe ;
216216
@@ -273,12 +273,11 @@ struct PiNucleiFemto {
273273 false ,
274274 true };
275275
276-
277276 int numOfCentBins = 40 ;
278277 int numOfVertexZBins = 30 ;
279278 float Vz_low = -10 .0f ;
280279 float Vz_high = 10 .0f ;
281- float Vz_step = (Vz_high - Vz_low) / numOfVertexZBins;
280+ float Vz_step = (Vz_high - Vz_low) / numOfVertexZBins;
282281
283282 struct EventRef {
284283 int64_t collisionId;
@@ -300,17 +299,21 @@ struct PiNucleiFemto {
300299 isInitialized = true ;
301300 }
302301
303- int where_pool (float vz, float v0Centr) const
302+ int where_pool (float vz, float v0Centr) const
304303 {
305304 float CentBinWidth = 100.0 / numOfCentBins; // = 2.5
306305
307306 int iy = static_cast <int >(std::floor (v0Centr / CentBinWidth));
308- if (iy < 0 ) iy = 0 ;
309- if (iy >= numOfCentBins) iy = numOfCentBins - 1 ;
307+ if (iy < 0 )
308+ iy = 0 ;
309+ if (iy >= numOfCentBins)
310+ iy = numOfCentBins - 1 ;
310311
311312 int ix = static_cast <int >(std::floor ((vz - Vz_low) / Vz_step));
312- if (ix < 0 ) ix = 0 ;
313- if (ix >= numOfVertexZBins) ix = numOfVertexZBins - 1 ;
313+ if (ix < 0 )
314+ ix = 0 ;
315+ if (ix >= numOfVertexZBins)
316+ ix = numOfVertexZBins - 1 ;
314317
315318 int bin = ix + numOfVertexZBins * iy;
316319 return bin;
@@ -557,16 +560,16 @@ struct PiNucleiFemto {
557560
558561 bool selectionPIDHyper (const aod::DataHypCandsWColl::iterator& V0Hyper)
559562 {
560- mQaRegistry .fill (HIST (" hHe3P_preselected" ), V0Hyper.tpcMomHe ());
561- float averClusSizeHe = averageClusterSizeCosl (V0Hyper.itsClusterSizesHe (), V0Hyper.etaHe3 ());
562- if (averClusSizeHe <= 4 ) {
563+ mQaRegistry .fill (HIST (" hHe3P_preselected" ), V0Hyper.tpcMomHe ());
564+ float averClusSizeHe = averageClusterSizeCosl (V0Hyper.itsClusterSizesHe (), V0Hyper.etaHe3 ());
565+ if (averClusSizeHe <= 4 ) {
563566 return false ;
564567 }
565- if (V0Hyper.tpcChi2He () <= 0.5 ) {
568+ if (V0Hyper.tpcChi2He () <= 0.5 ) {
566569 return false ;
567570 }
568- mQaRegistry .fill (HIST (" hHe3P" ), V0Hyper.tpcMomHe ());
569- mQaRegistry .fill (HIST (" hHe3TPCnsigma" ), V0Hyper.nSigmaHe ());
571+ mQaRegistry .fill (HIST (" hHe3P" ), V0Hyper.tpcMomHe ());
572+ mQaRegistry .fill (HIST (" hHe3TPCnsigma" ), V0Hyper.nSigmaHe ());
570573
571574 return true ;
572575 }
@@ -689,22 +692,22 @@ struct PiNucleiFemto {
689692 bool fillCandidateInfoHyper (const aod::DataHypCandsWColl::iterator& V0Hyper, const Ttrack& trackPi, PiNucandidate& piHypercand, bool isMixedEvent)
690693 {
691694 piHypercand.collisionID = V0Hyper.collisionId ();
692- // get hypertriton information
693- // constexpr double mHe3 = o2::constants::physics::MassHelium3;
694- // constexpr double mPi = o2::constants::physics::MassPiPlus;
695- // --- He3
695+ // get hypertriton information
696+ // constexpr double mHe3 = o2::constants::physics::MassHelium3;
697+ // constexpr double mPi = o2::constants::physics::MassPiPlus;
698+ // --- He3
696699 float pxHe3 = V0Hyper.ptHe3 () * std::cos (V0Hyper.phiHe3 ());
697700 float pyHe3 = V0Hyper.ptHe3 () * std::sin (V0Hyper.phiHe3 ());
698701 float pzHe3 = V0Hyper.ptHe3 () * std::sinh (V0Hyper.etaHe3 ());
699- // float pHe3 = V0Hyper.ptHe3() * std::cosh(V0Hyper.etaHe3());
700- // float enHe3 = std::sqrt(pHe3 * pHe3 + mHe3 * mHe3);
701- // --- pi
702+ // float pHe3 = V0Hyper.ptHe3() * std::cosh(V0Hyper.etaHe3());
703+ // float enHe3 = std::sqrt(pHe3 * pHe3 + mHe3 * mHe3);
704+ // --- pi
702705 float pxPi = V0Hyper.ptPi () * std::cos (V0Hyper.phiPi ());
703706 float pyPi = V0Hyper.ptPi () * std::sin (V0Hyper.phiPi ());
704707 float pzPi = V0Hyper.ptPi () * std::sinh (V0Hyper.etaPi ());
705- // float pPi = V0Hyper.ptPi() * std::cosh(V0Hyper.etaPi());
706- // float enPi = std::sqrt(pPi * pPi + mPi * mPi);
707- // --- hypertriton
708+ // float pPi = V0Hyper.ptPi() * std::cosh(V0Hyper.etaPi());
709+ // float enPi = std::sqrt(pPi * pPi + mPi * mPi);
710+ // --- hypertriton
708711 float px = pxHe3 + pxPi;
709712 float py = pyHe3 + pyPi;
710713 float pz = pzHe3 + pzPi;
@@ -722,12 +725,12 @@ struct PiNucleiFemto {
722725 }
723726
724727 piHypercand.signPi = trackPi.sign ();
725- if (V0Hyper.isMatter ()){
728+ if (V0Hyper.isMatter ()) {
726729 piHypercand.signNu = 1 ;
727- }else {
730+ } else {
728731 piHypercand.signNu = -1 ;
729732 }
730-
733+
731734 piHypercand.dcaxyPi = trackPi.dcaXY ();
732735 piHypercand.dcazPi = trackPi.dcaZ ();
733736 piHypercand.tpcSignalPi = trackPi.tpcSignal ();
@@ -804,30 +807,30 @@ struct PiNucleiFemto {
804807 void pairTracksSameEventHyper (const Ttrack& piTracks, const Thypers& V0Hypers)
805808 {
806809 for (const auto & V0Hyper : V0Hypers) {
807- if (!selectionPIDHyper (V0Hyper)) {
810+ if (!selectionPIDHyper (V0Hyper)) {
811+ continue ;
812+ }
813+ for (const auto & piTrack : piTracks) {
814+
815+ mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kNoCuts );
816+
817+ if (!selectTrack (piTrack)) {
808818 continue ;
809819 }
810- for (const auto & piTrack : piTracks) {
811-
812- mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kNoCuts );
813-
814- if (!selectTrack (piTrack)) {
815- continue ;
816- }
817- mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kTrackCuts );
818-
819- if (!selectionPIDPion (piTrack)) {
820- continue ;
821- }
822- mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kPID );
823-
824- SVCand pair;
825- pair.tr0Idx = piTrack.globalIndex ();
826- pair.tr1Idx = V0Hyper.globalIndex ();
827- const int collIdx = V0Hyper.collisionId ();
828- CollBracket collBracket{collIdx, collIdx};
829- pair.collBracket = collBracket;
830- mTrackHypPairs .push_back (pair);
820+ mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kTrackCuts );
821+
822+ if (!selectionPIDPion (piTrack)) {
823+ continue ;
824+ }
825+ mQaRegistry .fill (HIST (" hTrackSel" ), Selections::kPID );
826+
827+ SVCand pair;
828+ pair.tr0Idx = piTrack.globalIndex ();
829+ pair.tr1Idx = V0Hyper.globalIndex ();
830+ const int collIdx = V0Hyper.collisionId ();
831+ CollBracket collBracket{collIdx, collIdx};
832+ pair.collBracket = collBracket;
833+ mTrackHypPairs .push_back (pair);
831834 }
832835 }
833836 }
@@ -1079,7 +1082,7 @@ struct PiNucleiFemto {
10791082
10801083 auto v0hyper = V0Hypers.rawIteratorAt (trackPair.tr1Idx );
10811084 auto piTrack = piTracks.rawIteratorAt (trackPair.tr0Idx );
1082- // auto collBracket = trackPair.collBracket;
1085+ // auto collBracket = trackPair.collBracket;
10831086
10841087 PiNucandidate piNucand;
10851088 if (!fillCandidateInfoHyper (v0hyper, piTrack, piNucand, isMixedEvent)) {
@@ -1138,7 +1141,7 @@ struct PiNucleiFemto {
11381141 {
11391142 mGoodCollisions .clear ();
11401143 mGoodCollisions .resize (collisions.size (), false );
1141- // LOG(info) << "Number of hyperCandidates read = " << V0Hypers.size();
1144+ // LOG(info) << "Number of hyperCandidates read = " << V0Hypers.size();
11421145
11431146 for (const auto & collision : collisions) {
11441147
@@ -1151,7 +1154,7 @@ struct PiNucleiFemto {
11511154 mGoodCollisions [collision.globalIndex ()] = true ;
11521155 const uint64_t collIdx = collision.globalIndex ();
11531156 auto trackTableThisCollision = pitracks.sliceBy (mPerCol , collIdx);
1154- auto hypdTableThisCollision = V0Hypers.sliceBy (hypPerCol, collIdx);
1157+ auto hypdTableThisCollision = V0Hypers.sliceBy (hypPerCol, collIdx);
11551158 trackTableThisCollision.bindExternalIndices (&pitracks);
11561159 hypdTableThisCollision.bindExternalIndices (&V0Hypers);
11571160
@@ -1161,7 +1164,7 @@ struct PiNucleiFemto {
11611164 continue ;
11621165 }
11631166
1164- fillPairsHyper (collisions, pitracks, V0Hypers,/* isMixedEvent*/ false );
1167+ fillPairsHyper (collisions, pitracks, V0Hypers, /* isMixedEvent*/ false );
11651168 }
11661169 }
11671170 PROCESS_SWITCH (PiNucleiFemto, processSameEventHyper, " Process Same event" , false );
@@ -1204,54 +1207,58 @@ struct PiNucleiFemto {
12041207 pairHyperEventMixing(tracks1, V0Hypers2);
12051208 }
12061209
1207- fillPairsHyper(collisions, pitracks, V0Hypers,/*isMixedEvent*/ /* false);
1208- }
1209- PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", false);*/
1210+ fillPairsHyper(collisions, pitracks, V0Hypers,/*isMixedEvent*/
1211+ /* false);
1212+ }
1213+ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", false);*/
12101214
12111215 void processMixedEventHyperPool (const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const & V0Hypers, const TrackCandidates& pitracks)
12121216 {
12131217 LOG (info) << " Processing mixed event for hypertriton" ;
12141218
12151219 mTrackHypPairs .clear ();
12161220 if (!isInitialized) {
1217- initializePools ();
1218- LOG (info) << " Initialized event pool with size = " << All_Event_pool.size ();
1221+ initializePools ();
1222+ LOG (info) << " Initialized event pool with size = " << All_Event_pool.size ();
12191223 }
1220- for (auto const & collision : collisions) {
1221- int poolIndexPi = where_pool (collision.posZ (), collision.centFT0C ());
1222- auto & pool = All_Event_pool[poolIndexPi];
1224+ for (auto const & collision : collisions) {
1225+ int poolIndexPi = where_pool (collision.posZ (), collision.centFT0C ());
1226+ auto & pool = All_Event_pool[poolIndexPi];
12231227
1224- if (poolIndexPi < 0 || poolIndexPi >= All_Event_pool.size ()) {
1225- continue ;
1226- }
1228+ if (poolIndexPi < 0 || poolIndexPi >= All_Event_pool.size ()) {
1229+ continue ;
1230+ }
12271231
1228- for (auto const & storedEvent : pool.events ) {
1229- auto c1 = collisions.iteratorAt (storedEvent.collisionId );
1230- const auto & c2 = collision;
1231- if (!c1.sel8 () || !c2.sel8 ()) continue ;
1232-
1233- std::vector<TrackCandidates::iterator> tracks1;
1234- for (auto const & t : pitracks) {
1235- if (t.collisionId () == c1.globalIndex ()) {
1236- tracks1.push_back (t);
1237- }
1238- }
1239-
1240- std::vector<o2::aod::DataHypCandsWColl::iterator> hypers2;
1241- for (auto const & h : V0Hypers) {
1242- if (h.collisionId () != c2.globalIndex ()) continue ;
1243- int poolIndexHyp = where_pool (h.zPrimVtx (), h.centralityFT0C ());
1244- if (poolIndexHyp != poolIndexPi) continue ;
1245- hypers2.push_back (h);
1246- }
1247- pairHyperEventMixing (tracks1, hypers2);
1232+ for (auto const & storedEvent : pool.events ) {
1233+ auto c1 = collisions.iteratorAt (storedEvent.collisionId );
1234+ const auto & c2 = collision;
1235+ if (!c1.sel8 () || !c2.sel8 ())
1236+ continue ;
1237+
1238+ std::vector<TrackCandidates::iterator> tracks1;
1239+ for (auto const & t : pitracks) {
1240+ if (t.collisionId () == c1.globalIndex ()) {
1241+ tracks1.push_back (t);
12481242 }
1249- fillPairsHyper (collisions, pitracks, V0Hypers, /* isMixedEvent */ true );
1243+ }
12501244
1251- if (static_cast <int >(pool.events .size ()) >= settingNoMixedEvents) {
1252- pool.events .pop_front ();
1245+ std::vector<o2::aod::DataHypCandsWColl::iterator> hypers2;
1246+ for (auto const & h : V0Hypers) {
1247+ if (h.collisionId () != c2.globalIndex ())
1248+ continue ;
1249+ int poolIndexHyp = where_pool (h.zPrimVtx (), h.centralityFT0C ());
1250+ if (poolIndexHyp != poolIndexPi)
1251+ continue ;
1252+ hypers2.push_back (h);
12531253 }
1254- pool.events .push_back ({collision.globalIndex ()});
1254+ pairHyperEventMixing (tracks1, hypers2);
1255+ }
1256+ fillPairsHyper (collisions, pitracks, V0Hypers, /* isMixedEvent*/ true );
1257+
1258+ if (static_cast <int >(pool.events .size ()) >= settingNoMixedEvents) {
1259+ pool.events .pop_front ();
1260+ }
1261+ pool.events .push_back ({collision.globalIndex ()});
12551262 }
12561263 }
12571264 PROCESS_SWITCH (PiNucleiFemto, processMixedEventHyperPool, " Process Mixed event" , false );
0 commit comments