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
18 changes: 18 additions & 0 deletions PWGLF/Tasks/GlobalEventProperties/dndeta-mft-pp.cxx
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@

#include "TFile.h"

#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstdint>
Expand DownExpand Up@@ -91,6 +92,7 @@
"max allowed Z difference for reconstructed collisions (cm)"};

Configurable<bool> usePhiCut{"usePhiCut", true, "use azimuthal angle cut"};
Configurable<bool> useDCAxyCut{"useDCAxyCut", false, "use DCAxy cut"};
Configurable<float> cfgPhiCut{"cfgPhiCut", 0.1f,
"Cut on azimuthal angle of MFT tracks"};
Configurable<float> cfgPhiCut1{"cfgPhiCut1", 0.0f,
Expand All@@ -108,6 +110,7 @@
Configurable<float> cfgnEta2{"cfgnEta2", -1.0f,
"Cut on eta1"};
Configurable<float> cfgChi2NDFMax{"cfgChi2NDFMax", 2000.0f, "Max allowed chi2/NDF for MFT tracks"};
Configurable<float> maxDCAxy{"maxDCAxy", 2.0f, "Cut on dcaXY"};

HistogramRegistry registry{
"registry",
Expand DownExpand Up@@ -484,13 +487,13 @@
"Collect event sample stats", true);

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

Check failure on line 490 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 495 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 496 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 DownExpand Up@@ -551,7 +554,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 557 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 DownExpand Up@@ -585,9 +588,14 @@
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 591 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();
if (useDCAxyCut) {
if (dcaxy_cut > maxDCAxy)
continue;
}
if ((cfgnEta1 < track.eta()) && (track.eta() < cfgnEta2) && track.nClusters() >= cfgnCluster && retrack.ambDegree() > 0 && chi2ndf < cfgChi2NDFMax && (phi > cfgPhiCut1 && phi < cfgPhiCut2)) {
registry.fill(HIST("Tracks/2Danalysis/EtaZvtx"), track.eta(), z);
}
Expand DownExpand Up@@ -625,9 +633,14 @@
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 636 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();
if (useDCAxyCut) {
if (dcaxy_cut > maxDCAxy)
continue;
}
if ((cfgnEta1 < track.eta()) && (track.eta() < cfgnEta2) && track.nClusters() >= cfgnCluster && retrack.ambDegree() > 0 && chi2ndf < cfgChi2NDFMax && (phi > cfgPhiCut1 && phi < cfgPhiCut2)) {
registry.fill(HIST("Tracks/Control/Chi2NDF"), chi2ndf);
registry.fill(HIST("Tracks/2Danalysis/EtaZvtx_sel8"), track.eta(), z);
Expand All@@ -646,12 +659,17 @@
float ndf = std::max(2.0f * track.nClusters() - 5.0f, 1.0f);
float chi2ndf = track.chi2() / ndf;
float phi = track.phi();
float dcaxy_cut = retrack.bestDCAXY();
o2::math_utils::bringTo02Pi(phi);
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 666 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) {
if (dcaxy_cut > maxDCAxy)
continue;
}
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@@ -667,7 +685,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 688 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 DownExpand Up@@ -826,7 +844,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 847 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@@ -848,7 +866,7 @@
if (p != nullptr) {
charge = p->Charge();
}
if (std::abs(charge) < 3.) {

Check failure on line 869 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
Loading