@@ -168,6 +168,13 @@ static inline int piIdx(const T& t)
168168{
169169 return t.pionIndexmc ();
170170}
171+
172+ template <typename T>
173+ static inline float dcaV0ToPVMC (const T& t)
174+ {
175+ return t.dcaV0ToPVmc ();
176+ }
177+
171178} // namespace mcacc
172179
173180// Optional fixed-leg correction pointers kept outside the task struct.
@@ -261,22 +268,28 @@ struct lambdaspincorrderived {
261268 Configurable<bool > fillWeightQAHistos{" fillWeightQAHistos" , false , " Fill weighted/final-weighted REP/FIX QA maps" };
262269 Configurable<bool > fillAnalysisSparses{" fillAnalysisSparses" , false , " Fill extra deltaR/deltaRap/deltaPhi Analysis THnSparse objects" };
263270 Configurable<bool > fillAdditionalSparses{" fillAdditionalSparses" , false , " Fill extra rapidity/dphi/pair-mass THnSparse objects" };
264-
265271 Configurable<bool > checkDoubleStatus{" checkDoubleStatus" , 0 , " Check Double status" };
266- Configurable<float > cosPA{" cosPA" , 0.995 , " Cosine Pointing Angle" };
267- Configurable<float > radiusMin{" radiusMin" , 3 , " Minimum V0 radius" };
268- Configurable<float > radiusMax{" radiusMax" , 30 , " Maximum V0 radius" };
269- Configurable<float > dcaProton{" dcaProton" , 0.1 , " DCA Proton" };
270- Configurable<float > dcaPion{" dcaPion" , 0.2 , " DCA Pion" };
271- Configurable<float > dcaDaughters{" dcaDaughters" , 1.0 , " DCA between daughters" };
272+
272273 Configurable<float > ptMin{" ptMin" , 0.5 , " V0 Pt minimum" };
273274 Configurable<float > ptMax{" ptMax" , 3.0 , " V0 Pt maximum" };
274275 Configurable<float > MassMin{" MassMin" , 1.09 , " V0 Mass minimum" };
275276 Configurable<float > MassMax{" MassMax" , 1.14 , " V0 Mass maximum" };
276- Configurable<float > rapidity{" rapidity" , 0.5 , " Rapidity cut on lambda" };
277277 Configurable<float > v0etaMixBuffer{" v0etaMixBuffer" , 0.8 , " Eta cut on mix event buffer" };
278+ Configurable<float > rapidity{" rapidity" , 0.5 , " Rapidity cut on lambda" };
278279 Configurable<float > v0eta{" v0eta" , 0.8 , " Eta cut on lambda" };
279280
281+ struct : ConfigurableGroup {
282+ std::string prefix = " v0Configuration" ;
283+ Configurable<float > cosPA{" cosPA" , 0.995 , " Cosine Pointing Angle" };
284+ Configurable<float > radiusMin{" radiusMin" , 3 , " Minimum V0 radius" };
285+ Configurable<float > radiusMax{" radiusMax" , 30 , " Maximum V0 radius" };
286+ Configurable<float > dcaProton{" dcaProton" , 0.1 , " DCA Proton" };
287+ Configurable<float > dcaPion{" dcaPion" , 0.2 , " DCA Pion" };
288+ Configurable<float > dcaDaughters{" dcaDaughters" , 1.0 , " DCA between daughters" };
289+ Configurable<float > dcaV0ToPV{" dcaV0ToPV" , 1.2 , " DCA V0 to PV cut on lambda" };
290+
291+ } v0Configurations;
292+
280293 // Event Mixing
281294 Configurable<int > cosDef{" cosDef" , 1 , " Defination of cos" };
282295
@@ -573,25 +586,30 @@ struct lambdaspincorrderived {
573586 if (candidate.lambdaMass () < MassMin || candidate.lambdaMass () > MassMax) {
574587 return false ;
575588 }
576- if (candidate.v0Cospa () < cosPA) {
589+ if (candidate.v0Cospa () < v0Configurations. cosPA ) {
577590 return false ;
578591 }
579592 if (checkDoubleStatus && candidate.doubleStatus ()) {
580593 return false ;
581594 }
582- if (candidate.v0Radius () > radiusMax) {
595+ if (candidate.v0Radius () > v0Configurations. radiusMax ) {
583596 return false ;
584597 }
585- if (candidate.v0Radius () < radiusMin) {
598+ if (candidate.v0Radius () < v0Configurations. radiusMin ) {
586599 return false ;
587600 }
588- if (candidate.dcaBetweenDaughter () > dcaDaughters) {
601+ if (candidate.dcaBetweenDaughter () > v0Configurations.dcaDaughters ) {
602+ return false ;
603+ }
604+
605+ if (candidate.dcaV0ToPV () > v0Configurations.dcaV0ToPV ) {
589606 return false ;
590607 }
591- if (candidate.v0Status () == 0 && (std::abs (candidate.dcaPositive ()) < dcaProton || std::abs (candidate.dcaNegative ()) < dcaPion)) {
608+
609+ if (candidate.v0Status () == 0 && (std::abs (candidate.dcaPositive ()) < v0Configurations.dcaProton || std::abs (candidate.dcaNegative ()) < v0Configurations.dcaPion )) {
592610 return false ;
593611 }
594- if (candidate.v0Status () == 1 && (std::abs (candidate.dcaPositive ()) < dcaPion || std::abs (candidate.dcaNegative ()) < dcaProton)) {
612+ if (candidate.v0Status () == 1 && (std::abs (candidate.dcaPositive ()) < v0Configurations. dcaPion || std::abs (candidate.dcaNegative ()) < v0Configurations. dcaProton )) {
595613 return false ;
596614 }
597615 if (candidate.lambdaPt () < ptMin) {
@@ -1836,25 +1854,30 @@ struct lambdaspincorrderived {
18361854 if (mcacc::lamMass (candidate) < MassMin || mcacc::lamMass (candidate) > MassMax) {
18371855 return false ;
18381856 }
1839- if (mcacc::v0CosPA (candidate) < cosPA) {
1857+ if (mcacc::v0CosPA (candidate) < v0Configurations. cosPA ) {
18401858 return false ;
18411859 }
18421860 if (checkDoubleStatus && mcacc::doubleStatus (candidate)) {
18431861 return false ;
18441862 }
1845- if (mcacc::v0Radius (candidate) > radiusMax) {
1863+ if (mcacc::v0Radius (candidate) > v0Configurations. radiusMax ) {
18461864 return false ;
18471865 }
1848- if (mcacc::v0Radius (candidate) < radiusMin) {
1866+ if (mcacc::v0Radius (candidate) < v0Configurations. radiusMin ) {
18491867 return false ;
18501868 }
1851- if (mcacc::dcaDau (candidate) > dcaDaughters) {
1869+ if (mcacc::dcaDau (candidate) > v0Configurations. dcaDaughters ) {
18521870 return false ;
18531871 }
1854- if (mcacc::v0Status (candidate) == 0 && (std::abs (mcacc::dcaPos (candidate)) < dcaProton || std::abs (mcacc::dcaNeg (candidate)) < dcaPion)) {
1872+
1873+ if (mcacc::dcaV0ToPVMC (candidate) > v0Configurations.dcaV0ToPV ) {
1874+ return false ;
1875+ }
1876+
1877+ if (mcacc::v0Status (candidate) == 0 && (std::abs (mcacc::dcaPos (candidate)) < v0Configurations.dcaProton || std::abs (mcacc::dcaNeg (candidate)) < v0Configurations.dcaPion )) {
18551878 return false ;
18561879 }
1857- if (mcacc::v0Status (candidate) == 1 && (std::abs (mcacc::dcaPos (candidate)) < dcaPion || std::abs (mcacc::dcaNeg (candidate)) < dcaProton)) {
1880+ if (mcacc::v0Status (candidate) == 1 && (std::abs (mcacc::dcaPos (candidate)) < v0Configurations. dcaPion || std::abs (mcacc::dcaNeg (candidate)) < v0Configurations. dcaProton )) {
18581881 return false ;
18591882 }
18601883 if (mcacc::lamPt (candidate) < ptMin) {
0 commit comments