@@ -168,23 +168,26 @@ struct FlowGenericFramework {
168168 O2_DEFINE_CONFIGURABLE (cfgDCAz, float , 2 , " Cut on DCA in the longitudinal direction (cm)" );
169169 O2_DEFINE_CONFIGURABLE (cfgNTPCCls, float , 50 , " Cut on number of TPC clusters found" );
170170 O2_DEFINE_CONFIGURABLE (cfgNTPCXrows, float , 70 , " Cut on number of TPC crossed rows" );
171- O2_DEFINE_CONFIGURABLE (cfgNTPCXrowsDaughters, float , 70 , " Cut on number of TPC crossed rows of V0 daughters" );
172171 O2_DEFINE_CONFIGURABLE (cfgMinNITSCls, float , 5 , " Cut on minimum number of ITS clusters found" );
172+ O2_DEFINE_CONFIGURABLE (cfgNTPCClsDaughters, float , 50 , " Cut on number of TPC clusters found of V0 daughter tracks" );
173+ O2_DEFINE_CONFIGURABLE (cfgNTPCXrowsDaughters, float , 70 , " Cut on number of TPC crossed rows of V0 daughter tracks" );
174+ O2_DEFINE_CONFIGURABLE (cfgMinNITSClsDaughters, float , 5 , " Cut on minimum number of ITS clusters found of V0 daughter tracks" );
173175 O2_DEFINE_CONFIGURABLE (cfgChi2PrITSCls, float , 36 , " Cut on chi^2 per ITS clusters found" );
174176 O2_DEFINE_CONFIGURABLE (cfgChi2PrTPCCls, float , 2.5 , " Cut on chi^2 per TPC clusters found" );
175177 O2_DEFINE_CONFIGURABLE (cfgTPCSectorCut, bool , false , " Cut on pt-phi distribution" );
178+ O2_DEFINE_CONFIGURABLE (cfgIsPVContributor, bool , false , " Select tracks contributing to the PV" );
176179 } cfgTrackCuts;
177180 struct : ConfigurableGroup {
178181 O2_DEFINE_CONFIGURABLE (cfgNoSameBunchPileupCut, bool , true , " NoSameBunchPileupCut" );
179182 O2_DEFINE_CONFIGURABLE (cfgIsGoodZvtxFT0vsPV, bool , true , " IsGoodZvtxFT0vsPV" );
180183 O2_DEFINE_CONFIGURABLE (cfgIsGoodITSLayersAll, bool , true , " IsGoodITSLayersAll" );
181- O2_DEFINE_CONFIGURABLE (cfgNoCollInTimeRangeStandard, bool , true , " NoCollInTimeRangeStandard" );
182- O2_DEFINE_CONFIGURABLE (cfgNoCollInRofStandard, bool , true , " NoCollInRofStandard" );
183- O2_DEFINE_CONFIGURABLE (cfgNoHighMultCollInPrevRof, bool , true , " NoHighMultCollInPrevRof" );
184- O2_DEFINE_CONFIGURABLE (cfgNoITSROFrameBorder, bool , true , " NoITSROFrameBorder" );
185- O2_DEFINE_CONFIGURABLE (cfgNoTimeFrameBorder, bool , true , " NoTimeFrameBorder" );
186- O2_DEFINE_CONFIGURABLE (cfgTVXinTRD, bool , true , " TVXinTRD - Use TVXinTRD (reject TRD triggered events)" );
187- O2_DEFINE_CONFIGURABLE (cfgIsVertexITSTPC, bool , true , " IsVertexITSTPC - Selects collisions with at least one ITS-TPC track" );
184+ O2_DEFINE_CONFIGURABLE (cfgNoCollInTimeRangeStandard, bool , false , " NoCollInTimeRangeStandard" );
185+ O2_DEFINE_CONFIGURABLE (cfgNoCollInRofStandard, bool , false , " NoCollInRofStandard" );
186+ O2_DEFINE_CONFIGURABLE (cfgNoHighMultCollInPrevRof, bool , false , " NoHighMultCollInPrevRof" );
187+ O2_DEFINE_CONFIGURABLE (cfgNoITSROFrameBorder, bool , false , " NoITSROFrameBorder" );
188+ O2_DEFINE_CONFIGURABLE (cfgNoTimeFrameBorder, bool , false , " NoTimeFrameBorder" );
189+ O2_DEFINE_CONFIGURABLE (cfgTVXinTRD, bool , false , " TVXinTRD - Use TVXinTRD (reject TRD triggered events)" );
190+ O2_DEFINE_CONFIGURABLE (cfgIsVertexITSTPC, bool , false , " IsVertexITSTPC - Selects collisions with at least one ITS-TPC track" );
188191 } cfgEventCutFlags;
189192 struct : ConfigurableGroup {
190193 O2_DEFINE_CONFIGURABLE (cfgUseNch, bool , false , " Do correlations as function of Nch" );
@@ -1580,24 +1583,10 @@ struct FlowGenericFramework {
15801583 if (!cfgTrackCuts.cfgDCAzPtDep .value .empty () && std::fabs (track.dcaZ ()) > fPtDepDCAz ->Eval (track.pt ())) {
15811584 return false ;
15821585 }
1583- return ((track.tpcNClsCrossedRows () >= cfgTrackCuts.cfgNTPCXrows ) && (track.tpcNClsFound () >= cfgTrackCuts.cfgNTPCCls ) && (track.itsNCls () >= cfgTrackCuts.cfgMinNITSCls ));
1584- }
1585-
1586- template <typename TTrack>
1587- bool nchSelected (const TTrack& track)
1588- {
1589- // Renormalise to default cut
1590- const float defaultNsigma = 7 ;
1591- if (cfgTrackCuts.cfgDCAxyNSigma && (std::fabs (track.dcaXY ()) > defaultNsigma / cfgTrackCuts.cfgDCAxyNSigma * fPtDepDCAxy ->Eval (track.pt ()))) {
1586+ if (cfgTrackCuts.cfgIsPVContributor && !track.isPVContributor ()) {
15921587 return false ;
15931588 }
1594- if (!cfgTrackCuts.cfgDCAzPtDep .value .empty () && std::fabs (track.dcaZ ()) > fPtDepDCAz ->Eval (track.pt ())) {
1595- return false ;
1596- }
1597- int tpcNClsCrossedRowsDefault = 70 ;
1598- int tpcNClsFoundDefault = 50 ;
1599- int itsNclsDefault = 5 ;
1600- return ((track.tpcNClsCrossedRows () >= tpcNClsCrossedRowsDefault) && (track.tpcNClsFound () >= tpcNClsFoundDefault) && (track.itsNCls () >= itsNclsDefault));
1589+ return ((track.tpcNClsCrossedRows () >= cfgTrackCuts.cfgNTPCXrows ) && (track.tpcNClsFound () >= cfgTrackCuts.cfgNTPCCls ) && (track.itsNCls () >= cfgTrackCuts.cfgMinNITSCls ));
16011590 }
16021591
16031592 template <typename TTrack>
@@ -2320,8 +2309,7 @@ struct FlowGenericFramework {
23202309 if (mcParticle.eta () < gfwMemberCache.etalow || mcParticle.eta () > gfwMemberCache.etaup || mcParticle.pt () < gfwMemberCache.ptlow || mcParticle.pt () > gfwMemberCache.ptup ) {
23212310 return ;
23222311 }
2323- // Select tracks with nominal cuts always
2324- if (!nchSelected (track)) {
2312+ if (!trackSelected (track, field)) {
23252313 return ;
23262314 }
23272315 double weffCh = getEfficiency (track, centrality, 0 );
@@ -2331,11 +2319,6 @@ struct FlowGenericFramework {
23312319 }
23322320 ++acceptedTracks.totaluncorr ;
23332321 }
2334-
2335- if (!trackSelected (track, field)) {
2336- return ;
2337- }
2338-
23392322 int pidIndex = 0 ;
23402323 if (std::abs (mcParticle.pdgCode ()) == kPiPlus ) {
23412324 pidIndex = PionID;
@@ -2406,20 +2389,19 @@ struct FlowGenericFramework {
24062389 if (cfgFill.cfgFillQA ) {
24072390 fillTrackQA<Reco, Before>(track, vtxz);
24082391 }
2409- // Select tracks with nominal cuts always
2410- if (!nchSelected (track)) {
2392+
2393+ if (!trackSelected (track, field )) {
24112394 return ;
24122395 }
2396+
24132397 double weffCh = getEfficiency (track, centrality, 0 );
24142398 if (track.eta () > cfgKinematics.cfgEtaNch ->first && track.eta () < cfgKinematics.cfgEtaNch ->second ) {
24152399 if (weffCh > 0 ) {
24162400 acceptedTracks.total += (cfgEventSelection.cfgUseNchCorrection ) ? weffCh : 1.0 ;
24172401 }
24182402 ++acceptedTracks.totaluncorr ;
24192403 }
2420- if (!trackSelected (track, field)) {
2421- return ;
2422- }
2404+
24232405 // int pidIndex = 0;
24242406 // if (cfgFill.cfgUsePID) Need PID for v02
24252407 int pidIndex = getNsigmaPID (track);
@@ -2541,7 +2523,7 @@ struct FlowGenericFramework {
25412523 }
25422524
25432525 bool isK0 = (v0.pdgCode () == PDG_t::kK0Short );
2544- bool isLambda = (v0.pdgCode () == PDG_t::kLambda0 );
2526+ bool isLambda = (std::abs ( v0.pdgCode () ) == PDG_t::kLambda0 );
25452527
25462528 if (!isK0 && !isLambda) {
25472529 return ;
@@ -2591,12 +2573,10 @@ struct FlowGenericFramework {
25912573 bool isAL = false ;
25922574 };
25932575
2576+ // V0 daughter track selection has no DCA cuts
25942577 template <typename TTrack>
25952578 bool selectionV0Daughter (const TTrack& track, int pid)
25962579 {
2597- if (track.tpcNClsCrossedRows () < cfgTrackCuts.cfgNTPCXrowsDaughters ) {
2598- return false ;
2599- }
26002580 // Only accept daughters consistent with the expected identities of K0 or Lambda decay.
26012581 if (cfgPIDCuts.cfgDaughterPIDRejection ) {
26022582 if (cfgPIDCuts.cfgUseOnlyTPC ) {
@@ -2617,7 +2597,7 @@ struct FlowGenericFramework {
26172597 return false ;
26182598 }
26192599 }
2620- return true ;
2600+ return ((track. tpcNClsCrossedRows () >= cfgTrackCuts. cfgNTPCXrowsDaughters ) && (track. tpcNClsFound () >= cfgTrackCuts. cfgNTPCClsDaughters ) && (track. itsNCls () >= cfgTrackCuts. cfgMinNITSClsDaughters )) ;
26212601 }
26222602
26232603 template <typename TTrack>
0 commit comments