@@ -95,14 +95,21 @@ struct lambdaspincorrelation {
9595 Configurable<double > cMaxV0DCA{" cMaxV0DCA" , 1.2 , " Maximum V0 DCA to PV" };
9696 Configurable<float > cMinV0DCAPr{" cMinV0DCAPr" , 0.05 , " Minimum V0 daughters DCA to PV for Pr" };
9797 Configurable<float > cMinV0DCAPi{" cMinV0DCAPi" , 0.05 , " Minimum V0 daughters DCA to PV for Pi" };
98- Configurable<float > cMaxV0LifeTime{" cMaxV0LifeTime" , 50 , " Maximum V0 life time" };
9998
10099 // config for V0 daughters
101100 Configurable<float > confDaughEta{" confDaughEta" , 0 .8f , " V0 Daugh sel: max eta" };
102101 Configurable<float > cfgDaughPrPt{" cfgDaughPrPt" , 0.2 , " minimum daughter proton pt" };
103102 Configurable<float > cfgDaughPiPt{" cfgDaughPiPt" , 0.2 , " minimum daughter pion pt" };
104103 Configurable<float > confDaughTPCnclsMin{" confDaughTPCnclsMin" , 50 .f , " V0 Daugh sel: Min. nCls TPC" };
105- Configurable<float > confDaughPIDCuts{" confDaughPIDCuts" , 3 , " PID selections for Lambda daughters" };
104+
105+ struct : ConfigurableGroup {
106+ std::string prefix = " v0Configuration" ;
107+ Configurable<int > cfgDaughTPCCrossedRows{" cfgDaughTPCCrossedRows" , 70 , " Min. TPC crossed rows for V0 daughters" };
108+ Configurable<float > confK0sMassWindow{" confK0sMassWindow" , 0.01 , " K0s competing mass rejection window (GeV/c2)" };
109+ Configurable<float > cMaxV0LifeTime{" cMaxV0LifeTime" , 30 , " Maximum V0 life time" };
110+ Configurable<float > confDaughPIDCuts{" confDaughPIDCuts" , 4 , " PID selections for Lambda daughters" };
111+
112+ } v0Configurations;
106113
107114 Configurable<int > iMNbins{" iMNbins" , 50 , " Number of bins in invariant mass" };
108115 Configurable<float > lbinIM{" lbinIM" , 1.09 , " lower bin value in IM histograms" };
@@ -149,7 +156,11 @@ struct lambdaspincorrelation {
149156 if (tranRad > confV0TranRadV0Max) {
150157 return false ;
151158 }
152- if (std::abs (ctauLambda) > cMaxV0LifeTime) {
159+ if (std::abs (ctauLambda) > v0Configurations.cMaxV0LifeTime ) {
160+ return false ;
161+ }
162+
163+ if (std::abs (candidate.mK0Short () - o2::constants::physics::MassK0Short) < v0Configurations.confK0sMassWindow ) {
153164 return false ;
154165 }
155166 // if (std::abs(candidate.yLambda()) > confV0Rap) {
@@ -162,10 +173,9 @@ struct lambdaspincorrelation {
162173 bool isSelectedV0Daughter (V0 const & candidate, T const & track, int pid)
163174 {
164175 const auto tpcNClsF = track.tpcNClsFound ();
165- const auto ncr = 70 ;
166176 const auto ncrfc = 0.8 ;
167177
168- if (track.tpcNClsCrossedRows () < ncr ) {
178+ if (track.tpcNClsCrossedRows () < v0Configurations. cfgDaughTPCCrossedRows ) {
169179 return false ;
170180 }
171181 if (tpcNClsF < confDaughTPCnclsMin) {
@@ -175,10 +185,10 @@ struct lambdaspincorrelation {
175185 return false ;
176186 }
177187
178- if (pid == 0 && std::abs (track.tpcNSigmaPr ()) > confDaughPIDCuts) {
188+ if (pid == 0 && std::abs (track.tpcNSigmaPr ()) > v0Configurations. confDaughPIDCuts ) {
179189 return false ;
180190 }
181- if (pid == 1 && std::abs (track.tpcNSigmaPi ()) > confDaughPIDCuts) {
191+ if (pid == 1 && std::abs (track.tpcNSigmaPi ()) > v0Configurations. confDaughPIDCuts ) {
182192 return false ;
183193 }
184194 if (pid == 0 && (candidate.positivept () < cfgDaughPrPt || candidate.negativept () < cfgDaughPiPt)) {
@@ -299,13 +309,6 @@ struct lambdaspincorrelation {
299309 std::vector<int > negativeIndex = {};
300310 std::vector<float > dcaBetweenDaughter = {};
301311 std::vector<float > dcaV0ToPV = {};
302- std::vector<float > tpcPosNClsCrossedRows = {};
303- std::vector<float > tpcNegNClsCrossedRows = {};
304- std::vector<float > ctau = {};
305- std::vector<float > tpcNsigmaPos = {};
306- std::vector<float > tpcNsigmaNeg = {};
307- std::vector<float > mK0Short = {};
308-
309312 int numbV0 = 0 ;
310313 // LOGF(info, "event collisions: (%d)", collision.index());
311314 auto centrality = collision.centFT0C ();
@@ -357,26 +360,13 @@ struct lambdaspincorrelation {
357360 if (aLambdaTag) {
358361 histos.fill (HIST (" hV0Info" ), 3.5 );
359362 }
360-
361- float ctauLambda = v0.distovertotmom (collision.posX (), collision.posY (), collision.posZ ()) * (o2::constants::physics::MassLambda);
362-
363363 // LOGF(info, "v0 index2: (%d)", v0.index());
364364 auto postrack1 = v0.template posTrack_as <AllTrackCandidates>();
365365 auto negtrack1 = v0.template negTrack_as <AllTrackCandidates>();
366366 positiveIndex.push_back (postrack1.globalIndex ());
367367 negativeIndex.push_back (negtrack1.globalIndex ());
368368 v0Cospa.push_back (v0.v0cosPA ());
369369 dcaV0ToPV.push_back (std::abs (v0.dcav0topv ()));
370-
371- tpcPosNClsCrossedRows.push_back (postrack1.tpcNClsCrossedRows ());
372- tpcNegNClsCrossedRows.push_back (negtrack1.tpcNClsCrossedRows ());
373- ctau.push_back (ctauLambda);
374-
375- tpcNsigmaPos.push_back (std::abs (postrack1.tpcNSigmaPr ()));
376- tpcNsigmaNeg.push_back (std::abs (negtrack1.tpcNSigmaPi ()));
377-
378- mK0Short .push_back (v0.mK0Short ());
379-
380370 v0Radius.push_back (v0.v0radius ());
381371 dcaPositive.push_back (std::abs (v0.dcapostopv ()));
382372 dcaNegative.push_back (std::abs (v0.dcanegtopv ()));
@@ -413,7 +403,7 @@ struct lambdaspincorrelation {
413403 lambdaDummy = lambdaMother.at (i5);
414404 protonDummy = protonDaughter.at (i5);
415405 pionDummy = pionDaughter.at (i5);
416- lambdaPair (indexEvent, v0Status.at (i5), doubleStatus.at (i5), v0Cospa.at (i5), v0Radius.at (i5), dcaPositive.at (i5), dcaNegative.at (i5), dcaBetweenDaughter.at (i5), lambdaDummy.Pt (), lambdaDummy.Eta (), lambdaDummy.Phi (), lambdaDummy.M (), protonDummy.Pt (), protonDummy.Eta (), protonDummy.Phi (), positiveIndex.at (i5), negativeIndex.at (i5), dcaV0ToPV.at (i5), tpcPosNClsCrossedRows. at (i5), tpcNegNClsCrossedRows. at (i5), ctau. at (i5), tpcNsigmaPos. at (i5), tpcNsigmaNeg. at (i5), mK0Short . at (i5) );
406+ lambdaPair (indexEvent, v0Status.at (i5), doubleStatus.at (i5), v0Cospa.at (i5), v0Radius.at (i5), dcaPositive.at (i5), dcaNegative.at (i5), dcaBetweenDaughter.at (i5), lambdaDummy.Pt (), lambdaDummy.Eta (), lambdaDummy.Phi (), lambdaDummy.M (), protonDummy.Pt (), protonDummy.Eta (), protonDummy.Phi (), positiveIndex.at (i5), negativeIndex.at (i5), dcaV0ToPV.at (i5));
417407 }
418408 }
419409 }
0 commit comments