@@ -87,6 +87,11 @@ struct statPromptPhoton {
8787 Configurable<bool > cfgJETracks{" cfgJETracks" , false , " Enables running on derived JE data" };
8888 Configurable<bool > cfgGenHistograms{" cfgGenHistograms" , false , " Enables Generated histograms" };
8989 Configurable<bool > cfgGenReqRec{" cfgGenReqRec" , false , " Only consider generated events which are successfully reconstructed" };
90+ Configurable<bool > cfgReqRecPS_REC{" cfgReqRecPS_REC" , false , " Only consider reconstructed photons within the EMCAl acceptence" };
91+ Configurable<bool > cfgReqRecPS_GEN{" cfgReqRecPS_GEN" , false , " Only consider generated photons within the EMCAl acceptence" };
92+ Configurable<double > cfgMCptNbins{" cfgMCptNbins" , 200 , " number of ptbins in MC QA plots" };
93+ Configurable<double > cfgMCptbinLow{" cfgMCptbinLow" , 5 , " lower limit of ptbins in MC QA plots" };
94+ Configurable<double > cfgMCptbinHigh{" cfgMCptbinHigh" , 200 , " upper limit of ptbins in MC QA plots" };
9095 Configurable<bool > cfgRecHistograms{" cfgRecHistograms" , false , " Enables Reconstructed histograms" };
9196 Configurable<bool > cfgDataHistograms{" cfgDataHistograms" , false , " Enables Data histograms" };
9297 Configurable<std::string> cfgTriggerMasks{" cfgTriggerMasks" , " " , " possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL" };
@@ -101,6 +106,9 @@ struct statPromptPhoton {
101106 std::vector<double > ptBinning = {0.0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.2 , 1.4 , 1.6 , 1.8 , 2.0 , 2.5 , 3.0 , 4.0 , 5.0 , 6.0 , 8.0 , 12.0 , 16.0 , 20.0 , 25.0 , 30.0 , 40.0 , 50.0 , 75.0 , 100.0 , 150.0 , 200.0 , 300.0 , 500.0 };
102107 AxisSpec pthadAxis = {ptBinning, " #it{p}_{T}^{had sum} [GeV/c]" };
103108
109+ const AxisSpec MCptAxis = {cfgMCptNbins, cfgMCptbinLow, cfgMCptbinHigh};
110+
111+
104112 triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits (cfgTriggerMasks);
105113 if (cfgJETracks) {
106114 trackFilter = jetderiveddatautilities::initialiseTrackSelection (static_cast <std::string>(cfgTrackFilter));
@@ -184,48 +192,48 @@ struct statPromptPhoton {
184192 histos.add (" REC_dR_Stern" , " REC_dR_Stern" , kTH1F , {{628 , 0.0 , 2 * TMath::Pi ()}});
185193 histos.add (" REC_prompt_phiQA" , " REC_prompt_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
186194 histos.add (" REC_prompt_etaQA" , " REC_prompt_etaQA" , kTH1F , {{100 , -1 , 1 }});
187- histos.add (" REC_prompt_ptQA" , " REC_prompt_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
195+ histos.add (" REC_prompt_ptQA" , " REC_prompt_ptQA" , kTH1F , {MCptAxis });
188196 histos.add (" REC_decay_phiQA" , " REC_decay_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
189197 histos.add (" REC_decay_etaQA" , " REC_decay_etaQA" , kTH1F , {{100 , -1 , 1 }});
190- histos.add (" REC_decay_ptQA" , " REC_decay_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
198+ histos.add (" REC_decay_ptQA" , " REC_decay_ptQA" , kTH1F , {MCptAxis });
191199 histos.add (" REC_frag_phiQA" , " REC_frag_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
192200 histos.add (" REC_frag_etaQA" , " REC_frag_etaQA" , kTH1F , {{100 , -1 , 1 }});
193- histos.add (" REC_frag_ptQA" , " REC_frag_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
201+ histos.add (" REC_frag_ptQA" , " REC_frag_ptQA" , kTH1F , {MCptAxis });
194202 histos.add (" REC_direct_phiQA" , " REC_direct_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
195203 histos.add (" REC_direct_etaQA" , " REC_direct_etaQA" , kTH1F , {{100 , -1 , 1 }});
196- histos.add (" REC_direct_ptQA" , " REC_direct_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
204+ histos.add (" REC_direct_ptQA" , " REC_direct_ptQA" , kTH1F , {MCptAxis });
197205 histos.add (" REC_cluster_phiQA" , " REC_cluster_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
198206 histos.add (" REC_cluster_etaQA" , " REC_cluster_etaQA" , kTH1F , {{100 , -1 , 1 }});
199- histos.add (" REC_cluster_energyQA" , " REC_cluster_energyQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
207+ histos.add (" REC_cluster_energyQA" , " REC_cluster_energyQA" , kTH1F , {MCptAxis });
200208 histos.add (" REC_clusteriso_phiQA" , " REC_clusteriso_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
201209 histos.add (" REC_clusteriso_etaQA" , " REC_clusteriso_etaQA" , kTH1F , {{100 , -1 , 1 }});
202- histos.add (" REC_clusteriso_energyQA" , " REC_clusteriso_energyQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
210+ histos.add (" REC_clusteriso_energyQA" , " REC_clusteriso_energyQA" , kTH1F , {MCptAxis });
203211 histos.add (" REC_track_phiQA" , " REC_track_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
204212 histos.add (" REC_track_etaQA" , " REC_track_etaQA" , kTH1F , {{100 , -1 , 1 }});
205- histos.add (" REC_track_ptQA" , " REC_track_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
213+ histos.add (" REC_track_ptQA" , " REC_track_ptQA" , kTH1F , {MCptAxis });
206214 histos.add (" REC_cluster_direct_phiQA" , " REC_cluster_direct_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
207215 histos.add (" REC_cluster_direct_etaQA" , " REC_cluster_direct_etaQA" , kTH1F , {{100 , -1 , 1 }});
208- histos.add (" REC_cluster_direct_energyQA" , " REC_cluster_direct_energyQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
216+ histos.add (" REC_cluster_direct_energyQA" , " REC_cluster_direct_energyQA" , kTH1F , {MCptAxis });
209217 histos.add (" REC_cluster_frag_phiQA" , " REC_cluster_frag_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
210218 histos.add (" REC_cluster_frag_etaQA" , " REC_cluster_frag_etaQA" , kTH1F , {{100 , -1 , 1 }});
211- histos.add (" REC_cluster_frag_energyQA" , " REC_cluster_frag_energyQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
219+ histos.add (" REC_cluster_frag_energyQA" , " REC_cluster_frag_energyQA" , kTH1F , {MCptAxis });
212220 histos.add (" REC_cluster_both_phiQA" , " REC_cluster_both_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
213221 histos.add (" REC_cluster_both_etaQA" , " REC_cluster_both_etaQA" , kTH1F , {{100 , -1 , 1 }});
214- histos.add (" REC_cluster_both_energyQA" , " REC_cluster_both_energyQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
222+ histos.add (" REC_cluster_both_energyQA" , " REC_cluster_both_energyQA" , kTH1F , {MCptAxis });
215223 }
216224 if (cfgGenHistograms) {
217225 histos.add (" GEN_prompt_phiQA" , " GEN_prompt_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
218226 histos.add (" GEN_prompt_etaQA" , " GEN_prompt_etaQA" , kTH1F , {{100 , -1 , 1 }});
219- histos.add (" GEN_prompt_ptQA" , " GEN_prompt_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
227+ histos.add (" GEN_prompt_ptQA" , " GEN_prompt_ptQA" , kTH1F , {MCptAxis });
220228 histos.add (" GEN_decay_phiQA" , " GEN_decay_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
221229 histos.add (" GEN_decay_etaQA" , " GEN_decay_etaQA" , kTH1F , {{100 , -1 , 1 }});
222- histos.add (" GEN_decay_ptQA" , " GEN_decay_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
230+ histos.add (" GEN_decay_ptQA" , " GEN_decay_ptQA" , kTH1F , {MCptAxis });
223231 histos.add (" GEN_frag_phiQA" , " GEN_frag_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
224232 histos.add (" GEN_frag_etaQA" , " GEN_frag_etaQA" , kTH1F , {{100 , -1 , 1 }});
225- histos.add (" GEN_frag_ptQA" , " GEN_frag_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
233+ histos.add (" GEN_frag_ptQA" , " GEN_frag_ptQA" , kTH1F , {MCptAxis });
226234 histos.add (" GEN_direct_phiQA" , " GEN_direct_phiQA" , kTH1F , {{640 * 2 , 0 , 2 * TMath::Pi ()}});
227235 histos.add (" GEN_direct_etaQA" , " GEN_direct_etaQA" , kTH1F , {{100 , -1 , 1 }});
228- histos.add (" GEN_direct_ptQA" , " GEN_direct_ptQA" , kTH1F , {{ 82 , - 1.0 , 40.0 } });
236+ histos.add (" GEN_direct_ptQA" , " GEN_direct_ptQA" , kTH1F , {MCptAxis });
229237 histos.add (" GEN_nEvents" , " GEN_nEvents" , kTH1F , {{4 , 0.0 , 4.0 }});
230238 histos.add (" GEN_nEvents_simple" , " GEN_nEvents" , kTH1F , {{4 , 0.0 , 4.0 }});
231239 histos.add (" GEN_True_Trigger_Energy" , " GEN_True_Trigger_Energy" , kTH1F , {{82 , -1.0 , 40.0 }});
@@ -1513,6 +1521,16 @@ struct statPromptPhoton {
15131521 continue ;
15141522 if (std::fabs (mcParticle.getGenStatusCode ()) >= 81 || !mcParticle.isPhysicalPrimary ())
15151523 continue ;
1524+ if (cfgReqRecPS_GEN){
1525+ if (std::fabs (mcParticle.eta ())>0.62 )
1526+ continue ;
1527+ bool insideCalPhi = false ;
1528+ if ((mcParticle.phi ()> 1.42 && mcParticle.phi ()<3.26 ) || (mcParticle.phi ()> 4.56 && mcParticle.phi ()<5.70 ))
1529+ insideCalPhi=true ;
1530+ if (!insideCalPhi)
1531+ continue ;
1532+ }
1533+
15161534
15171535 // Chase this final-state photon upward
15181536 int chaseindex = -1 ;
@@ -1628,8 +1646,17 @@ struct statPromptPhoton {
16281646 if (clusterparticle.getGenStatusCode () < 0 )
16291647 continue ;
16301648 if (std::fabs (clusterparticle.getGenStatusCode ()) >= 81 )
1631- continue ;
1632-
1649+ continue ;
1650+ if (cfgReqRecPS_REC){
1651+ if (std::fabs (clusterparticle.eta ())>0.62 )
1652+ continue ;
1653+ bool insideCalPhi = false ;
1654+ if ((clusterparticle.phi ()> 1.42 && clusterparticle.phi ()<3.26 ) || (clusterparticle.phi ()> 4.56 && clusterparticle.phi ()<5.70 ))
1655+ insideCalPhi=true ;
1656+ if (!insideCalPhi)
1657+ continue ;
1658+ }
1659+
16331660 int chaseindex = -1 ;
16341661 for (auto & mom : clusterparticle.mothers_as <aod::JMcParticles>()) {
16351662 chaseindex = mom.globalIndex ();
0 commit comments