ATLAS Offline Software
EgammaPhysValMonitoringTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // EgammaPhysValMonitoringTool.h
8 // Header file for class EgammaPhysValMonitoringTool
9 // Author:
11 #ifndef EGAMMAPHYSVALMONITORING_EGAMMAPHYVALMONITORINGTOOL_H
12 #define EGAMMAPHYSVALMONITORING_EGAMMAPHYVALMONITORINGTOOL_H 1
13 
14 // STL includes
15 #include <string>
16 
17 // FrameWork includes
18 #include "GaudiKernel/ServiceHandle.h"
19 
20 // Local includes
22 
23 // Root includes
26 #include "PhotonValidationPlots.h"
28 #include "xAODEgamma/Photon.h"
30 #include "xAODEgamma/Electron.h"
31 #include "xAODEgamma/Egamma.h"
33 
37 
39 
41 
42 #include "CLHEP/Units/SystemOfUnits.h"
44 
46 
47 class IMCTruthClassifier;
48 namespace EgammaPhysValMonitoring {
49 
50 
52  : public ManagedMonitorToolBase
53 {
55  // Public methods:
57  public:
58 
59  // Copy constructor:
60 
62  EgammaPhysValMonitoringTool( const std::string& type,
63  const std::string& name,
64  const IInterface* parent );
65 
67  virtual ~EgammaPhysValMonitoringTool() = default;
68 
69  // Athena algtool's Hooks
70  virtual StatusCode initialize();
71  virtual StatusCode bookHistograms();
72  virtual StatusCode fillHistograms();
73  virtual StatusCode procHistograms();
74 
76  // Private data:
78  private:
79 
82 
83  StatusCode fillRecoElecHistograms(const xAOD::TruthParticleContainer* truthParticles, const xAOD::EventInfo* eventInfo);
84  StatusCode fillRecoFrwdElecHistograms(const xAOD::TruthParticleContainer* truthParticles, const xAOD::EventInfo* eventInfo);
85  StatusCode fillRecoPhotHistograms(const xAOD::TruthParticleContainer* truthParticles, const xAOD::EventInfo* eventInfo);
86  StatusCode fillLRTElecHistograms(const xAOD::TruthParticleContainer* truthParticles, const xAOD::EventInfo* eventInfo);
87 
88  static const xAOD::TruthParticle* Match(const xAOD::Egamma* particle, int pdg,
89  const xAOD::TruthParticleContainer* truthParticles) ;
90 
91 
92  // Containers
93  SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoContainerKey {this,
94  "EventInfoContainerName", "EventInfo", "Input event information container"};
95  SG::ReadHandleKey<xAOD::PhotonContainer> m_photonContainerKey {this,
96  "PhotonContainerName", "Photons", "Input photon container"};
97  SG::ReadHandleKey<xAOD::ElectronContainer> m_electronContainerKey {this,
98  "ElectronContainerName", "Electrons", "Input electron container"};
99  SG::ReadHandleKey<xAOD::ElectronContainer> m_lrtelectronContainerKey {this,
100  "LRTElectronContainerName", "", "Input LRT electron container"};
101  SG::ReadHandleKey<xAOD::ElectronContainer> m_electronContainerFrwdKey {this,
102  "ElectronContainerFrwdName", "ForwardElectrons", "Input forward electron container"};
103  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleContainerKey {this,
104  "TruthParticleContainerName", "TruthParticles", "Input global truth particles"};
105  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_egammaTruthContainerKey {this,
106  "EgammaTruthContainerName", "egammaTruthParticles", "Input egamma truth particles"};
107 
108  Gaudi::Property<bool> m_isMC {this, "isMC", false, "Should be set from file peeking"};
109 
110  // Hists
114 
115  ToolHandle<IMCTruthClassifier> m_truthClassifier {this,
116  "MCTruthClassifier", "EMMCTruthClassifier", "Handle of MCTruthClassifier"};
117 
118  ToolHandle<IAsgElectronLikelihoodTool> m_Electron_VeryLooseNoPix_LLHTool{
119  this,
120  "ElectronLHSelectorVeryLooseNoPix", // Name of the configurable argument
121  "AsgElectronLikelihoodTool/ElectronLHSelectorVeryLooseNoPix", // Default instance of the tool, of the form ToolClass/ToolName
122  "Electron Likelihood Selector VeryLooseNoPix" // Description
123  };
124 
125  ToolHandle<IAsgElectronLikelihoodTool> m_Electron_LooseNoPix_LLHTool{
126  this,
127  "ElectronLHSelectorLooseNoPix", // Name of the configurable argument
128  "AsgElectronLikelihoodTool/ElectronLHSelectorLooseNoPix", // Default instance of the tool, of the form ToolClass/ToolName
129  "Electron Likelihood Selector LooseNoPix" // Description
130  };
131 
132  ToolHandle<IAsgElectronLikelihoodTool> m_Electron_MediumNoPix_LLHTool{
133  this,
134  "ElectronLHSelectorMediumNoPix", // Name of the configurable argument
135  "AsgElectronLikelihoodTool/ElectronLHSelectorMediumNoPix", // Default instance of the tool, of the form ToolClass/ToolName
136  "Electron Likelihood Selector Medium" // Description
137  };
138 
139  ToolHandle<IAsgElectronLikelihoodTool> m_Electron_TightNoPix_LLHTool{
140  this,
141  "ElectronLHSelectorTightNoPix", // Name of the configurable argument
142  "AsgElectronLikelihoodTool/ElectronLHSelectorTightNoPix", // Default instance of the tool, of the form ToolClass/ToolName
143  "Electron Likelihood Selector Tight" // Description
144  };
145 
146  // Aux accessor
151 
152 };
153 
154 }
155 
156 #endif //> !EGAMMAPHYSVALMONITORING_EGAMMAPHYVALMONITORINGTOOL_H
157 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_MediumNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_MediumNoPix
Definition: EgammaPhysValMonitoringTool.h:149
ElectronValidationPlots.h
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
PhotonValidationPlots.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
initialize
void initialize()
Definition: run_EoverP.cxx:894
TruthParticleContainer.h
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::EgammaPhysValMonitoringTool
EgammaPhysValMonitoringTool()=delete
Default constructor:
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
EgammaAuxContainer.h
SG::ReadHandleKey< xAOD::EventInfo >
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::~EgammaPhysValMonitoringTool
virtual ~EgammaPhysValMonitoringTool()=default
Destructor:
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oPhotonValidationPlots
PhotonValidationPlots m_oPhotonValidationPlots
Definition: EgammaPhysValMonitoringTool.h:112
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
TruthParticleAuxContainer.h
Egamma.h
ManagedMonitorToolBase.h
IAsgElectronLikelihoodTool.h
ElectronContainer.h
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
PhotonValidationPlots
Definition: PhotonValidationPlots.h:19
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
LRTElectronValidationPlots
Definition: LRTElectronValidationPlots.h:19
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oLRTElectronValidationPlots
LRTElectronValidationPlots m_oLRTElectronValidationPlots
Definition: EgammaPhysValMonitoringTool.h:113
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_acc_electronLLH_TightNoPix
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_TightNoPix
Definition: EgammaPhysValMonitoringTool.h:150
ElectronValidationPlots
Definition: ElectronValidationPlots.h:19
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool
Definition: EgammaPhysValMonitoringTool.h:53
EgammaPhysValMonitoring::EgammaPhysValMonitoringTool::m_oElectronValidationPlots
ElectronValidationPlots m_oElectronValidationPlots
Definition: EgammaPhysValMonitoringTool.h:111
IMCTruthClassifier
Definition: IMCTruthClassifier.h:103
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
LRTElectronValidationPlots.h
EgammaPhysValMonitoring
Definition: EgammaPhysValMonitoringTool.cxx:41
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Electron.h
TruthParticle.h
checker_macros.h
Define macros for attributes used to control the static checker.
PhotonContainer.h