Skip to content

Commit

Permalink
PWGLF / V0 builders: add momentum window selection for testing (Alice…
Browse files Browse the repository at this point in the history
…O2Group#4295)

* Add momentum window selection for testing

* Please consider the following formatting changes (#216)

---------

Co-authored-by: ALICE Builder <[email protected]>
  • Loading branch information
ddobrigk and alibuild authored Jan 13, 2024
1 parent 421fb2a commit a23ec43
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions PWGLF/TableProducer/lambdakzerobuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ struct lambdakzeroBuilder {

Configurable<int> tpcrefit{"tpcrefit", 0, "demand TPC refit"};

// select momentum slice if desired
Configurable<float> minimumPt{"minimumPt", 0.0f, "Minimum pT to store candidate"};
Configurable<float> maximumPt{"maximumPt", 1000.0f, "Maximum pT to store candidate"};

// Operation and minimisation criteria
Configurable<double> d_bz_input{"d_bz", -999, "bz field, -999 is automatic"};
Configurable<bool> d_UseAbsDCA{"d_UseAbsDCA", true, "Use Abs DCAs"};
Expand Down Expand Up @@ -191,6 +195,7 @@ struct lambdakzeroBuilder {
kV0DCADau,
kV0CosPA,
kV0Radius,
kWithinMomentumRange,
kCountStandardV0,
kCountV0forCascade,
kNV0Steps };
Expand Down Expand Up @@ -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<unsigned int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());

Expand Down Expand Up @@ -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()]++;
Expand All @@ -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]);

Expand Down

0 comments on commit a23ec43

Please sign in to comment.