Skip to content
Closed
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
47 changes: 27 additions & 20 deletions PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iostream>

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

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <unordered_set>
#include <vector>

Expand Down Expand Up @@ -51,7 +51,7 @@
AxisSpec PtAxis = {1001, -0.005, 10.005};
AxisSpec DeltaZAxis = {61, -6.1, 6.1};
AxisSpec ZAxis = {301, -30.1, 30.1};
AxisSpec PhiAxis = {629, 0, 2 * M_PI, "Rad", "phi axis"};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
// AxisSpec EtaAxis = {18, -4.6, -1.};
AxisSpec DCAxyAxis = {100, -1, 10};
AxisSpec CentAxis = {{0, 10, 20, 30, 40, 50, 60, 70, 80, 100}};
Expand Down Expand Up @@ -82,6 +82,7 @@
"eta range for INEL>0 sample definition"};

Configurable<bool> useEvSel{"useEvSel", true, "use event selection"};
Configurable<bool> disableITSROFCut{"disableITSROFCut", false, "Disable ITS ROC cut for event selection"};
ConfigurableAxis multBinning{"multBinning", {701, -0.5, 700.5}, ""};
ConfigurableAxis EtaAxis = {"etaBinning", {18, -4.6, -1.}, ""};

Expand Down Expand Up @@ -145,15 +146,15 @@
auto hstat = registry.get<TH1>(HIST("EventSelection"));
auto* x = hstat->GetXaxis();
x->SetBinLabel(1, "All");
x->SetBinLabel(2, "Selected");
x->SetBinLabel(3, "Selected Vz Cut");
x->SetBinLabel(4, "Sel8+Vz+INEL>0");
x->SetBinLabel(5, "Sel INEL,INEL_fwd>0");
x->SetBinLabel(6, "Rejected");
x->SetBinLabel(7, "Good BCs");
x->SetBinLabel(8, "BCs with collisions");
x->SetBinLabel(9, "BCs with pile-up/splitting");
x->SetBinLabel(10, "midtracks>0");
x->SetBinLabel(2, "Vz");
x->SetBinLabel(3, "Vz+ITSRof");
x->SetBinLabel(4, "Vz+Selected");
x->SetBinLabel(5, "Sel8+Vz+INEL>0");
x->SetBinLabel(6, "Sel INEL,INEL_fwd>0");
x->SetBinLabel(7, "Rejected");
x->SetBinLabel(8, "Good BCs");
x->SetBinLabel(9, "BCs with collisions");
x->SetBinLabel(10, "BCs with pile-up/splitting");
x->SetBinLabel(11, "percollisionSample>0");
x->SetBinLabel(12, "midtracks+percollisionSample>0");
registry.add({"EventsNtrkZvtx",
Expand Down Expand Up @@ -450,7 +451,7 @@
if (!useEvSel ||
(useEvSel && ((bc.selection_bit(aod::evsel::kIsBBT0A) &&
bc.selection_bit(aod::evsel::kIsBBT0C)) != 0))) {
registry.fill(HIST("EventSelection"), 7); // added 5->12
registry.fill(HIST("EventSelection"), 8); // added 5->12
cols.clear();
for (auto& collision : collisions) {
if (collision.has_foundBC()) {
Expand All @@ -463,9 +464,9 @@
}
LOGP(debug, "BC {} has {} collisions", bc.globalBC(), cols.size());
if (!cols.empty()) {
registry.fill(HIST("EventSelection"), 8); // added 6->13
registry.fill(HIST("EventSelection"), 9); // added 6->13
if (cols.size() > 1) {
registry.fill(HIST("EventSelection"), 9); // added 7->14
registry.fill(HIST("EventSelection"), 10); // added 7->14
}
}
}
Expand Down Expand Up @@ -529,10 +530,10 @@

if (usePhiCut) {
if ((phi < cfgPhiCut) ||
((phi > M_PI - cfgPhiCut) && (phi < M_PI + cfgPhiCut)) ||

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
(phi > 2. * M_PI - cfgPhiCut) ||

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
((phi > ((M_PI / 2. - 0.1) * M_PI) - cfgPhiCut) &&

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
(phi < ((M_PI / 2. - 0.1) * M_PI) + cfgPhiCut)))

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
continue;
}

Expand Down Expand Up @@ -569,25 +570,28 @@
registry.fill(HIST("EventsNtrkZvtx"), Ntrk, z);
if ((z >= cfgVzCut1) && (z <= cfgVzCut2)) {
registry.fill(HIST("Tracks/2Danalysis/EventsNtrkZvtx_all"), Ntrk, z);
registry.fill(HIST("EventSelection"), 2.);
for (auto& retrack : retracks) {
auto track = retrack.mfttrack();
if ((cfgnEta1 < track.eta()) && (track.eta() < cfgnEta2) && track.nClusters() >= cfgnCluster && retrack.ambDegree() > 0) {
registry.fill(HIST("Tracks/2Danalysis/EtaZvtx"), track.eta(), z);
}
}
if (!useEvSel || (useEvSel && collision.sel8())) {
registry.fill(HIST("EventSelection"), 2.);
if (!disableITSROFCut && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
return;
}
registry.fill(HIST("EventSelection"), 3.);
if (!useEvSel || (useEvSel && collision.selection_bit(aod::evsel::kIsTriggerTVX) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
registry.fill(HIST("EventSelection"), 4.);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also separate out kNoTimeFrameBorder cut like you did for kNoITSROFrameBorder

registry.fill(HIST("Tracks/2Danalysis/EventsNtrkZvtx_sel8"), Ntrk, z);
registry.fill(HIST("EventSelection"), 3.);
std::unordered_set<int> uniqueEvents;
std::unordered_set<int> uniqueEventsAmb;
std::unordered_set<int> uniqueCollisions;
std::unordered_set<int> uniqueCollisionsAmb;
std::unordered_set<int> eventsInelMFT;
std::unordered_set<int> eventsInel;
if (midtracks.size() > 0) {
registry.fill(HIST("EventSelection"), 4.);
registry.fill(HIST("EventSelection"), 10.);
registry.fill(HIST("EventSelection"), 5.);
registry.fill(HIST("EventsNtrkZvtx_gt0"), Ntrk, z);
registry.fill(HIST("Tracks/2Danalysis/EventsNtrkZvtx_sel8_inelgt0"), Ntrk, z);
eventsInel.insert(collision.globalIndex());
Expand All @@ -609,7 +613,7 @@
}
}
if (retracks.size() > 0) {
registry.fill(HIST("EventSelection"), 5.);
registry.fill(HIST("EventSelection"), 6.);
if (midtracks.size() > 0) {
registry.fill(HIST("Tracks/2Danalysis/EventsNtrkZvtx_sel8_inelfwdgt0"), Ntrk, z);
}
Expand Down Expand Up @@ -736,7 +740,7 @@
registry.fill(HIST("hNumCollisions_Inel"), 1, eventsInel.size());
}
} else {
registry.fill(HIST("EventSelection"), 6);
registry.fill(HIST("EventSelection"), 7);
}
}
PROCESS_SWITCH(PseudorapidityDensityMFT, processMultReassoc,
Expand Down Expand Up @@ -766,10 +770,10 @@

if (usePhiCut) {
if ((phi < cfgPhiCut) ||
((phi > M_PI - cfgPhiCut) && (phi < M_PI + cfgPhiCut)) ||

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
(phi > 2. * M_PI - cfgPhiCut) ||

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
((phi > ((M_PI / 2. - 0.1) * M_PI) - cfgPhiCut) &&

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
(phi < ((M_PI / 2. - 0.1) * M_PI) + cfgPhiCut)))

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
continue;
}

Expand Down Expand Up @@ -851,7 +855,10 @@
collisions.size());
for (auto& collision : collisions) {
registry.fill(HIST("EventEfficiency"), 3.);
if (!useEvSel || (useEvSel && collision.sel8())) {
if (!disableITSROFCut && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
return;
}
if (!useEvSel || (useEvSel && collision.selection_bit(aod::evsel::kIsTriggerTVX) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also separate out kNoTimeFrameBorder cut like you did for kNoITSROFrameBorder

atLeastOne = true;
auto perCollisionSample = sample->sliceByCached(
o2::aod::fwdtrack::collisionId, collision.globalIndex(), cache);
Expand Down
Loading