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
12 changes: 6 additions & 6 deletions Common/Tasks/flowTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
Configurable<int> pdgSelection{"pdgSelection", 0, "pdg code selection for tracking study (0: no selection)"};

ConfigurableAxis axisB{"axisB", {100, 0.0f, 20.0f}, ""};
ConfigurableAxis axisPhi{"axisPhi", {100, 0.0f, 2.0f * TMath::Pi()}, ""};

Check warning on line 47 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
ConfigurableAxis axisNch{"axisNch", {300, 0.0f, 3000.0f}, "Nch in |eta|<0.8"};

ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}, "pt axis"};
Expand Down Expand Up @@ -86,7 +86,7 @@
float imp = mcCollision.impactParameter();
float evPhi = mcCollision.eventPlaneAngle();
if (evPhi < 0)
evPhi += 2. * TMath::Pi();

Check warning on line 89 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

long nCh = 0;

Expand All @@ -97,7 +97,7 @@

for (auto const& mcParticle : mcParticles) {
// focus on bulk: e, mu, pi, k, p
int pdgCode = TMath::Abs(mcParticle.pdgCode());

Check warning on line 100 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
if (pdgCode != 11 && pdgCode != 13 && pdgCode != 211 && pdgCode != 321 && pdgCode != 2212)
continue;
if ((pdgSelection.value != 0) && (pdgCode != pdgSelection.value))
Expand All @@ -105,13 +105,13 @@

if (!mcParticle.isPhysicalPrimary())
continue;
if (TMath::Abs(mcParticle.eta()) > 0.8) // main acceptance

Check warning on line 108 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
continue;

float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
if (deltaPhi < 0)
deltaPhi += 2. * TMath::Pi();

Check warning on line 113 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
if (deltaPhi > 2. * TMath::Pi())

Check warning on line 114 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
deltaPhi -= 2. * TMath::Pi();
histos.fill(HIST("hPtVsPhiGenerated"), deltaPhi, mcParticle.pt());
histos.fill(HIST("hBVsPtVsPhiGenerated"), imp, deltaPhi, mcParticle.pt());
Expand All @@ -131,15 +131,15 @@
for (auto const& track : tracks) {
bool isITSFake = false;

for(int bit = 0; bit < 7; bit++){
if(bitcheck(track.mcMask(), bit)){
for (int bit = 0; bit < 7; bit++) {
if (bitcheck(track.mcMask(), bit)) {
isITSFake = true;
}
}

if (track.hasTPC() && track.hasITS()) {
validGlobal = true;
if(isITSFake){
if (isITSFake) {
validGlobalFake = true;
}
}
Expand All @@ -151,13 +151,13 @@
}
if (track.hasITS() && track.itsChi2NCl() > -1e-6) {
validITSTrack = true;
if(isITSFake){
if (isITSFake) {
validITSTrackFake = true;
}
}
if (track.hasITS() && track.itsChi2NCl() < -1e-6) {
validITSABTrack = true;
if(isITSFake){
if (isITSFake) {
validITSABTrackFake = true;
}
}
Expand All @@ -169,7 +169,7 @@
histos.fill(HIST("hPtVsPhiGlobal"), deltaPhi, mcParticle.pt());
histos.fill(HIST("hBVsPtVsPhiGlobal"), imp, deltaPhi, mcParticle.pt());
}
if (validGlobalFake){
if (validGlobalFake) {
histos.fill(HIST("hBVsPtVsPhiGlobalFake"), imp, deltaPhi, mcParticle.pt());
}
// if any track present, fill
Expand Down Expand Up @@ -197,13 +197,13 @@
auto mcCollision = mcParticle.mcCollision();
float imp = mcCollision.impactParameter();

int pdgCode = TMath::Abs(mcParticle.pdgCode());

Check warning on line 200 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
if (pdgCode != 3312 && pdgCode != 3334)
return;

if (!mcParticle.isPhysicalPrimary())
return;
if (TMath::Abs(mcParticle.eta()) > 0.8)

Check warning on line 206 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
return;

float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
Expand Down Expand Up @@ -232,13 +232,13 @@
auto mcCollision = mcParticle.mcCollision();
float imp = mcCollision.impactParameter();

int pdgCode = TMath::Abs(mcParticle.pdgCode());

Check warning on line 235 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
if (pdgCode != 310 && pdgCode != 3122)
return;

if (!mcParticle.isPhysicalPrimary())
return;
if (TMath::Abs(mcParticle.eta()) > 0.8)

Check warning on line 241 in Common/Tasks/flowTest.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
return;

float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
Expand Down
Loading