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
22 changes: 11 additions & 11 deletions Common/Tasks/flowTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Configurable<int> analysisMinimumTPCClusters{"analysisMinimumTPCClusters", 70, "minimum TPC clusters for analysis track category"};

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

Check warning on line 50 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 All @@ -60,7 +60,7 @@
histos.add<TH1>("hEventPlaneAngle", "hEventPlaneAngle", HistType::kTH1D, {axisPhi});
histos.add<TH2>("hTrackPhiVsEventPlaneAngle", "hTrackPhiVsEventPlaneAngle", HistType::kTH2D, {axisPhi, axisPhi});

// analysis
// analysis
histos.add<TH2>("hPtVsPhiGenerated", "hPtVsPhiGenerated", HistType::kTH2D, {axisPhi, axisPt});
histos.add<TH2>("hPtVsPhiGlobal", "hPtVsPhiGlobal", HistType::kTH2D, {axisPhi, axisPt});
histos.add<TH3>("hBVsPtVsPhiGenerated", "hBVsPtVsPhiGenerated", HistType::kTH3D, {axisB, axisPhi, axisPt});
Expand Down Expand Up @@ -95,7 +95,7 @@
float imp = mcCollision.impactParameter();
float evPhi = mcCollision.eventPlaneAngle();
if (evPhi < 0)
evPhi += 2. * TMath::Pi();

Check warning on line 98 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 @@ -106,7 +106,7 @@

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

Check warning on line 109 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 @@ -114,13 +114,13 @@

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

Check warning on line 117 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 122 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 123 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("hTrackPhiVsEventPlaneAngle"), evPhi, mcParticle.phi());
Expand All @@ -137,28 +137,28 @@
bool validITSTrackFake = false;
bool validITSABTrack = false;
bool validITSABTrackFake = false;
bool validAnalysisTrack = false;
bool validAnalysisTrack = false;
bool validAnalysisTrackFake = false;
if (mcParticle.has_tracks()) {
auto const& tracks = mcParticle.tracks_as<recoTracksWithLabels>();
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.tpcNClsFound() > analysisMinimumTPCClusters && track.itsNCls() > analysisMinimumITSClusters){
if (track.tpcNClsFound() > analysisMinimumTPCClusters && track.itsNCls() > analysisMinimumITSClusters) {
validAnalysisTrack = true;
if(isITSFake){
if (isITSFake) {
validAnalysisTrackFake = true;
}
}
if (track.hasTPC() && track.hasITS()) {
validGlobal = true;
if(isITSFake){
if (isITSFake) {
validGlobalFake = true;
}
}
Expand All @@ -170,13 +170,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 @@ -188,13 +188,13 @@
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 (validAnalysisTrack) {
histos.fill(HIST("hBVsPtVsPhiAnalysis"), imp, deltaPhi, mcParticle.pt());
}
if (validAnalysisTrackFake){
if (validAnalysisTrackFake) {
histos.fill(HIST("hBVsPtVsPhiAnalysisFake"), imp, deltaPhi, mcParticle.pt());
}
// if any track present, fill
Expand Down Expand Up @@ -222,13 +222,13 @@
auto mcCollision = mcParticle.mcCollision();
float imp = mcCollision.impactParameter();

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

Check warning on line 225 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 231 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 @@ -257,13 +257,13 @@
auto mcCollision = mcParticle.mcCollision();
float imp = mcCollision.impactParameter();

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

Check warning on line 260 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 266 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