@@ -63,6 +63,7 @@ struct ConfCascadeFilters : o2::framework::ConfigurableGroup {
6363};
6464
6565#define CASCADE_DEFAULT_BITS \
66+ o2::framework::Configurable<bool > passThrough{" passThrough" , false , " If true, all Cascades are passed through. Bits for all selections are stored." }; \
6667 o2::framework::Configurable<std::vector<float >> cascadeCpaMin{" cascadeCpaMin" , {0 .95f }, " Minimum cosine of pointing angle" }; \
6768 o2::framework::Configurable<std::vector<float >> cascadeTransRadMin{" cascadeTransRadMin" , {0 .9f }, " Minimum transverse radius (cm)" }; \
6869 o2::framework::Configurable<std::vector<float >> cascadeDcaDauMax{" cascadeDcaDauMax" , {0 .25f }, " Maximum DCA between the daughters at decay vertex (cm)" }; \
@@ -179,19 +180,27 @@ class CascadeSelection : public BaseSelection<float, o2::aod::femtodatatypes::Ca
179180 template <typename T1 , typename T2 >
180181 void configure (o2::framework::HistogramRegistry* registry, T1 const & config, T2 const & filter)
181182 {
183+ // check for pass through mode
184+ mPassThrough = config.passThrough .value ;
185+
186+ // if pass through mode is activated, each cut is neutral (i.e. neither minimal nor optional and we do
187+ // store all bits, so the most permissive bit is not skipped for minimal selections)
188+ const bool isMinimalCut = mPassThrough ? false : true ;
189+ const bool skipMostPermissiveBit = mPassThrough ? false : true ;
190+
182191 if constexpr (modes::isEqual (cascadeType, modes::Cascade::kXi )) {
183192 mXiMassLowerLimit = filter.massXiMin .value ;
184193 mXiMassUpperLimit = filter.massXiMax .value ;
185194 mOmegaMassLowerLimit = filter.rejectMassOmegaMin .value ;
186195 mOmegaMassUpperLimit = filter.rejectMassOmegaMax .value ;
187- this ->addSelection (kBachelorTpcPion , cascadeSelectionNames.at (kBachelorTpcPion ), config.bachelorTpcPion .value , limits::kAbsUpperLimit , true , true , false );
196+ this ->addSelection (kBachelorTpcPion , cascadeSelectionNames.at (kBachelorTpcPion ), config.bachelorTpcPion .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
188197 }
189198 if constexpr (modes::isEqual (cascadeType, modes::Cascade::kOmega )) {
190199 mOmegaMassLowerLimit = filter.massOmegaMin .value ;
191200 mOmegaMassUpperLimit = filter.massOmegaMax .value ;
192201 mXiMassLowerLimit = filter.rejectMassXiMin .value ;
193202 mXiMassUpperLimit = filter.rejectMassXiMax .value ;
194- this ->addSelection (kBachelorTpcKaon , cascadeSelectionNames.at (kBachelorTpcKaon ), config.bachelorTpcKaon .value , limits::kAbsUpperLimit , true , true , false );
203+ this ->addSelection (kBachelorTpcKaon , cascadeSelectionNames.at (kBachelorTpcKaon ), config.bachelorTpcKaon .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
195204 }
196205
197206 mPtMin = filter.ptMin .value ;
@@ -203,19 +212,19 @@ class CascadeSelection : public BaseSelection<float, o2::aod::femtodatatypes::Ca
203212 mLambdaMassMin = filter.massLambdaMin .value ;
204213 mLambdaMassMax = filter.massLambdaMax .value ;
205214
206- this ->addSelection (kPosDauTpc , cascadeSelectionNames.at (kPosDauTpc ), config.posDauTpc .value , limits::kAbsUpperLimit , true , true , false );
207- this ->addSelection (kNegDauTpc , cascadeSelectionNames.at (kNegDauTpc ), config.negDauTpc .value , limits::kAbsUpperLimit , true , true , false );
215+ this ->addSelection (kPosDauTpc , cascadeSelectionNames.at (kPosDauTpc ), config.posDauTpc .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
216+ this ->addSelection (kNegDauTpc , cascadeSelectionNames.at (kNegDauTpc ), config.negDauTpc .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
208217
209- this ->addSelection (kCascadeCpaMin , cascadeSelectionNames.at (kCascadeCpaMin ), config.cascadeCpaMin .value , limits::kLowerLimit , true , true , false );
210- this ->addSelection (kCascadeTransRadMin , cascadeSelectionNames.at (kCascadeTransRadMin ), config.cascadeTransRadMin .value , limits::kLowerLimit , true , true , false );
211- this ->addSelection (kCascadeDcaDaughMax , cascadeSelectionNames.at (kCascadeDcaDaughMax ), config.cascadeDcaDauMax .value , limits::kAbsUpperLimit , true , true , false );
212- this ->addSelection (kLambdaCpaMin , cascadeSelectionNames.at (kLambdaCpaMin ), config.lambdaCpaMin .value , limits::kLowerLimit , true , true , false );
213- this ->addSelection (kLambdaTransRadMin , cascadeSelectionNames.at (kLambdaTransRadMin ), config.lambdaTransRadMin .value , limits::kLowerLimit , true , true , false );
214- this ->addSelection (kLambdaDcaDauMax , cascadeSelectionNames.at (kLambdaDcaDauMax ), config.lambdaDcaDauMax .value , limits::kAbsUpperLimit , true , true , false );
215- this ->addSelection (kLambdaDcaToPvMin , cascadeSelectionNames.at (kLambdaDcaToPvMin ), config.lambdaDcaToPvMin .value , limits::kLowerLimit , true , true , false );
216- this ->addSelection (kDauAbsEtaMax , cascadeSelectionNames.at (kDauAbsEtaMax ), config.dauAbsEtaMax .value , limits::kAbsUpperLimit , true , true , false );
217- this ->addSelection (kDauDcaMin , cascadeSelectionNames.at (kDauDcaMin ), config.dauDcaMin .value , limits::kAbsLowerLimit , true , true , false );
218- this ->addSelection (kDauTpcClsMin , cascadeSelectionNames.at (kDauTpcClsMin ), config.dauTpcClustersMin .value , limits::kLowerLimit , true , true , false );
218+ this ->addSelection (kCascadeCpaMin , cascadeSelectionNames.at (kCascadeCpaMin ), config.cascadeCpaMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
219+ this ->addSelection (kCascadeTransRadMin , cascadeSelectionNames.at (kCascadeTransRadMin ), config.cascadeTransRadMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
220+ this ->addSelection (kCascadeDcaDaughMax , cascadeSelectionNames.at (kCascadeDcaDaughMax ), config.cascadeDcaDauMax .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
221+ this ->addSelection (kLambdaCpaMin , cascadeSelectionNames.at (kLambdaCpaMin ), config.lambdaCpaMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
222+ this ->addSelection (kLambdaTransRadMin , cascadeSelectionNames.at (kLambdaTransRadMin ), config.lambdaTransRadMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
223+ this ->addSelection (kLambdaDcaDauMax , cascadeSelectionNames.at (kLambdaDcaDauMax ), config.lambdaDcaDauMax .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
224+ this ->addSelection (kLambdaDcaToPvMin , cascadeSelectionNames.at (kLambdaDcaToPvMin ), config.lambdaDcaToPvMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
225+ this ->addSelection (kDauAbsEtaMax , cascadeSelectionNames.at (kDauAbsEtaMax ), config.dauAbsEtaMax .value , limits::kAbsUpperLimit , skipMostPermissiveBit, isMinimalCut , false );
226+ this ->addSelection (kDauDcaMin , cascadeSelectionNames.at (kDauDcaMin ), config.dauDcaMin .value , limits::kAbsLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
227+ this ->addSelection (kDauTpcClsMin , cascadeSelectionNames.at (kDauTpcClsMin ), config.dauTpcClustersMin .value , limits::kLowerLimit , skipMostPermissiveBit, isMinimalCut , false );
219228
220229 this ->setupContainers <HistName>(registry);
221230 };
@@ -307,13 +316,17 @@ class CascadeSelection : public BaseSelection<float, o2::aod::femtodatatypes::Ca
307316 return false ; // should never happen
308317 }
309318
319+ bool passThroughAllCascades () const { return mPassThrough ; }
320+
310321 protected:
311322 float mXiMassLowerLimit = 0 .f;
312323 float mXiMassUpperLimit = 999 .f;
313324
314325 float mOmegaMassLowerLimit = 0 .f;
315326 float mOmegaMassUpperLimit = 999 .f;
316327
328+ bool mPassThrough = false ;
329+
317330 // kinematic filters
318331 float mPtMin = 0 .f;
319332 float mPtMax = 6 .f;
@@ -390,11 +403,11 @@ class CascadeBuilder
390403 int64_t posDaughterIndex = 0 ;
391404 int64_t negDaughterIndex = 0 ;
392405 for (const auto & cascade : cascades) {
393- if (!mCascadeSelection .checkFilters (cascade)) {
406+ if (!mCascadeSelection .passThroughAllCascades () && ! mCascadeSelection . checkFilters (cascade)) {
394407 continue ;
395408 }
396409 mCascadeSelection .applySelections (cascade, tracks, col);
397- if (!mCascadeSelection .passesAllRequiredSelections ()) {
410+ if (!mCascadeSelection .passThroughAllCascades () && ! mCascadeSelection . passesAllRequiredSelections ()) {
398411 continue ;
399412 }
400413
@@ -424,11 +437,11 @@ class CascadeBuilder
424437 int64_t posDaughterIndex = 0 ;
425438 int64_t negDaughterIndex = 0 ;
426439 for (const auto & cascade : cascades) {
427- if (!mCascadeSelection .checkFilters (cascade)) {
440+ if (!mCascadeSelection .passThroughAllCascades () && ! mCascadeSelection . checkFilters (cascade)) {
428441 continue ;
429442 }
430443 mCascadeSelection .applySelections (cascade, tracks, col);
431- if (!mCascadeSelection .passesAllRequiredSelections ()) {
444+ if (!mCascadeSelection .passThroughAllCascades () && ! mCascadeSelection . passesAllRequiredSelections ()) {
432445 continue ;
433446 }
434447
@@ -438,19 +451,17 @@ class CascadeBuilder
438451 bachelorIndex = trackBuilder.template getDaughterIndex <system, modes::Track::kCascadeBachelor >(col, collisionProducts, mcCols, bachelor, trackProducts, mcParticles, mcBuilder, mcProducts);
439452
440453 auto posDaughter = cascade.template posTrack_as <T8 >();
441- posDaughterIndex = trackBuilder.template getDaughterIndex <system, modes::Track::kCascadeBachelor >(col, collisionProducts, mcCols, posDaughter, trackProducts, mcParticles, mcBuilder, mcProducts);
454+ posDaughterIndex = trackBuilder.template getDaughterIndex <system, modes::Track::kV0Daughter >(col, collisionProducts, mcCols, posDaughter, trackProducts, mcParticles, mcBuilder, mcProducts);
442455
443456 auto negDaughter = cascade.template negTrack_as <T8 >();
444- negDaughterIndex = trackBuilder.template getDaughterIndex <system, modes::Track::kCascadeBachelor >(col, collisionProducts, mcCols, negDaughter, trackProducts, mcParticles, mcBuilder, mcProducts);
457+ negDaughterIndex = trackBuilder.template getDaughterIndex <system, modes::Track::kV0Daughter >(col, collisionProducts, mcCols, negDaughter, trackProducts, mcParticles, mcBuilder, mcProducts);
445458
446459 fillCascade (collisionProducts, cascadeProducts, cascade, col, bachelorIndex, posDaughterIndex, negDaughterIndex);
447460 if constexpr (modes::isEqual (cascadeType, modes::Cascade::kXi )) {
448461 mcBuilder.template fillMcXiWithLabel <system>(col, mcCols, cascade, mcParticles, mcProducts);
449- ;
450462 }
451463 if constexpr (modes::isEqual (cascadeType, modes::Cascade::kOmega )) {
452464 mcBuilder.template fillMcOmegaWithLabel <system>(col, mcCols, cascade, mcParticles, mcProducts);
453- ;
454465 }
455466 }
456467 }
@@ -481,7 +492,7 @@ class CascadeBuilder
481492 cascade.v0cosPA (col.posX (), col.posY (), col.posZ ()),
482493 cascade.dcaV0daughters (),
483494 cascade.v0radius (),
484- cascade.dcav0topv (col.posY (), col.posY (), col.posZ ()));
495+ cascade.dcav0topv (col.posX (), col.posY (), col.posZ ()));
485496 }
486497 }
487498 if constexpr (modes::isEqual (cascadeType, modes::Cascade::kOmega )) {
@@ -507,7 +518,7 @@ class CascadeBuilder
507518 cascade.v0cosPA (col.posX (), col.posY (), col.posZ ()),
508519 cascade.dcaV0daughters (),
509520 cascade.v0radius (),
510- cascade.dcav0topv (col.posY (), col.posY (), col.posZ ()));
521+ cascade.dcav0topv (col.posX (), col.posY (), col.posZ ()));
511522 }
512523 }
513524 }
0 commit comments