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
44 changes: 21 additions & 23 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 @@ -93,7 +93,7 @@
Configurable<float> cfgEMChighPSphi{"cfgEMChighPSphi", 3.26, "higher limit of the EMC acceptance if Rec PS is required"};
Configurable<float> cfgEMChighPSeta{"cfgEMChighPSeta", 0.62, "symmetric eta cut if Rec PS is required"};
Configurable<float> cfgDClowPSphi{"cfgDClowPSphi", 4.56, "lower limit of the DCal acceptance if Rec PS is required"};
Configurable<float> cfgDChighPSphi{"cfgDChighPSphi", 5.70, "higher limit of the DCal acceptance if Rec PS is required"};
Configurable<float> cfgDChighPSphi{"cfgDChighPSphi", 5.70, "higher limit of the DCal acceptance if Rec PS is required"};
Configurable<int> cfgMCptNbins{"cfgMCptNbins", 200, "number of ptbins in MC QA plots"};
Configurable<double> cfgMCptbinLow{"cfgMCptbinLow", 5, "lower limit of ptbins in MC QA plots"};
Configurable<double> cfgMCptbinHigh{"cfgMCptbinHigh", 200, "upper limit of ptbins in MC QA plots"};
Expand All @@ -113,7 +113,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 @@ -550,7 +549,7 @@
}
}
histos.fill(HIST("GEN_nEvents"), 0.5);
if (fabs(collision.posZ()) > cfgVtxCut)

Check failure on line 552 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 @@ -558,7 +557,7 @@
for (auto& recocoll : recocolls) { // poorly reconstructed
if (!recocoll.sel8())
return;
if (fabs(recocoll.posZ()) > cfgVtxCut)

Check failure on line 560 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 @@ -576,7 +575,7 @@
continue;
if (std::abs(mcPhoton.eta()) > cfgtrkMaxEta)
continue;
double pdgcode = fabs(mcPhoton.pdgCode());

Check failure on line 578 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 @@ -592,7 +591,7 @@
bool sterntrigger = false;
double sternPt = 0.0;
if (mcPhoton.pt() > cfgMinTrig && mcPhoton.pt() < cfgMaxTrig) {
if (fabs(mcPhoton.eta()) <= cfgtrkMaxEta) {

Check failure on line 594 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 @@ -620,7 +619,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 622 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 @@ -732,7 +731,7 @@
histos.fill(HIST("REC_nEvents"), 0.5);

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

Check failure on line 734 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 @@ -790,7 +789,7 @@
continue;
if (mccluster.energy() > cfgHighClusterE)
continue;
if (fabs(mccluster.eta()) > cfgtrkMaxEta)

Check failure on line 792 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 @@ -865,11 +864,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 867 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 871 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 @@ -1526,16 +1525,15 @@
continue;
if (std::fabs(mcParticle.getGenStatusCode()) >= 81 || !mcParticle.isPhysicalPrimary())
continue;
if(cfgReqRecPS_GEN){
if(std::fabs(mcParticle.eta())>cfgEMChighPSeta)
continue;
bool insideCalPhi = false;
if((mcParticle.phi()> cfgEMClowPSphi && mcParticle.phi()<cfgEMChighPSphi) || (mcParticle.phi()> cfgDClowPSphi && mcParticle.phi()<cfgDChighPSphi))
insideCalPhi=true;
if(!insideCalPhi)
continue;
}

if (cfgReqRecPS_GEN) {
if (std::fabs(mcParticle.eta()) > cfgEMChighPSeta)
continue;
bool insideCalPhi = false;
if ((mcParticle.phi() > cfgEMClowPSphi && mcParticle.phi() < cfgEMChighPSphi) || (mcParticle.phi() > cfgDClowPSphi && mcParticle.phi() < cfgDChighPSphi))
insideCalPhi = true;
if (!insideCalPhi)
continue;
}

// Chase this final-state photon upward
int chaseindex = -1;
Expand Down Expand Up @@ -1651,17 +1649,17 @@
if (clusterparticle.getGenStatusCode() < 0)
continue;
if (std::fabs(clusterparticle.getGenStatusCode()) >= 81)
continue;
if(cfgReqRecPS_REC){
if(std::fabs(clusterparticle.eta())>cfgEMChighPSeta)
continue;
bool insideCalPhi = false;
if((clusterparticle.phi()> cfgEMClowPSphi && clusterparticle.phi()<cfgEMChighPSphi) || (clusterparticle.phi()> cfgDClowPSphi && clusterparticle.phi()<cfgDChighPSphi))
insideCalPhi=true;
if(!insideCalPhi)
continue;
}
continue;
if (cfgReqRecPS_REC) {
if (std::fabs(clusterparticle.eta()) > cfgEMChighPSeta)
continue;
bool insideCalPhi = false;
if ((clusterparticle.phi() > cfgEMClowPSphi && clusterparticle.phi() < cfgEMChighPSphi) || (clusterparticle.phi() > cfgDClowPSphi && clusterparticle.phi() < cfgDChighPSphi))
insideCalPhi = true;
if (!insideCalPhi)
continue;
}

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