diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 07d239f0c0b..a695d7c212a 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -122,6 +122,10 @@ struct lambdakzeroBuilder { Configurable tpcrefit{"tpcrefit", 0, "demand TPC refit"}; + // select momentum slice if desired + Configurable minimumPt{"minimumPt", 0.0f, "Minimum pT to store candidate"}; + Configurable maximumPt{"maximumPt", 1000.0f, "Maximum pT to store candidate"}; + // Operation and minimisation criteria Configurable d_bz_input{"d_bz", -999, "bz field, -999 is automatic"}; Configurable d_UseAbsDCA{"d_UseAbsDCA", true, "Use Abs DCAs"}; @@ -191,6 +195,7 @@ struct lambdakzeroBuilder { kV0DCADau, kV0CosPA, kV0Radius, + kWithinMomentumRange, kCountStandardV0, kCountV0forCascade, kNV0Steps }; @@ -273,8 +278,9 @@ struct lambdakzeroBuilder { h->GetXaxis()->SetBinLabel(4, "DCA V0 Dau"); h->GetXaxis()->SetBinLabel(5, "CosPA"); h->GetXaxis()->SetBinLabel(6, "Radius"); - h->GetXaxis()->SetBinLabel(7, "Count: Standard V0"); - h->GetXaxis()->SetBinLabel(8, "Count: V0 exc. for casc"); + h->GetXaxis()->SetBinLabel(7, "Within momentum range"); + h->GetXaxis()->SetBinLabel(8, "Count: Standard V0"); + h->GetXaxis()->SetBinLabel(9, "Count: V0 exc. for casc"); randomSeed = static_cast(std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()); @@ -646,6 +652,18 @@ struct lambdakzeroBuilder { statisticsRegistry.v0stats[kV0Radius]++; // Return OK: passed all v0 candidate selecton criteria + auto px = v0candidate.posP[0] + v0candidate.negP[0]; + auto py = v0candidate.posP[1] + v0candidate.negP[1]; + auto pz = v0candidate.posP[2] + v0candidate.negP[2]; + auto lPt = RecoDecay::sqrtSumOfSquares(v0candidate.posP[0] + v0candidate.negP[0], v0candidate.posP[1] + v0candidate.negP[1]); + + if (lPt < minimumPt || lPt > maximumPt) { + return false; // reject if not within desired window + } + + // Passes momentum window check + statisticsRegistry.v0stats[kWithinMomentumRange]++; + if (d_doTrackQA) { if (posTrack.itsNCls() < 10) statisticsRegistry.posITSclu[posTrack.itsNCls()]++; @@ -665,10 +683,6 @@ struct lambdakzeroBuilder { auto lHypertritonMass = RecoDecay::m(array{array{2.0f * v0candidate.posP[0], 2.0f * v0candidate.posP[1], 2.0f * v0candidate.posP[2]}, array{v0candidate.negP[0], v0candidate.negP[1], v0candidate.negP[2]}}, array{o2::constants::physics::MassHelium3, o2::constants::physics::MassPionCharged}); auto lAntiHypertritonMass = RecoDecay::m(array{array{v0candidate.posP[0], v0candidate.posP[1], v0candidate.posP[2]}, array{2.0f * v0candidate.negP[0], 2.0f * v0candidate.negP[1], 2.0f * v0candidate.negP[2]}}, array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassHelium3}); - auto px = v0candidate.posP[0] + v0candidate.negP[0]; - auto py = v0candidate.posP[1] + v0candidate.negP[1]; - auto pz = v0candidate.posP[2] + v0candidate.negP[2]; - auto lPt = RecoDecay::sqrtSumOfSquares(v0candidate.posP[0] + v0candidate.negP[0], v0candidate.posP[1] + v0candidate.negP[1]); auto lPtHy = RecoDecay::sqrtSumOfSquares(2.0f * v0candidate.posP[0] + v0candidate.negP[0], 2.0f * v0candidate.posP[1] + v0candidate.negP[1]); auto lPtAnHy = RecoDecay::sqrtSumOfSquares(v0candidate.posP[0] + 2.0f * v0candidate.negP[0], v0candidate.posP[1] + 2.0f * v0candidate.negP[1]);