@@ -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+
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,9 +156,10 @@ struct lambdaspincorrelation {
149156 if (tranRad > confV0TranRadV0Max) {
150157 return false ;
151158 }
152- if (std::abs (ctauLambda) > cMaxV0LifeTime) {
159+ if (std::abs (ctauLambda) > v0Configurations. cMaxV0LifeTime ) {
153160 return false ;
154161 }
162+
155163 // if (std::abs(candidate.yLambda()) > confV0Rap) {
156164 // return false;
157165 // }
@@ -162,10 +170,9 @@ struct lambdaspincorrelation {
162170 bool isSelectedV0Daughter (V0 const & candidate, T const & track, int pid)
163171 {
164172 const auto tpcNClsF = track.tpcNClsFound ();
165- const auto ncr = 70 ;
166173 const auto ncrfc = 0.8 ;
167174
168- if (track.tpcNClsCrossedRows () < ncr ) {
175+ if (track.tpcNClsCrossedRows () < v0Configurations. cfgDaughTPCCrossedRows ) {
169176 return false ;
170177 }
171178 if (tpcNClsF < confDaughTPCnclsMin) {
@@ -175,10 +182,10 @@ struct lambdaspincorrelation {
175182 return false ;
176183 }
177184
178- if (pid == 0 && std::abs (track.tpcNSigmaPr ()) > confDaughPIDCuts) {
185+ if (pid == 0 && std::abs (track.tpcNSigmaPr ()) > v0Configurations. confDaughPIDCuts ) {
179186 return false ;
180187 }
181- if (pid == 1 && std::abs (track.tpcNSigmaPi ()) > confDaughPIDCuts) {
188+ if (pid == 1 && std::abs (track.tpcNSigmaPi ()) > v0Configurations. confDaughPIDCuts ) {
182189 return false ;
183190 }
184191 if (pid == 0 && (candidate.positivept () < cfgDaughPrPt || candidate.negativept () < cfgDaughPiPt)) {
@@ -299,13 +306,6 @@ struct lambdaspincorrelation {
299306 std::vector<int > negativeIndex = {};
300307 std::vector<float > dcaBetweenDaughter = {};
301308 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-
309309 int numbV0 = 0 ;
310310 // LOGF(info, "event collisions: (%d)", collision.index());
311311 auto centrality = collision.centFT0C ();
@@ -357,26 +357,13 @@ struct lambdaspincorrelation {
357357 if (aLambdaTag) {
358358 histos.fill (HIST (" hV0Info" ), 3.5 );
359359 }
360-
361- float ctauLambda = v0.distovertotmom (collision.posX (), collision.posY (), collision.posZ ()) * (o2::constants::physics::MassLambda);
362-
363360 // LOGF(info, "v0 index2: (%d)", v0.index());
364361 auto postrack1 = v0.template posTrack_as <AllTrackCandidates>();
365362 auto negtrack1 = v0.template negTrack_as <AllTrackCandidates>();
366363 positiveIndex.push_back (postrack1.globalIndex ());
367364 negativeIndex.push_back (negtrack1.globalIndex ());
368365 v0Cospa.push_back (v0.v0cosPA ());
369366 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-
380367 v0Radius.push_back (v0.v0radius ());
381368 dcaPositive.push_back (std::abs (v0.dcapostopv ()));
382369 dcaNegative.push_back (std::abs (v0.dcanegtopv ()));
@@ -413,7 +400,7 @@ struct lambdaspincorrelation {
413400 lambdaDummy = lambdaMother.at (i5);
414401 protonDummy = protonDaughter.at (i5);
415402 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) );
403+ 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));
417404 }
418405 }
419406 }
0 commit comments