@@ -89,10 +89,9 @@ using std::array;
8989// Define convenient aliases for commonly used table joins
9090using SelectedCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
9191using RecCollisionsMc = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::McCollisionLabels>;
92- using GenCollisionsMc = aod::McCollisions;
92+ using GenCollisionsMc = soa::Join< aod::McCollisions, aod::McCentFT0Ms> ;
9393using AntiNucleiTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullHe>;
9494using AntiNucleiTracksMc = soa::Join<AntiNucleiTracks, aod::McTrackLabels>;
95-
9695using LorentzVector = ROOT::Math::PxPyPzEVector;
9796
9897// Lightweight particle container for fast kinematic access
@@ -3630,7 +3629,7 @@ struct AntinucleiInJets {
36303629 }
36313630 PROCESS_SWITCH (AntinucleiInJets, processCoalescence, " process coalescence" , false );
36323631
3633- // process Coalescence and Correlation Analysis
3632+ // process Coalescence and Correlation Analysis
36343633 void processCoalescenceCorr (GenCollisionsMc const & collisions, aod::McParticles const & mcParticles)
36353634 {
36363635 // Deuteron Mass and minimum pt
@@ -3704,41 +3703,41 @@ struct AntinucleiInJets {
37043703 registryMC.fill (HIST (" genEventsCoalescenceCorr" ), 2.5 );
37053704
37063705 // Build deuterons
3707- for (size_t iP = 0 ; iP < protonCandidates.size (); ++iP) {
3708- if (protonCandidates[iP].used )
3709- continue ;
3710-
3711- for (size_t iN = 0 ; iN < neutronCandidates.size (); ++iN) {
3712- if (neutronCandidates[iN].used )
3713- continue ;
3714-
3715- // Physics consistency check
3716- if (protonCandidates[iP].pdgCode * neutronCandidates[iN].pdgCode < 0 )
3717- continue ;
3718-
3719- if (passDeuteronCoalescence (protonCandidates[iP], neutronCandidates[iN], coalescenceMomentum, mRand )) {
3720-
3721- neutronCandidates[iN].used = true ;
3722- protonCandidates[iP].used = true ;
3723-
3724- int sign = (protonCandidates[iP].pdgCode > 0 ) ? +1 : -1 ;
3725- int deuteronPdg = sign * o2::constants::physics::Pdg::kDeuteron ;
3726-
3727- double pxDeut = protonCandidates[iP].px + neutronCandidates[iN].px ;
3728- double pyDeut = protonCandidates[iP].py + neutronCandidates[iN].py ;
3729- double pzDeut = protonCandidates[iP].pz + neutronCandidates[iN].pz ;
3730- double energyDeut = std::sqrt (pxDeut * pxDeut + pyDeut * pyDeut + pzDeut * pzDeut + massDeut * massDeut);
3731- LorentzVector pd (pxDeut, pyDeut, pzDeut, energyDeut);
3732- if (pd.Eta () >= minEta && pd.Eta () <= maxEta && (0.5 * pd.Pt ()) >= MinPtPerNucleon) {
3733- // Store Deuteron
3734- finalDeuterons.push_back ({pxDeut, pyDeut, pzDeut, deuteronPdg, protonCandidates[iP].mcIndex , false });
3706+ for (size_t iP = 0 ; iP < protonCandidates.size (); ++iP) {
3707+ if (protonCandidates[iP].used )
3708+ continue ;
3709+
3710+ for (size_t iN = 0 ; iN < neutronCandidates.size (); ++iN) {
3711+ if (neutronCandidates[iN].used )
3712+ continue ;
3713+
3714+ // Physics consistency check
3715+ if (protonCandidates[iP].pdgCode * neutronCandidates[iN].pdgCode < 0 )
3716+ continue ;
3717+
3718+ if (passDeuteronCoalescence (protonCandidates[iP], neutronCandidates[iN], coalescenceMomentum, mRand )) {
3719+
3720+ neutronCandidates[iN].used = true ;
3721+ protonCandidates[iP].used = true ;
3722+
3723+ int sign = (protonCandidates[iP].pdgCode > 0 ) ? +1 : -1 ;
3724+ int deuteronPdg = sign * o2::constants::physics::Pdg::kDeuteron ;
3725+
3726+ double pxDeut = protonCandidates[iP].px + neutronCandidates[iN].px ;
3727+ double pyDeut = protonCandidates[iP].py + neutronCandidates[iN].py ;
3728+ double pzDeut = protonCandidates[iP].pz + neutronCandidates[iN].pz ;
3729+ double energyDeut = std::sqrt (pxDeut * pxDeut + pyDeut * pyDeut + pzDeut * pzDeut + massDeut * massDeut);
3730+ LorentzVector pd (pxDeut, pyDeut, pzDeut, energyDeut);
3731+ if (pd.Eta () >= minEta && pd.Eta () <= maxEta && (0.5 * pd.Pt ()) >= MinPtPerNucleon) {
3732+ // Store Deuteron
3733+ finalDeuterons.push_back ({pxDeut, pyDeut, pzDeut, deuteronPdg, protonCandidates[iP].mcIndex , false });
3734+ }
3735+
3736+ break ;
3737+ }
37353738 }
3736-
3737- break ;
3738- }
37393739 }
3740- }
3741-
3740+
37423741 // Add unused protons to final vectors
37433742 for (const auto & proton : protonCandidates) {
37443743 if (!proton.used ) {
0 commit comments