|
22 | 22 | #include "Framework/AnalysisTask.h" |
23 | 23 | #include "Framework/HistogramRegistry.h" |
24 | 24 | #include "Framework/runDataProcessing.h" |
| 25 | +#include "Framework/RunningWorkflowInfo.h" |
25 | 26 | #include "ReconstructionDataFormats/DCA.h" |
26 | 27 | #include "ReconstructionDataFormats/V0.h" |
27 | 28 |
|
@@ -445,6 +446,22 @@ struct HfCandidateCreatorCascadeMc { |
445 | 446 |
|
446 | 447 | using MyTracksWMc = soa::Join<aod::TracksWCov, aod::McTrackLabels>; |
447 | 448 |
|
| 449 | + float zPvPosMax{1000.f}; |
| 450 | + |
| 451 | + // inspect for which zPvPosMax cut was set for reconstructed |
| 452 | + void init(InitContext& initContext) { |
| 453 | + auto& workflows = initContext.services().get<RunningWorkflowInfo const>(); |
| 454 | + for (const DeviceSpec& device : workflows.devices) { |
| 455 | + if (device.name.compare("hf-candidate-creator-cascade") == 0) { |
| 456 | + for (const auto& option : device.options) { |
| 457 | + if (option.name.compare("zPvPosMax") == 0) { |
| 458 | + zPvPosMax = option.defaultValue.get<float>(); |
| 459 | + } |
| 460 | + } |
| 461 | + } |
| 462 | + } |
| 463 | + } |
| 464 | + |
448 | 465 | void processMc(MyTracksWMc const& tracks, |
449 | 466 | aod::McParticles const& mcParticles) |
450 | 467 | { |
@@ -493,6 +510,14 @@ struct HfCandidateCreatorCascadeMc { |
493 | 510 | // Match generated particles. |
494 | 511 | for (const auto& particle : mcParticles) { |
495 | 512 | origin = 0; |
| 513 | + |
| 514 | + auto mcCollision = particle.mcCollision(); |
| 515 | + float zPv = mcCollision.posZ(); |
| 516 | + if (zPv < -zPvPosMax || zPv > zPvPosMax) { // to avoid counting particles in collisions with Zvtx larger than the maximum, we do not match them |
| 517 | + rowMcMatchGen(sign, origin); |
| 518 | + continue; |
| 519 | + } |
| 520 | + |
496 | 521 | // checking if I have a Lc --> K0S + p |
497 | 522 | RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kLambdaCPlus, std::array{+kProton, +kK0Short}, false, &sign, 2); |
498 | 523 | if (sign == 0) { // now check for anti-Lc |
|
0 commit comments