Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 48 additions & 24 deletions PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,30 +118,44 @@

HistogramRegistry registry{
"registry",
{
{"TracksEtaZvtx",
"; #eta; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {EtaAxis, ZAxis}}}, //
{"Tracks/EtaZvtx_gt0",
"; #eta; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {EtaAxis, ZAxis}}}, //
{"TracksPhiEta",
"; #varphi; #eta; tracks",
{HistType::kTH2F, {PhiAxis, EtaAxis}}}, //
{"TracksPhiZvtx",
"; #varphi; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {PhiAxis, ZAxis}}}, //
{"TracksPtEta",
" ; p_{T} (GeV/c); #eta",
{HistType::kTH2F, {PtAxis, EtaAxis}}}, //
{"EventSelection",
";status;events",
{HistType::kTH1F, {{15, 0.5, 15.5}}}},
{"EventCounts",
";status;events",
{HistType::kTH1F, {{2, 0.5, 2.5}}}},
{"Tracks/Control/TrackCount", ";status;Track counts", {HistType::kTH1F, {{15, 0.5, 15.5}}}}, // added
}};
{{"TracksEtaZvtx",
"; #eta; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {EtaAxis, ZAxis}}}, //
{"Tracks/EtaZvtx_gt0",
"; #eta; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {EtaAxis, ZAxis}}}, //
{"TracksPhiEta",
"; #varphi; #eta; tracks",
{HistType::kTH2F, {PhiAxis, EtaAxis}}}, //
{"TracksPhiZvtx",
"; #varphi; #it{z}_{vtx} (cm); tracks",
{HistType::kTH2F, {PhiAxis, ZAxis}}}, //
{"TracksPtEta",
" ; p_{T} (GeV/c); #eta",
{HistType::kTH2F, {PtAxis, EtaAxis}}}, //
{"EventSelection",
";status;events",
{HistType::kTH1F, {{15, 0.5, 15.5}}}},
{"EventCounts",
";status;events",
{HistType::kTH1F, {{2, 0.5, 2.5}}}},
{"Tracks/Control/TrackCount", ";status;Track counts", {HistType::kTH1F, {{15, 0.5, 15.5}}}}, // added
// Purity-related histograms
{"Purity/SelectedAfterDCAxy/All",
";bin;counts",
{HistType::kTH1F, {{1, 0.5, 1.5}}}},
{"Purity/SelectedAfterDCAxy/AllEta",
";#eta;counts",
{HistType::kTH1F, {EtaAxis}}},
{"Purity/Gen/PrimaryEta",
";#eta;primaries",
{HistType::kTH1F, {EtaAxis}}},
{"Purity/Gen/All",
";bin;counts",
{HistType::kTH1F, {{1, 0.5, 1.5}}}},
{"Purity/Gen/AllEta",
";#eta;counts",
{HistType::kTH1F, {EtaAxis}}}}};

void init(InitContext&)
{
Expand Down Expand Up @@ -518,13 +532,13 @@
"Collect event sample stats", true);

Partition<aod::MFTTracks> sample =
(aod::fwdtrack::eta < -2.8f) && (aod::fwdtrack::eta > -3.2f);

Check failure on line 535 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Partition<aod::Tracks> sampleCentral = (nabs(aod::track::eta) < 1.f);

expressions::Filter atrackFilter =
(aod::fwdtrack::bestCollisionId >= 0) && (aod::fwdtrack::eta < -2.0f) &&

Check failure on line 540 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
(aod::fwdtrack::eta > -3.9f) && (nabs(aod::fwdtrack::bestDCAXY) <= 2.f);

Check failure on line 541 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

using CollwEv = soa::Join<aod::Collisions, aod::EvSels>;

Expand Down Expand Up @@ -585,7 +599,7 @@
}
registry.fill(HIST("TracksPhiEta"), phi, track.eta());
registry.fill(HIST("TracksPtEta"), track.pt(), track.eta());
if ((track.eta() < -2.0f) && (track.eta() > -3.9f)) {

Check failure on line 602 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.fill(HIST("TracksPhiZvtx"), phi, z);
}
}
Expand Down Expand Up @@ -621,7 +635,7 @@
float phi = track.phi();
o2::math_utils::bringTo02Pi(phi);
if (usePhiCut) {
if ((phi <= 0.02) || ((phi >= 3.10) && (phi <= 3.23)) || (phi >= 6.21))

Check failure on line 638 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
float dcaxy_cut = retrack.bestDCAXY();
Expand Down Expand Up @@ -673,7 +687,7 @@
float phi = track.phi();
o2::math_utils::bringTo02Pi(phi);
if (usePhiCut) {
if ((phi <= 0.02) || ((phi >= 3.10) && (phi <= 3.23)) || (phi >= 6.21))

Check failure on line 690 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
float dcaxy_cut = retrack.bestDCAXY();
Expand Down Expand Up @@ -711,7 +725,7 @@
// Declare dcaz_cut only if needed below.
if ((cfgnEta1 < track.eta()) && (track.eta() < cfgnEta2) && track.nClusters() >= cfgnCluster && chi2ndf < cfgChi2NDFMax && (phi > cfgPhiCut1 && phi < cfgPhiCut2)) {
if (usePhiCut) {
if ((phi <= 0.02) || ((phi >= 3.10) && (phi <= 3.23)) || (phi >= 6.21))

Check failure on line 728 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
if (useDCAxyCut) {
Expand All @@ -725,6 +739,9 @@
continue;
}
}
// Purity denominator: all tracks that pass the DCA selection and other quality cuts
registry.fill(HIST("Purity/SelectedAfterDCAxy/All"), 1.);
registry.fill(HIST("Purity/SelectedAfterDCAxy/AllEta"), track.eta());
registry.fill(HIST("TracksEtaZvtx"), track.eta(), z);
if (midtracks.size() > 0 && retrack.ambDegree() > 0) {
registry.fill(HIST("Tracks/EtaZvtx_gt0"), track.eta(), z);
Expand All @@ -740,7 +757,7 @@
registry.fill(HIST("Tracks/Control/TrackCount"), 0);
registry.fill(HIST("TracksPhiEta"), phi, track.eta());
registry.fill(HIST("TracksPtEta"), track.pt(), track.eta());
if ((track.eta() < -2.0f) && (track.eta() > -3.9f)) {

Check failure on line 760 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.fill(HIST("TracksPhiZvtx"), phi, z);
}
if (track.collisionId() > -1 && retrack.ambDegree() == 1) {
Expand Down Expand Up @@ -933,7 +950,7 @@
(aod::mcparticle::flags &
(uint8_t)o2::aod::mcparticle::enums::PhysicalPrimary) ==
(uint8_t)o2::aod::mcparticle::enums::PhysicalPrimary;
Partition<Particles> mcSample = nabs(aod::mcparticle::eta) < 1.1f;

Check failure on line 953 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
Partition<Particles> mcSampleCentral =
nabs(aod::mcparticle::eta) < estimatorEta;

Expand All @@ -955,7 +972,7 @@
if (p != nullptr) {
charge = p->Charge();
}
if (std::abs(charge) < 3.) {

Check failure on line 975 in PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
nCharged++;
Expand Down Expand Up @@ -1049,6 +1066,13 @@
continue;
}
if (cfgnEta1 < particle.eta() && particle.eta() < cfgnEta2 && (phi > cfgPhiCut1 && phi < cfgPhiCut2)) {
// Purity numerator reference at generator level: physical primaries in the same eta window
if (particle.isPhysicalPrimary()) {
registry.fill(HIST("Purity/Gen/PrimaryEta"), particle.eta());
// Truth-side total counters for primaries in acceptance (for purity calculations)
registry.fill(HIST("Purity/Gen/All"), 1.);
registry.fill(HIST("Purity/Gen/AllEta"), particle.eta());
}
registry.fill(HIST("TracksEtaZvtxGen_t"), particle.eta(),
mcCollision.posZ());
if (perCollisionMCSampleCentral.size() > 0) {
Expand Down
Loading