ATLAS Offline Software
EgammaPhysValMonitoringTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // EgammaPhysValMonitoringTool.cxx
6 // Implementation file for class EgammaPhysValMonitoringTool
7 // Author:
9 
10 // PhysVal includes
12 
13 // STL includes
14 #include <vector>
15 
16 // FrameWork includes
17 #include "GaudiKernel/IToolSvc.h"
19 #include "xAODEgamma/EgammaEnums.h"
20 #include "xAODEgamma/EgammaDefs.h"
25 
29 
30 #include "StoreGate/ReadHandle.h"
32 
34 
35 using CLHEP::GeV;
36 using namespace std;
37 using namespace MCTruthPartClassifier;
38 
40 
42 // Public methods:
44 
45 // Constructors
47 
48 EgammaPhysValMonitoringTool::EgammaPhysValMonitoringTool( const std::string& type,
49  const std::string& name,
50  const IInterface* parent ):
52  m_oElectronValidationPlots(nullptr, "Electron/"),
53  m_oPhotonValidationPlots(nullptr, "Photon/"),
54  m_oLRTElectronValidationPlots(nullptr, "LRTElectron/"),
55  m_acc_electronLLH_VeryLooseNoPix("DFCommonElectronsLHVeryLooseNoPix"),
56  m_acc_electronLLH_LooseNoPix("DFCommonElectronsLHLooseNoPix"),
57  m_acc_electronLLH_MediumNoPix("DFCommonElectronsLHMediumNoPix"),
58  m_acc_electronLLH_TightNoPix("DFCommonElectronsLHTightNoPix")
59 {
60 }
61 
62 // Athena algtool's Hooks
65 {
66  ATH_MSG_INFO("Initializing " << name() << "...");
67  ATH_MSG_INFO("using OQ quality cuts: " << m_useOQQuality);
69  ATH_CHECK(m_truthClassifier.retrieve());
75  ATH_CHECK(m_photonContainerKey.initialize());
81 
82  return StatusCode::SUCCESS;
83 }
84 
86 {
87  ATH_MSG_INFO ("Booking hists " << name() << "...");
88 
91  for (auto &hist : hists){
92  ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
93  ATH_CHECK(regHist(hist.first,hist.second,all));
94  }
95 
98  for (auto &hist : hists){
99  ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
100  ATH_CHECK(regHist(hist.first,hist.second,all));
101  }
102 
105  for (auto &hist : hists){
106  ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
107  ATH_CHECK(regHist(hist.first,hist.second,all));
108  }
109 
110  return StatusCode::SUCCESS;
111 }
112 
113 
115 {
116  ATH_MSG_DEBUG("Filling hists " << name() << "...");
117 
118  const EventContext& ctx = Gaudi::Hive::currentContext();
120  ATH_CHECK(eventInfo.isValid());
121 
122  float weight = eventInfo->beamSpotWeight();
123 
124  if (m_isMC) {
127 
128  // filling truth iso (prompt) particles from egammaTruthParticles container
129  // (containing only iso particles)
130  // validity check is only really needed for serial running. Remove when MT
131  // is only way.
132  ATH_CHECK(truthParticles.isValid());
133 
134  for (const auto* const truthParticle : *truthParticles) {
135 
136  //--electrons
137  if (std::abs(truthParticle->pdgId()) == 11 &&
138  MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
140  *eventInfo);
141  } //-- end electrons
142 
143  //--photons
144  if (std::abs(truthParticle->pdgId()) == 22 &&
145  MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
147  *eventInfo);
148  //-- filling conversions
149  const xAOD::TruthParticle* tmp =
150  xAOD::TruthHelpers::getTruthParticle(*truthParticle); // 20.7.0.1
151  bool isTrueConv = false;
152  float trueR = -999;
153  float truthEta = -999;
154  if (tmp && tmp->hasDecayVtx()) {
155  float x = tmp->decayVtx()->x();
156  float y = tmp->decayVtx()->y();
157  trueR = std::sqrt(x * x + y * y);
158  }
159 
160  if (tmp != nullptr) {
161  truthEta = tmp->eta();
162  isTrueConv = xAOD::EgammaHelpers::isTrueConvertedPhoton(tmp); // rel20
163  }
164 
167  if (isTrueConv)
169  *eventInfo);
170  if (!isTrueConv)
172  *eventInfo);
173 
174  const xAOD::Photon* recoPhoton =
175  xAOD::EgammaHelpers::getRecoPhoton(truthParticle);
176  if (recoPhoton) {
179  trueR, truthEta, weight);
180 
182  *eventInfo);
183  if (isTrueConv) {
185  *eventInfo);
186  } else {
188  *eventInfo);
189  }
190  bool val_loose = false;
191  recoPhoton->passSelection(val_loose, "Loose");
192  if (val_loose) {
194  *eventInfo);
195  if (isTrueConv) {
197  *truthParticle, *eventInfo);
198  } else {
200  *truthParticle, *eventInfo);
201  }
202  } //-- end truth loose
203  bool val_tight = false;
204  recoPhoton->passSelection(val_tight, "Tight");
205  if (val_tight) {
207  *eventInfo);
208  if (isTrueConv) {
210  *truthParticle, *eventInfo);
211  } else {
213  *truthParticle, *eventInfo);
214  }
215  } //-- end truth tight
216  } //-- end recoPhoton
217  } //-- end Photons
218  } // -- end fill histos iso particles
219 
220  //---------Electrons----------------------
221  if (!fillRecoElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
222  ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
223  << "...");
224  return StatusCode::FAILURE;
225  }
226 
227  //---------LRTElectrons----------------------
229  if (!fillLRTElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
230  ATH_MSG_ERROR("Filling lrt elecectron hists failed " << name() << "...");
231  return StatusCode::FAILURE;
232  }
233  }
234 
235  //---------Frwd Electrons----------------------
236  if (!fillRecoFrwdElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
237  ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
238  << "...");
239  return StatusCode::FAILURE;
240  }
241  //----------Photons
242  if (!fillRecoPhotHistograms(truthParticles.ptr(), eventInfo.ptr())) {
243  ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
244  return StatusCode::FAILURE;
245  }
246  } else // end is MC / code using truth particles
247  {//---------Electrons----------------------
248  if (!fillRecoElecHistograms(nullptr, eventInfo.ptr())) {
249  ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
250  << "...");
251  return StatusCode::FAILURE;
252  }
253  //---------Frwd Electrons----------------------
254  if (!fillRecoFrwdElecHistograms(nullptr, eventInfo.ptr())) {
255  ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
256  << "...");
257  return StatusCode::FAILURE;
258  }
259  //----------Photons
260  if (!fillRecoPhotHistograms(nullptr, eventInfo.ptr())) {
261  ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
262  return StatusCode::FAILURE;
263  }
264 
265  }
266 
267 
268 
269  return StatusCode::SUCCESS;
270 }
271 
273 {
274  ATH_MSG_DEBUG ("Filling reco electron hists " << name() << "...");
275 
276  const EventContext& ctx = Gaudi::Hive::currentContext();
278  ATH_CHECK(Electrons.isValid());
279 
280  int numofele=0;
281 
282  float weight = eventInfo->beamSpotWeight();
283 
284  for(const auto *const electron : *Electrons){
285  bool isElecPrompt=false;
286 
287  if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
288 
291 
292  if(!m_isMC) m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
293  else {
294  static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
295  if(truthTypeAcc.isAvailable (*electron)) {
297  if(type==MCTruthPartClassifier::IsoElectron) {
298  isElecPrompt=true;
299  //fill energy scale
300  const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
301  if(thePart) {
302  float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
303  m_oElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
304  m_oElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
305  if (thePart->pt()/GeV>20.) {
306  m_oElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
307  m_oElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
308  m_oElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
309  m_oElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
310  }
311  m_oElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
312  } else {
313  ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
314  }
315  }
316 
317  } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
318 
319  m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
320  }
321  }
324 
325  return StatusCode::SUCCESS;
326 }
327 
329 {
330  ATH_MSG_DEBUG ("Filling lrt electron hists " << name() << "...");
331 
332  const EventContext& ctx = Gaudi::Hive::currentContext();
334  ATH_CHECK(LRTElectrons.isValid());
335 
336  int numofele=0;
337 
338  float weight = eventInfo->beamSpotWeight();
339 
340  for(const auto *const electron : *LRTElectrons){
341  bool isElecPrompt=false;
342 
343  if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
344 
345  // Retrieve electron ID, compute on-the-fly if decoration is missing (for AODs)
346  bool pass_LHVeryLooseNoPix = false;
347  if (m_acc_electronLLH_VeryLooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHVeryLooseNoPix, "DFCommonElectronsLHVeryLooseNoPix");
348  else pass_LHVeryLooseNoPix = static_cast<bool>(m_Electron_VeryLooseNoPix_LLHTool->accept(electron));
349 
350  bool pass_LHLooseNoPix = false;
351  if (m_acc_electronLLH_LooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHLooseNoPix, "DFCommonElectronsLHLooseNoPix");
352  else pass_LHLooseNoPix = static_cast<bool>(m_Electron_LooseNoPix_LLHTool->accept(electron));
353 
354  bool pass_LHMediumNoPix = false;
355  if (m_acc_electronLLH_MediumNoPix.isAvailable(*electron)) electron->passSelection(pass_LHMediumNoPix, "DFCommonElectronsLHMediumNoPix");
356  else pass_LHMediumNoPix = static_cast<bool>(m_Electron_MediumNoPix_LLHTool->accept(electron));
357 
358  bool pass_LHTightNoPix = false;
359  if (m_acc_electronLLH_TightNoPix.isAvailable(*electron)) electron->passSelection(pass_LHTightNoPix, "DFCommonElectronsLHTightNoPix");
360  else pass_LHTightNoPix = static_cast<bool>(m_Electron_TightNoPix_LLHTool->accept(electron));
361 
362  static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
363  if(truthTypeAcc.isAvailable(*electron)) {
365  if(type==MCTruthPartClassifier::IsoElectron) {
366  isElecPrompt=true;
367  //fill energy scale
368  const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
369  if(thePart) {
370  float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
371  m_oLRTElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
372  m_oLRTElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
373  if (thePart->pt()/GeV>20.) {
374  m_oLRTElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
375  m_oLRTElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
378  }
379  m_oLRTElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
380  }else {
381  ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
382  }
383  }
384  } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
385 
386 
387  m_oLRTElectronValidationPlots.fill(*electron,*eventInfo, isElecPrompt, pass_LHVeryLooseNoPix, pass_LHLooseNoPix, pass_LHMediumNoPix, pass_LHTightNoPix);
390 
391  }
392 
395 
396  return StatusCode::SUCCESS;
397 }
398 
400 {
401  ATH_MSG_DEBUG ("Filling reco frwd electron hists " << name() << "...");
402 
403  const EventContext& ctx = Gaudi::Hive::currentContext();
405  ATH_CHECK(ElectronsFrwd.isValid());
406 
407  int numoffrwdele=0;
408  float weight = eventInfo->beamSpotWeight();
409 
410  for(const auto *const frwdelectron : *ElectronsFrwd){
411  if(!(frwdelectron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
412  bool isElecPrompt=false;
413  if (m_isMC) {
414  if((Match(frwdelectron,11, truthParticles)!=nullptr )) isElecPrompt=true;
415  }
416  m_oElectronValidationPlots.fill(*frwdelectron,*eventInfo,isElecPrompt);
417  numoffrwdele++;
418  isElecPrompt=false;
419  }
420 
423 
424  return StatusCode::SUCCESS;
425 }
426 
428 {
429  ATH_MSG_DEBUG ("Filling reco photon hists " << name() << "...");
430 
431  const EventContext& ctx = Gaudi::Hive::currentContext();
433  ATH_CHECK(Photons.isValid());
434 
435  int numofPhot=0;
436  int numofAmb=0;
437  int numPhotAll=0;
438  int numofCnv=0;
439  float weight = eventInfo->beamSpotWeight();
440 
441  for(const auto *photon : *Photons){
442  bool isPhotPrompt=false;
443  if (photon->author()&xAOD::EgammaParameters::AuthorCaloTopo35) continue;//21.0.>7
444  if(!(photon->isGoodOQ (xAOD::EgammaParameters::BADCLUSPHOTON))) continue;
445  if (m_useOQQuality) {
446  if (!PhotonHelpers::passOQquality(*photon)) continue;
447  }
448 
449  if(photon->author()) numofPhot++;
450  else if(photon->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofAmb++;
452  if(!m_isMC) m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
453  else {
454  static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
455  if(truthTypeAcc.isAvailable(*photon)) {
458  isPhotPrompt=true;
459  //fill energy scale
460  const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*photon);//20.7.X.Y.I
461  // const xAOD::TruthParticle* thePart = xAOD::EgammaHelpers::getTruthParticle(photon);
462  if(thePart&&thePart->pt()/GeV>20.) {
463  float EtLin = (photon->pt()-thePart->pt())/thePart->pt();
464  m_oPhotonValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
465  m_oPhotonValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
466  if (std::abs(EtLin)<0.2){
467  m_oPhotonValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
468  m_oPhotonValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
469  }
470  }else {
471  ATH_MSG_INFO("Truth particle associated not in egamma truth collection");
472  }
473  }
474 
475  } else if(m_isMC){if(Match(photon,22, truthParticles)!=nullptr ) isPhotPrompt=true;}
476 
477  m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
478 
479  }
480  }
481  numPhotAll = numofPhot+numofAmb;
486 
491 
492 
493  return StatusCode::SUCCESS;
494 }
495 
497  {
498  ATH_MSG_INFO ("Finalising hists " << name() << "...");
501  return StatusCode::SUCCESS;
502  }
503 
505  int pdg,
506  const xAOD::TruthParticleContainer* truthParticles) {
507  float currentdr = 0.05;
508  const xAOD::TruthParticle* matchedTruthParticle = nullptr;
509  if (truthParticles){
510  for (const auto *truthParticle: *truthParticles){
511  if (std::abs(truthParticle->pdgId()) != pdg || !MC::isStable(truthParticle)) continue;
512  float dr = particle->p4().DeltaR(truthParticle->p4());
513  if (dr < currentdr){
514  currentdr = dr;
515  matchedTruthParticle = truthParticle;
516  }
517  }
518  }
519  return matchedTruthParticle;
520 }
521 
522 
523 }
524 
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_MediumNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_MediumNoPix
Definition: EgammaPhysValMonitoringTool.h:149
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::fillRecoPhotHistograms
StatusCode fillRecoPhotHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
Definition: EgammaPhysValMonitoringTool.cxx:427
Egamma::LRTElectronPlots::nParticles_weighted
TH1 * nParticles_weighted
Definition: LRTElectronPlots.h:98
LRTElectronValidationPlots::res_eta
TProfile * res_eta
Definition: LRTElectronValidationPlots.h:30
IsoPhoton
@ IsoPhoton
Definition: TruthClasses.h:23
PhotonValidationPlots::convTruthMatchedRvsEta
TH2 * convTruthMatchedRvsEta
Definition: PhotonValidationPlots.h:48
Egamma::ElectronFrwdPlots::nParticles
TH1 * nParticles
Definition: ElectronFrwdPlots.h:33
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
xAOD::EgammaHelpers::getRecoPhoton
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
Definition: EgammaTruthxAODHelpers.cxx:54
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
ElectronValidationPlots::res_eta_cut
TProfile * res_eta_cut
Definition: ElectronValidationPlots.h:34
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_useOQQuality
Gaudi::Property< bool > m_useOQQuality
Definition: EgammaPhysValMonitoringTool.h:152
PhotonHelpers.h
AthCheckMacros.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_electronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainerKey
Definition: EgammaPhysValMonitoringTool.h:97
PhotonValidationPlots::m_oTruthRecoPlots
Egamma::KinematicsPlots m_oTruthRecoPlots
Definition: PhotonValidationPlots.h:31
PhotonValidationPlots::res_eta_cut
TProfile * res_eta_cut
Definition: PhotonValidationPlots.h:52
PhotonValidationPlots::m_oTruthRecoLooseConvPlots
Egamma::KinematicsPlots m_oTruthRecoLooseConvPlots
Definition: PhotonValidationPlots.h:35
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
LRTElectronValidationPlots::res_et_cut_pt_20
TProfile * res_et_cut_pt_20
Definition: LRTElectronValidationPlots.h:33
EgammaPhysValMonitoringTool.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_Electron_LooseNoPix_LLHTool
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_LooseNoPix_LLHTool
Definition: EgammaPhysValMonitoringTool.h:125
plotmaker.hist
hist
Definition: plotmaker.py:148
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: EgammaPhysValMonitoringTool.cxx:85
Egamma::ElectronFrwdPlots::nParticles_weighted
TH1 * nParticles_weighted
Definition: ElectronFrwdPlots.h:34
Egamma::LRTElectronPlots::nParticles
TH1 * nParticles
Definition: LRTElectronPlots.h:97
ElectronValidationPlots::matrix
TH2 * matrix
Definition: ElectronValidationPlots.h:37
Egamma::ElectronPlots::nParticles_weighted
TH1 * nParticles_weighted
Definition: ElectronPlots.h:76
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_Electron_TightNoPix_LLHTool
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_TightNoPix_LLHTool
Definition: EgammaPhysValMonitoringTool.h:139
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
xAOD::EgammaParameters::BADCLUSELECTRON
const uint32_t BADCLUSELECTRON
Definition: EgammaDefs.h:116
SG::ConstAccessor< int >
MCTruthClassifier.h
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:111
Egamma::PhotonCnvPlots::m_nParticles
TH1 * m_nParticles
Definition: PhotonCnvPlots.h:29
Egamma::PhotonAmbPlots::m_nParticles
TH1 * m_nParticles
Definition: PhotonAmbPlots.h:28
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_EventInfoContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoContainerKey
Definition: EgammaPhysValMonitoringTool.h:93
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oPhotonValidationPlots
PhotonValidationPlots m_oPhotonValidationPlots
Definition: EgammaPhysValMonitoringTool.h:112
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_lrtelectronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_lrtelectronContainerKey
Definition: EgammaPhysValMonitoringTool.h:99
xAODTruthHelpers.h
x
#define x
PhotonValidationPlots::convTruthMatchedR
TH1 * convTruthMatchedR
Definition: PhotonValidationPlots.h:46
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::fillLRTElecHistograms
StatusCode fillLRTElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
Definition: EgammaPhysValMonitoringTool.cxx:328
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
LRTElectronValidationPlots::matrix
TH2 * matrix
Definition: LRTElectronValidationPlots.h:35
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_LooseNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_LooseNoPix
Definition: EgammaPhysValMonitoringTool.h:148
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_VeryLooseNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_VeryLooseNoPix
Definition: EgammaPhysValMonitoringTool.h:147
Egamma::PhotonCnvPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition: PhotonCnvPlots.h:30
LRTElectronValidationPlots::res_eta_cut
TProfile * res_eta_cut
Definition: LRTElectronValidationPlots.h:32
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:190
LRTElectronValidationPlots::m_oCentralElecPlots
Egamma::LRTElectronPlots m_oCentralElecPlots
Definition: LRTElectronValidationPlots.h:26
Egamma::PhotonPlots::m_nParticles
TH1 * m_nParticles
Definition: PhotonPlots.h:41
ElectronValidationPlots::res_et_cut_pt_20
TProfile * res_et_cut_pt_20
Definition: ElectronValidationPlots.h:35
PhotonValidationPlots::m_oTruthRecoLoosePlots
Egamma::KinematicsPlots m_oTruthRecoLoosePlots
Definition: PhotonValidationPlots.h:34
PhotonHelpers::passOQquality
bool passOQquality(const xAOD::Photon &ph)
Helper to ease the implemmantation of the pass Quality requirements.
Definition: PhotonHelpers.cxx:12
MCTruthClassifierDefs.h
EgammaxAODHelpers.h
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_Electron_VeryLooseNoPix_LLHTool
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_VeryLooseNoPix_LLHTool
Definition: EgammaPhysValMonitoringTool.h:118
PhotonValidationPlots::m_oAllPlots
Egamma::PhotonPlots m_oAllPlots
Definition: PhotonValidationPlots.h:27
PlotBase::retrieveBookedHistograms
std::vector< HistData > retrieveBookedHistograms()
Retrieve all booked histograms.
Definition: PlotBase.cxx:63
IMCTruthClassifier.h
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PlotBase::finalize
void finalize()
Definition: PlotBase.cxx:47
LRTElectronValidationPlots::res_eta_cut_pt_20
TProfile * res_eta_cut_pt_20
Definition: LRTElectronValidationPlots.h:34
PhotonValidationPlots::convTruthR
TH1 * convTruthR
Definition: PhotonValidationPlots.h:45
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:616
PhotonValidationPlots::m_oTruthRecoLooseUncPlots
Egamma::KinematicsPlots m_oTruthRecoLooseUncPlots
Definition: PhotonValidationPlots.h:36
PhotonValidationPlots::m_oTruthRecoTightConvPlots
Egamma::KinematicsPlots m_oTruthRecoTightConvPlots
Definition: PhotonValidationPlots.h:38
PhotonValidationPlots::m_oTruthRecoUncPlots
Egamma::KinematicsPlots m_oTruthRecoUncPlots
Definition: PhotonValidationPlots.h:33
PlotBase::initialize
void initialize()
Definition: PlotBase.cxx:39
xAOD::EgammaParameters::AuthorCaloTopo35
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
Definition: EgammaDefs.h:38
xAOD::EgammaParameters::AuthorAmbiguous
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition: EgammaDefs.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ElectronValidationPlots::fill
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: ElectronValidationPlots.cxx:37
PhotonValidationPlots::m_oTruthRecoTightPlots
Egamma::KinematicsPlots m_oTruthRecoTightPlots
Definition: PhotonValidationPlots.h:37
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::fillRecoFrwdElecHistograms
StatusCode fillRecoFrwdElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
Definition: EgammaPhysValMonitoringTool.cxx:399
PhotonValidationPlots::m_oAmbPhotPlots
Egamma::PhotonAmbPlots m_oAmbPhotPlots
Definition: PhotonValidationPlots.h:29
Egamma::PhotonAmbPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition: PhotonAmbPlots.h:29
LRTElectronValidationPlots::res_et
TProfile * res_et
Definition: LRTElectronValidationPlots.h:29
Egamma::PhotonPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition: PhotonPlots.h:42
ElectronValidationPlots::res_et_cut
TProfile * res_et_cut
Definition: ElectronValidationPlots.h:33
PhotonxAODHelpers.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::fillRecoElecHistograms
StatusCode fillRecoElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
Definition: EgammaPhysValMonitoringTool.cxx:272
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Egamma::ElectronPlots::nParticles
TH1 * nParticles
Definition: ElectronPlots.h:75
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
PhotonValidationPlots::res_eta
TProfile * res_eta
Definition: PhotonValidationPlots.h:50
PhotonValidationPlots::m_oTruthRecoTightUncPlots
Egamma::KinematicsPlots m_oTruthRecoTightUncPlots
Definition: PhotonValidationPlots.h:39
PhotonValidationPlots::m_oTruthRecoConvPlots
Egamma::KinematicsPlots m_oTruthRecoConvPlots
Definition: PhotonValidationPlots.h:32
Egamma::KinematicsPlots::fill
void fill(const xAOD::IParticle &part, const xAOD::EventInfo &eventInfo)
Definition: Reconstruction/egamma/EgammaPhysValMonitoring/src/KinematicsPlots.cxx:28
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ElectronValidationPlots::res_et
TProfile * res_et
Definition: ElectronValidationPlots.h:31
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oLRTElectronValidationPlots
LRTElectronValidationPlots m_oLRTElectronValidationPlots
Definition: EgammaPhysValMonitoringTool.h:113
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: EgammaPhysValMonitoringTool.cxx:114
xAOD::EgammaHelpers::isTrueConvertedPhoton
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
Definition: EgammaTruthxAODHelpers.cxx:69
PhotonValidationPlots::m_oTruthIsoPlots
Egamma::KinematicsPlots m_oTruthIsoPlots
Definition: PhotonValidationPlots.h:40
createDCubeDigitHistograms.truthEta
truthEta
Definition: createDCubeDigitHistograms.py:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::initialize
virtual StatusCode initialize()
Definition: EgammaPhysValMonitoringTool.cxx:64
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_TightNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_TightNoPix
Definition: EgammaPhysValMonitoringTool.h:150
PhotonValidationPlots::m_oTruthIsoConvPlots
Egamma::KinematicsPlots m_oTruthIsoConvPlots
Definition: PhotonValidationPlots.h:41
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::Match
static const xAOD::TruthParticle * Match(const xAOD::Egamma *particle, int pdg, const xAOD::TruthParticleContainer *truthParticles)
Definition: EgammaPhysValMonitoringTool.cxx:504
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_photonContainerKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonContainerKey
Definition: EgammaPhysValMonitoringTool.h:95
LRTElectronValidationPlots::res_et_cut
TProfile * res_et_cut
Definition: LRTElectronValidationPlots.h:31
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:169
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oElectronValidationPlots
ElectronValidationPlots m_oElectronValidationPlots
Definition: EgammaPhysValMonitoringTool.h:111
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_Electron_MediumNoPix_LLHTool
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_MediumNoPix_LLHTool
Definition: EgammaPhysValMonitoringTool.h:132
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
PhotonValidationPlots::m_oTruthIsoUncPlots
Egamma::KinematicsPlots m_oTruthIsoUncPlots
Definition: PhotonValidationPlots.h:42
SG::ReadHandle::ptr
const_pointer_type ptr()
Dereference the pointer.
EgammaEnums.h
xAOD::EgammaParameters::BADCLUSPHOTON
const uint32_t BADCLUSPHOTON
Definition: EgammaDefs.h:124
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:200
y
#define y
xAOD::Photon_v1
Definition: Photon_v1.h:37
MCTruthPartClassifier
Definition: TruthClassifiers.h:12
PhotonValidationPlots::convTruthRvsEta
TH2 * convTruthRvsEta
Definition: PhotonValidationPlots.h:47
EgammaPhysValMonitoring
Definition: EgammaPhysValMonitoringTool.cxx:39
ElectronValidationPlots::m_oFrwdElecPlots
Egamma::ElectronFrwdPlots m_oFrwdElecPlots
Definition: ElectronValidationPlots.h:27
ElectronValidationPlots::res_eta_cut_pt_20
TProfile * res_eta_cut_pt_20
Definition: ElectronValidationPlots.h:36
PhotonValidationPlots::m_oConvPhotPlots
Egamma::PhotonCnvPlots m_oConvPhotPlots
Definition: PhotonValidationPlots.h:30
EgammaDefs.h
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:115
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_truthClassifier
ToolHandle< IMCTruthClassifier > m_truthClassifier
Definition: EgammaPhysValMonitoringTool.h:115
ElectronValidationPlots::m_oCentralElecPlots
Egamma::ElectronPlots m_oCentralElecPlots
Definition: ElectronValidationPlots.h:26
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
ElectronValidationPlots::m_oTruthIsoPlots
Egamma::KinematicsPlots m_oTruthIsoPlots
Definition: ElectronValidationPlots.h:28
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_isMC
Gaudi::Property< bool > m_isMC
Definition: EgammaPhysValMonitoringTool.h:108
ReadHandle.h
Handle class for reading from StoreGate.
LRTElectronValidationPlots::fill
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt, bool pass_LHVeryLooseNoPix, bool pass_LHLooseNoPix, bool pass_LHMediumNoPix, bool pass_LHTightNoPix)
Definition: LRTElectronValidationPlots.cxx:41
HepMC::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Definition: MagicNumbers.h:357
ParticleType
ParticleType
Definition: TruthClasses.h:8
PhotonValidationPlots::m_oPhotPlots
Egamma::PhotonPlots m_oPhotPlots
Definition: PhotonValidationPlots.h:28
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: EgammaPhysValMonitoringTool.cxx:496
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1344
PhotonValidationPlots::res_et_cut
TProfile * res_et_cut
Definition: PhotonValidationPlots.h:51
HepMCHelpers.h
PhotonValidationPlots::res_et
TProfile * res_et
Definition: PhotonValidationPlots.h:49
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_electronContainerFrwdKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainerFrwdKey
Definition: EgammaPhysValMonitoringTool.h:101
xAOD::Egamma_v1::passSelection
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
xAOD::EgammaParameters::AuthorElectron
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
Definition: EgammaDefs.h:24
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_truthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
Definition: EgammaPhysValMonitoringTool.h:103
PhotonValidationPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonValidationPlots.cxx:50
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_egammaTruthContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_egammaTruthContainerKey
Definition: EgammaPhysValMonitoringTool.h:105
ElectronValidationPlots::res_eta
TProfile * res_eta
Definition: ElectronValidationPlots.h:32