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
42 changes: 20 additions & 22 deletions PWGJE/Tasks/statPromptPhoton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <TVector2.h>

#include <cmath>
#include <iostream>

Check failure on line 42 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <optional>
#include <set>
#include <string>
Expand Down Expand Up @@ -108,7 +108,6 @@

const AxisSpec MCptAxis = {cfgMCptNbins, cfgMCptbinLow, cfgMCptbinHigh};


triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(cfgTriggerMasks);
if (cfgJETracks) {
trackFilter = jetderiveddatautilities::initialiseTrackSelection(static_cast<std::string>(cfgTrackFilter));
Expand Down Expand Up @@ -545,7 +544,7 @@
}
}
histos.fill(HIST("GEN_nEvents"), 0.5);
if (fabs(collision.posZ()) > cfgVtxCut)

Check failure on line 547 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;

if (recocolls.size() <= 0) // not reconstructed
Expand All @@ -553,7 +552,7 @@
for (auto& recocoll : recocolls) { // poorly reconstructed
if (!recocoll.sel8())
return;
if (fabs(recocoll.posZ()) > cfgVtxCut)

Check failure on line 555 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

return;
histos.fill(HIST("GEN_nEvents"), 1.5);
Expand All @@ -571,7 +570,7 @@
continue;
if (std::abs(mcPhoton.eta()) > cfgtrkMaxEta)
continue;
double pdgcode = fabs(mcPhoton.pdgCode());

Check failure on line 573 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (mcPhoton.isPhysicalPrimary()) {
if (pdgcode == 211 || pdgcode == 321 || pdgcode == 2212 || pdgcode == 11) {
histos.fill(HIST("GEN_Particle_Pt"), mcPhoton.pt());
Expand All @@ -587,7 +586,7 @@
bool sterntrigger = false;
double sternPt = 0.0;
if (mcPhoton.pt() > cfgMinTrig && mcPhoton.pt() < cfgMaxTrig) {
if (fabs(mcPhoton.eta()) <= cfgtrkMaxEta) {

Check failure on line 589 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
sterntrigger = true;
sternPt = mcPhoton.pt();
}
Expand Down Expand Up @@ -615,7 +614,7 @@
if (mcPhoton.pdgCode() == 22) {
histos.fill(HIST("GEN_True_Photon_Energy"), mcPhoton.e());
if (mcPhoton.pt() > cfgMinTrig && mcPhoton.pt() < cfgMaxTrig) {
if (fabs(mcPhoton.eta()) <= cfgtrkMaxEta) {

Check failure on line 617 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
photontrigger = true;
}
} // check for photon trigger
Expand Down Expand Up @@ -727,7 +726,7 @@
histos.fill(HIST("REC_nEvents"), 0.5);

// required cuts
if (fabs(collision.posZ()) > cfgVtxCut)

Check failure on line 729 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
if (!collision.sel8())
return;
Expand Down Expand Up @@ -785,7 +784,7 @@
continue;
if (mccluster.energy() > cfgHighClusterE)
continue;
if (fabs(mccluster.eta()) > cfgtrkMaxEta)

Check failure on line 787 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;

histos.fill(HIST("REC_Cluster_QA"), 0.5);
Expand Down Expand Up @@ -860,11 +859,11 @@
double etadiff = mccluster.eta() - ctrack.eta();

if (cfgPtClusterCut) {
if (fabs(etaT - etaC) < (0.010 + pow(ptT + 4.07, -2.5))) {

Check failure on line 862 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
etatrigger = true;
}

if (fabs(TVector2::Phi_mpi_pi(phiT - phiC)) < (0.015 + pow(ptT + 3.65, -2.0))) {

Check failure on line 866 in PWGJE/Tasks/statPromptPhoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
phitrigger = true;
}
} else {
Expand Down Expand Up @@ -1521,16 +1520,15 @@
continue;
if (std::fabs(mcParticle.getGenStatusCode()) >= 81 || !mcParticle.isPhysicalPrimary())
continue;
if(cfgReqRecPS_GEN){
if(std::fabs(mcParticle.eta())>0.62)
continue;
bool insideCalPhi = false;
if((mcParticle.phi()> 1.42 && mcParticle.phi()<3.26) || (mcParticle.phi()> 4.56 && mcParticle.phi()<5.70))
insideCalPhi=true;
if(!insideCalPhi)
continue;
}

if (cfgReqRecPS_GEN) {
if (std::fabs(mcParticle.eta()) > 0.62)
continue;
bool insideCalPhi = false;
if ((mcParticle.phi() > 1.42 && mcParticle.phi() < 3.26) || (mcParticle.phi() > 4.56 && mcParticle.phi() < 5.70))
insideCalPhi = true;
if (!insideCalPhi)
continue;
}

// Chase this final-state photon upward
int chaseindex = -1;
Expand Down Expand Up @@ -1646,17 +1644,17 @@
if (clusterparticle.getGenStatusCode() < 0)
continue;
if (std::fabs(clusterparticle.getGenStatusCode()) >= 81)
continue;
if(cfgReqRecPS_REC){
if(std::fabs(clusterparticle.eta())>0.62)
continue;
bool insideCalPhi = false;
if((clusterparticle.phi()> 1.42 && clusterparticle.phi()<3.26) || (clusterparticle.phi()> 4.56 && clusterparticle.phi()<5.70))
insideCalPhi=true;
if(!insideCalPhi)
continue;
}
continue;
if (cfgReqRecPS_REC) {
if (std::fabs(clusterparticle.eta()) > 0.62)
continue;
bool insideCalPhi = false;
if ((clusterparticle.phi() > 1.42 && clusterparticle.phi() < 3.26) || (clusterparticle.phi() > 4.56 && clusterparticle.phi() < 5.70))
insideCalPhi = true;
if (!insideCalPhi)
continue;
}

int chaseindex = -1;
for (auto& mom : clusterparticle.mothers_as<aod::JMcParticles>()) {
chaseindex = mom.globalIndex();
Expand Down
Loading