ATLAS Offline Software
ElectronPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "ElectronPlots.h"
10 #include <iostream>
11 using namespace std;
12 using namespace MCTruthPartClassifier;
13 
14 namespace Egamma{
15 
16 ElectronPlots::ElectronPlots(PlotBase* pParent, const std::string& sDir,
17  const std::string& sParticleType):PlotBase(pParent, sDir),
18  m_oKinAllRecoPlots(this, "All/KinPlots/", "All Reco "+ sParticleType +" Electron"),
19  m_oShowerShapesAllRecoPlots(this, "All/ShowerShapesPlots/","All Reco "+ sParticleType +" Electron" ),
20  m_oIsolationAllRecoPlots(this, "All/IsolationPlots/", "All Reco "+ sParticleType +" Electron" ),
21  m_oTrackAllRecoPlots(this, "All/TrackPlots/", "All Reco "+ sParticleType +" Electron" ),
22  m_oKinIsoRecoPlots(this, "Iso/KinPlots/", "Iso Reco "+ sParticleType +" Electron"),
23  m_oShowerShapesIsoRecoPlots(this, "Iso/ShowerShapesPlots/","Iso Reco "+ sParticleType +" Electron" ),
24  m_oIsolationIsoRecoPlots(this, "Iso/IsolationPlots/", "Iso Reco "+ sParticleType +" Electron" ),
25  m_oTrackIsoRecoPlots(this, "Iso/TrackPlots/", "Iso Reco "+ sParticleType +" Electron" ),
26 
27  m_oKinIsoLHLoosePlots(this, "IsoLHLoose/KinPlots/", "LHLoose "+ sParticleType +" Electron"),
28  m_oShowerShapesIsoLHLoosePlots(this, "IsoLHLoose/ShowerShapesPlots/","LHLoose "+ sParticleType +" Electron" ),
29  m_oIsolationIsoLHLoosePlots(this, "IsoLHLoose/IsolationPlots/", "LHLoose "+ sParticleType +" Electron" ),
30  m_oTrackIsoLHLoosePlots(this, "IsoLHLoose/TrackPlots/", "LHLoose "+ sParticleType +" Electron" ),
31  m_oKinIsoLHMediumPlots(this, "IsoLHMedium/KinPlots/", "LHMedium "+ sParticleType +" Electron"),
32  m_oShowerShapesIsoLHMediumPlots(this, "IsoLHMedium/ShowerShapesPlots/","LHMedium "+ sParticleType +" Electron" ),
33  m_oIsolationIsoLHMediumPlots(this, "IsoLHMedium/IsolationPlots/", "LHMedium "+ sParticleType +" Electron" ),
34  m_oTrackIsoLHMediumPlots(this, "IsoLHMedium/TrackPlots/", "LHMedium "+ sParticleType +" Electron" ),
35  m_oKinIsoLHTightPlots(this, "IsoLHTight/KinPlots/", "LHTight "+ sParticleType +" Electron"),
36  m_oShowerShapesIsoLHTightPlots(this, "IsoLHTight/ShowerShapesPlots/","LHTight "+ sParticleType +" Electron" ),
37  m_oIsolationIsoLHTightPlots(this, "IsoLHTight/IsolationPlots/", "LHTight "+ sParticleType +" Electron" ),
38  m_oTrackIsoLHTightPlots(this, "IsoLHTight/TrackPlots/", "LHTight "+ sParticleType +" Electron" ),
39 
40  m_oKinPromptRecoPlots(this, "Truth_matched/KinPlots/", "Truth matched Reco "+ sParticleType +" Electron"),
41  m_oShowerShapesPromptRecoPlots(this, "Truth_matched/ShowerShapesPlots/","Truth matched Reco "+ sParticleType +" Electron" ),
42  m_oIsolationPromptRecoPlots(this, "Truth_matched/IsolationPlots/", "Truth matched Reco "+ sParticleType +" Electron" ),
43  m_oTrackPromptRecoPlots(this, "Truth_matched/TrackPlots/", "Truth matched Reco "+ sParticleType +" Electron" ),
44  m_oKinPromptLHLoosePlots(this, "Truth_matched_LHLoose/KinPlots/", "Truth matched LHLoose "+ sParticleType +" Electron"),
45  m_oShowerShapesPromptLHLoosePlots(this, "Truth_matched_LHLoose/ShowerShapesPlots/","Truth matched LHLoose "+ sParticleType +" Electron" ),
46  m_oIsolationPromptLHLoosePlots(this, "Truth_matched_LHLoose/IsolationPlots/", "Truth matched LHLoose "+ sParticleType +" Electron" ),
47  m_oTrackPromptLHLoosePlots(this, "Truth_matched_LHLoose/TrackPlots/", "Truth matched LHLoose "+ sParticleType +" Electron" ),
48  m_oKinPromptLHMediumPlots(this, "Truth_matched_LHMedium/KinPlots/", "Truth matched LHMedium "+ sParticleType +" Electron"),
49  m_oShowerShapesPromptLHMediumPlots(this, "Truth_matched_LHMedium/ShowerShapesPlots/","Truth matched LHMedium "+ sParticleType +" Electron" ),
50  m_oIsolationPromptLHMediumPlots(this, "Truth_matched_LHMedium/IsolationPlots/", "Truth matched LHMedium "+ sParticleType +" Electron" ),
51  m_oTrackPromptLHMediumPlots(this, "Truth_matched_LHMedium/TrackPlots/", "Truth matched LHMedium "+ sParticleType +" Electron" ),
52  m_oKinPromptLHTightPlots(this, "Truth_matched_LHTight/KinPlots/", "Truth matched LHTight "+ sParticleType +" Electron"),
53  m_oShowerShapesPromptLHTightPlots(this, "Truth_matched_LHTight/ShowerShapesPlots/","Truth matched LHTight "+ sParticleType +" Electron" ),
54  m_oIsolationPromptLHTightPlots(this, "Truth_matched_LHTight/IsolationPlots/", "Truth matched LHTight "+ sParticleType +" Electron" ),
55  m_oTrackPromptLHTightPlots(this, "Truth_matched_LHTight/TrackPlots/", "Truth matched LHTight "+ sParticleType +" Electron" ),
56  nParticles(nullptr),
57  nParticles_weighted(nullptr),
58  nTypeParticles(nullptr),
59  m_sParticleType(sParticleType)
60 {}
61 
63  nParticles = Book1D("n", "Number of "+ m_sParticleType + "s;#" + m_sParticleType + " electrons;Events", 15, 0, 15.);
64  nParticles_weighted = Book1D("n_weighted", "Number of "+ m_sParticleType + "s;#" + m_sParticleType + " electrons;Events", 15, 0, 15.);
65  }
66 
67  void ElectronPlots::fill(const xAOD::Electron& electron, const xAOD::EventInfo& eventInfo, bool isPrompt) {
68 
69  m_oKinAllRecoPlots.fill(electron,eventInfo);
73 
74  if(!isPrompt) return;
75 
80 
81  m_oKinIsoRecoPlots.fill(electron,eventInfo);
85 
86  bool val_LHloose=false;
87  electron.passSelection(val_LHloose, "LHLoose");
88  if(val_LHloose) {
93 
98  }
99 
100  bool val_LHmed=false;
101  electron.passSelection(val_LHmed, "LHMedium");
102  if(val_LHmed) {
107 
112  }
113 
114  bool val_LHtight=false;
115  electron.passSelection(val_LHtight, "LHTight");
116  if(val_LHtight) {
121 
126  }
127  }
128 
129 
130 }
Egamma::ElectronPlots::m_oIsolationPromptLHTightPlots
Egamma::IsolationPlots m_oIsolationPromptLHTightPlots
Definition: ElectronPlots.h:72
Egamma::ElectronPlots::fill
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: ElectronPlots.cxx:67
Egamma::ElectronPlots::m_oShowerShapesIsoLHMediumPlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoLHMediumPlots
Definition: ElectronPlots.h:46
Egamma::ShowerShapesPlots::fill
void fill(const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
Definition: ShowerShapesPlots.cxx:154
PlotBase
Definition: PlotBase.h:34
Egamma::ElectronPlots::m_oIsolationIsoLHTightPlots
Egamma::IsolationPlots m_oIsolationIsoLHTightPlots
Definition: ElectronPlots.h:52
Egamma::ElectronPlots::m_oTrackPromptLHTightPlots
Egamma::TrackPlots m_oTrackPromptLHTightPlots
Definition: ElectronPlots.h:73
Egamma::TrackPlots::fill
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo)
Definition: TrackPlots.cxx:93
Egamma
Definition: ClusMomentumPlots.cxx:11
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Egamma::ElectronPlots::m_oTrackPromptRecoPlots
Egamma::TrackPlots m_oTrackPromptRecoPlots
Definition: ElectronPlots.h:58
TruthParticleContainer.h
Egamma::ElectronPlots::m_oTrackPromptLHMediumPlots
Egamma::TrackPlots m_oTrackPromptLHMediumPlots
Definition: ElectronPlots.h:68
Egamma::ElectronPlots::m_oKinIsoLHTightPlots
Egamma::KinematicsPlots m_oKinIsoLHTightPlots
Definition: ElectronPlots.h:50
Egamma::ElectronPlots::nParticles_weighted
TH1 * nParticles_weighted
Definition: ElectronPlots.h:76
Egamma::ElectronPlots::m_oShowerShapesPromptLHLoosePlots
Egamma::ShowerShapesPlots m_oShowerShapesPromptLHLoosePlots
Definition: ElectronPlots.h:61
Egamma::ElectronPlots::m_oShowerShapesPromptLHMediumPlots
Egamma::ShowerShapesPlots m_oShowerShapesPromptLHMediumPlots
Definition: ElectronPlots.h:66
Egamma::ElectronPlots::m_sParticleType
std::string m_sParticleType
Definition: ElectronPlots.h:78
Egamma::ElectronPlots::m_oKinIsoLHMediumPlots
Egamma::KinematicsPlots m_oKinIsoLHMediumPlots
Definition: ElectronPlots.h:45
Egamma::ElectronPlots::m_oTrackIsoLHMediumPlots
Egamma::TrackPlots m_oTrackIsoLHMediumPlots
Definition: ElectronPlots.h:48
Egamma::ElectronPlots::m_oKinIsoLHLoosePlots
Egamma::KinematicsPlots m_oKinIsoLHLoosePlots
Definition: ElectronPlots.h:40
PlotBase::Book1D
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition: PlotBase.cxx:94
TruthParticleAuxContainer.h
Egamma::ElectronPlots::m_oKinPromptLHLoosePlots
Egamma::KinematicsPlots m_oKinPromptLHLoosePlots
Definition: ElectronPlots.h:60
Egamma::ElectronPlots::m_oKinPromptLHTightPlots
Egamma::KinematicsPlots m_oKinPromptLHTightPlots
Definition: ElectronPlots.h:70
Egamma::IsolationPlots::fill
void fill(const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
Definition: IsolationPlots.cxx:39
MCTruthClassifierDefs.h
Egamma::ElectronPlots::m_oShowerShapesAllRecoPlots
Egamma::ShowerShapesPlots m_oShowerShapesAllRecoPlots
Definition: ElectronPlots.h:31
Egamma::ElectronPlots::m_oIsolationIsoLHLoosePlots
Egamma::IsolationPlots m_oIsolationIsoLHLoosePlots
Definition: ElectronPlots.h:42
Egamma::ElectronPlots::m_oShowerShapesIsoRecoPlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoRecoPlots
Definition: ElectronPlots.h:36
Egamma::ElectronPlots::m_oTrackIsoRecoPlots
Egamma::TrackPlots m_oTrackIsoRecoPlots
Definition: ElectronPlots.h:38
Egamma::ElectronPlots::m_oKinAllRecoPlots
Egamma::KinematicsPlots m_oKinAllRecoPlots
Definition: ElectronPlots.h:30
Egamma::ElectronPlots::m_oKinPromptRecoPlots
Egamma::KinematicsPlots m_oKinPromptRecoPlots
Definition: ElectronPlots.h:55
Egamma::ElectronPlots::m_oTrackIsoLHLoosePlots
Egamma::TrackPlots m_oTrackIsoLHLoosePlots
Definition: ElectronPlots.h:43
Egamma::ElectronPlots::nParticles
TH1 * nParticles
Definition: ElectronPlots.h:75
Egamma::KinematicsPlots::fill
void fill(const xAOD::IParticle &part, const xAOD::EventInfo &eventInfo)
Definition: Reconstruction/egamma/EgammaPhysValMonitoring/src/KinematicsPlots.cxx:28
Egamma::ElectronPlots::m_oShowerShapesPromptLHTightPlots
Egamma::ShowerShapesPlots m_oShowerShapesPromptLHTightPlots
Definition: ElectronPlots.h:71
Egamma::ElectronPlots::m_oShowerShapesIsoLHLoosePlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoLHLoosePlots
Definition: ElectronPlots.h:41
Egamma::ElectronPlots::m_oTrackIsoLHTightPlots
Egamma::TrackPlots m_oTrackIsoLHTightPlots
Definition: ElectronPlots.h:53
Egamma::ElectronPlots::m_oKinPromptLHMediumPlots
Egamma::KinematicsPlots m_oKinPromptLHMediumPlots
Definition: ElectronPlots.h:65
Egamma::ElectronPlots::m_oIsolationPromptLHLoosePlots
Egamma::IsolationPlots m_oIsolationPromptLHLoosePlots
Definition: ElectronPlots.h:62
Egamma::ElectronPlots::m_oIsolationIsoLHMediumPlots
Egamma::IsolationPlots m_oIsolationIsoLHMediumPlots
Definition: ElectronPlots.h:47
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MCTruthPartClassifier::isPrompt
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
Definition: TruthClassifiers.h:180
MCTruthPartClassifier
Definition: TruthClassifiers.h:12
Egamma::ElectronPlots::m_oIsolationPromptLHMediumPlots
Egamma::IsolationPlots m_oIsolationPromptLHMediumPlots
Definition: ElectronPlots.h:67
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
Egamma::ElectronPlots::initializePlots
virtual void initializePlots()
Definition: ElectronPlots.cxx:62
Egamma::ElectronPlots::m_oKinIsoRecoPlots
Egamma::KinematicsPlots m_oKinIsoRecoPlots
Definition: ElectronPlots.h:35
Egamma::ElectronPlots::m_oIsolationPromptRecoPlots
Egamma::IsolationPlots m_oIsolationPromptRecoPlots
Definition: ElectronPlots.h:57
Egamma::ElectronPlots::m_oTrackAllRecoPlots
Egamma::TrackPlots m_oTrackAllRecoPlots
Definition: ElectronPlots.h:33
Egamma::ElectronPlots::m_oIsolationIsoRecoPlots
Egamma::IsolationPlots m_oIsolationIsoRecoPlots
Definition: ElectronPlots.h:37
Egamma::ElectronPlots::m_oShowerShapesPromptRecoPlots
Egamma::ShowerShapesPlots m_oShowerShapesPromptRecoPlots
Definition: ElectronPlots.h:56
TruthParticle.h
ElectronPlots.h
Egamma::ElectronPlots::m_oTrackPromptLHLoosePlots
Egamma::TrackPlots m_oTrackPromptLHLoosePlots
Definition: ElectronPlots.h:63
Egamma::ElectronPlots::m_oIsolationAllRecoPlots
Egamma::IsolationPlots m_oIsolationAllRecoPlots
Definition: ElectronPlots.h:32
Egamma::ElectronPlots::m_oShowerShapesIsoLHTightPlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoLHTightPlots
Definition: ElectronPlots.h:51