@@ -53,13 +53,18 @@ struct lambda1405analysis {
5353 // Configurable for event selection
5454 Configurable<float > cutzvertex{" cutZVertex" , 10 .0f , " Accepted z-vertex range (cm)" };
5555 Configurable<float > cutEtaDaught{" cutEtaDaughter" , 0 .8f , " Eta cut for daughter tracks" };
56- Configurable<float > cutDCAtoPVSigma{" cutDCAtoPVSigma" , 0 .1f , " DCA to primary vertex for Sigma candidates (cm)" };
56+ Configurable<float > cutDCAtoPVSigma{" cutDCAtoPVSigma" , 0 .1f , " Max DCA to primary vertex for Sigma candidates (cm)" };
57+ Configurable<float > cutDCAtoPVPiFromSigma{" cutDCAtoPVPiFromSigma" , 2 ., " Min DCA to primary vertex for pion from Sigma candidates (cm)" };
58+
5759 Configurable<float > cutSigmaRadius{" cutSigmaRadius" , 20 .f , " Minimum radius for Sigma candidates (cm)" };
5860 Configurable<float > cutSigmaMass{" cutSigmaMass" , 0.1 , " Sigma mass window (MeV/c^2)" };
5961 Configurable<float > cutNITSClusPi{" cutNITSClusPi" , 5 , " Minimum number of ITS clusters for pion candidate" };
6062 Configurable<float > cutNTPCClusPi{" cutNTPCClusPi" , 90 , " Minimum number of TPC clusters for pion candidate" };
6163 Configurable<float > cutNSigmaPi{" cutNSigmaPi" , 3 , " NSigmaTPCPion" };
6264
65+ Preslice<aod::KinkCands> mKinkPerCol = aod::track::collisionId;
66+ Preslice<aod::TracksIU> mPerColTracks = aod::track::collisionId;
67+
6368 void init (InitContext const &)
6469 {
6570 // Axes
@@ -108,7 +113,7 @@ struct lambda1405analysis {
108113 return false ;
109114 }
110115 float sigmaRad = std::hypot (sigmaCand.xDecVtx (), sigmaCand.yDecVtx ());
111- if (sigmaCand.dcaMothPv () > cutDCAtoPVSigma || sigmaRad < cutSigmaRadius) {
116+ if (std::abs ( sigmaCand.dcaMothPv ()) > cutDCAtoPVSigma || std::abs (sigmaCand. dcaDaugPv ()) < cutDCAtoPVPiFromSigma || sigmaRad < cutSigmaRadius) {
112117 return false ;
113118 }
114119 rLambda1405.fill (HIST (" h2PtMassSigmaBeforeCuts" ), sigmaCand.mothSign () * sigmaCand.ptMoth (), sigmaCand.mSigmaMinus ());
@@ -138,13 +143,13 @@ struct lambda1405analysis {
138143 return false ; // No valid pion track found
139144 }
140145
141- void processData (CollisionsFull::iterator const & collision, aod::KinkCands const & KinkCands , TracksFull const & tracks)
146+ void processData (CollisionsFull::iterator const & collision, aod::KinkCands const & kinkCands , TracksFull const & tracks)
142147 {
143148 if (std::abs (collision.posZ ()) > cutzvertex || !collision.sel8 ()) {
144149 return ;
145150 }
146151 rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
147- for (const auto & sigmaCand : KinkCands ) {
152+ for (const auto & sigmaCand : kinkCands ) {
148153 if (selectCandidate (sigmaCand, tracks)) {
149154 rLambda1405.fill (HIST (" h2PtMass" ), lambda1405Cand.sigmaSign * lambda1405Cand.pt , lambda1405Cand.mass );
150155 rLambda1405.fill (HIST (" h2PtMassSigma" ), lambda1405Cand.sigmaSign * lambda1405Cand.sigmaPt , lambda1405Cand.sigmaMass );
@@ -155,15 +160,17 @@ struct lambda1405analysis {
155160 }
156161 PROCESS_SWITCH (lambda1405analysis, processData, " Data processing" , true );
157162
158- void processMC (CollisionsFullMC const & collisions, aod::KinkCands const & KinkCands , aod::McTrackLabels const & trackLabelsMC, aod::McParticles const & particlesMC, TracksFull const & tracks)
163+ void processMC (CollisionsFullMC const & collisions, aod::KinkCands const & kinkCands , aod::McTrackLabels const & trackLabelsMC, aod::McParticles const & particlesMC, TracksFull const & tracks)
159164 {
160165 for (const auto & collision : collisions) {
161166 if (std::abs (collision.posZ ()) > cutzvertex || !collision.sel8 ()) {
162167 continue ;
163168 }
164169 rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
165- for (const auto & sigmaCand : KinkCands) {
166- if (selectCandidate (sigmaCand, tracks)) {
170+ auto sigmaCandsPerCol = kinkCands.sliceBy (mKinkPerCol , collision.globalIndex ());
171+ auto tracksPerCol = tracks.sliceBy (mPerColTracks , collision.globalIndex ());
172+ for (const auto & sigmaCand : sigmaCandsPerCol) {
173+ if (selectCandidate (sigmaCand, tracksPerCol)) {
167174 // Do MC association
168175 auto mcLabPiKink = trackLabelsMC.rawIteratorAt (lambda1405Cand.piFromSigmaID );
169176 auto mcLabSigma = trackLabelsMC.rawIteratorAt (lambda1405Cand.sigmaID );
0 commit comments