Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LeptonFELinkerPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "AthLinks/ElementLink.h"
12 
13 namespace PFO {
14  LeptonFELinkerPlots::LeptonFELinkerPlots(PlotBase* pParent,const std::string & sDir, const std::string & LeptonContainerName,const bool& doNeutralFE,const int& PID):
15  PlotBase(pParent, sDir),
16  m_LeptonContainerName(LeptonContainerName),
17  m_doNeutralFE(doNeutralFE),
18  m_LeptonID(PID)
19  {
20  m_electron_NMatchedCFE=nullptr;
21  m_electron_NMatchedNFE=nullptr;
22 
23  m_muon_NMatchedCFE=nullptr;
24  m_muon_NMatchedNFE=nullptr;
25 
26  m_tau_NMatchedCFE=nullptr;
27  m_tau_NMatchedNFE=nullptr;
28 
29  m_photon_NMatchedCFE=nullptr;
30  m_photon_NMatchedNFE=nullptr;
31  }
32 
34  if(m_doNeutralFE)
35  {
36  if(m_LeptonID==11)
37  m_electron_NMatchedNFE=Book1D("_electron_NMatchedNFE",m_LeptonContainerName+"_elecron_NMatchedNFE",20,0,20);
38  else if (m_LeptonID==13)
39  m_muon_NMatchedNFE=Book1D("_muon_NMatchedNFE",m_LeptonContainerName+"_muon_NMatchedNFE",20,0,20);
40  else if (m_LeptonID==17)
41  m_tau_NMatchedNFE=Book1D("_tau_NMatchedNFE",m_LeptonContainerName+"_tau_NMatchedNFE",20,0,20);
42  else
43  m_photon_NMatchedNFE=Book1D("_photon_NMatchedNFE",m_LeptonContainerName+"_photon_NMatchedNFE",20,0,20);
44  }
45  else{
46  if(m_LeptonID==11)
47  m_electron_NMatchedCFE=Book1D("_electron_NMatchedCFE",m_LeptonContainerName+"_elecron_NMatchedCFE",20,0,20);
48  else if (m_LeptonID==13)
49  m_muon_NMatchedCFE=Book1D("_muon_NMatchedCFE",m_LeptonContainerName+"_muon_NMatchedCFE",20,0,20);
50  else if(m_LeptonID==17)
51  m_tau_NMatchedCFE=Book1D("_tau_NMatchedCFE",m_LeptonContainerName+"_tau_NMatchedCFE",20,0,20);
52  else
53  m_photon_NMatchedCFE=Book1D("_photon_NMatchedCFE",m_LeptonContainerName+"_photon_NMatchedCFE",20,0,20);
54  };
55  }
56 
57  void LeptonFELinkerPlots::fill(const xAOD::Photon& phot, const xAOD::EventInfo& eventInfo){
58  int nMatched_FE=0;
61  if(acc_FE_phot_link_NFE.isAvailable(phot) and m_doNeutralFE){
62  nMatched_FE=(acc_FE_phot_link_NFE(phot)).size();
63  m_photon_NMatchedNFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
64  }
65  else if (acc_FE_phot_link_CFE.isAvailable(phot) and !m_doNeutralFE){
66  nMatched_FE=(acc_FE_phot_link_CFE(phot)).size();
67  m_photon_NMatchedCFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
68  }
69  }
71  int nMatched_FE=0;
74 
75  if(acc_FE_el_link_NFE.isAvailable(el) and m_doNeutralFE){
76  nMatched_FE=(acc_FE_el_link_NFE(el)).size();
77  m_electron_NMatchedNFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
78  }
79  else if(acc_FE_el_link_CFE.isAvailable(el) and !m_doNeutralFE){
80  nMatched_FE=(acc_FE_el_link_CFE(el)).size();
81  m_electron_NMatchedCFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
82  }
83  }
84 
85  void LeptonFELinkerPlots::fill(const xAOD::Muon& mu, const xAOD::EventInfo& eventInfo){
86  int nMatched_FE=0;
89  if(acc_FE_mu_link_NFE.isAvailable(mu) and m_doNeutralFE){
90  nMatched_FE=(acc_FE_mu_link_NFE(mu)).size();
91  m_muon_NMatchedNFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
92  }
93  else if(acc_FE_mu_link_CFE.isAvailable(mu) and !m_doNeutralFE){
94  nMatched_FE=(acc_FE_mu_link_CFE(mu)).size();
95  m_muon_NMatchedCFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
96  }
97  }
98 
99  void LeptonFELinkerPlots::fill(const xAOD::TauJet& tau, const xAOD::EventInfo& eventInfo){
100  int nMatched_FE=0;
103  if(acc_FE_tau_link_NFE.isAvailable(tau) and m_doNeutralFE){
104 
105  nMatched_FE=(acc_FE_tau_link_NFE(tau)).size();
106  m_tau_NMatchedNFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
107  }
108  else if(acc_FE_tau_link_NFE.isAvailable(tau) and !m_doNeutralFE){
109  nMatched_FE=(acc_FE_tau_link_CFE(tau)).size();
110  m_tau_NMatchedCFE->Fill(nMatched_FE,eventInfo.beamSpotWeight());
111  }
112 
113  }
114 
115 
116 
117 } // end of PFO namespace
FlowElementContainer.h
PlotBase
Definition: PlotBase.h:34
PFO::LeptonFELinkerPlots::initializePlots
void initializePlots()
Definition: LeptonFELinkerPlots.cxx:33
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
egammaPIDObs::PID
PID
Definition: egammaPIDdefsObs.h:53
PFO::LeptonFELinkerPlots::m_LeptonID
int m_LeptonID
Definition: LeptonFELinkerPlots.h:50
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
PFO::LeptonFELinkerPlots::m_photon_NMatchedCFE
TH1 * m_photon_NMatchedCFE
Definition: LeptonFELinkerPlots.h:44
PFO::LeptonFELinkerPlots::m_photon_NMatchedNFE
TH1 * m_photon_NMatchedNFE
Definition: LeptonFELinkerPlots.h:45
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
PFO::LeptonFELinkerPlots::m_muon_NMatchedCFE
TH1 * m_muon_NMatchedCFE
Definition: LeptonFELinkerPlots.h:38
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
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PFO::LeptonFELinkerPlots::m_muon_NMatchedNFE
TH1 * m_muon_NMatchedNFE
Definition: LeptonFELinkerPlots.h:39
ElectronContainer.h
PFO::LeptonFELinkerPlots::m_electron_NMatchedNFE
TH1 * m_electron_NMatchedNFE
Definition: LeptonFELinkerPlots.h:36
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TauJetContainer.h
PFO
Definition: ClusterMomentPlots.h:15
PFO::LeptonFELinkerPlots::m_LeptonContainerName
std::string m_LeptonContainerName
Definition: LeptonFELinkerPlots.h:48
PFO::LeptonFELinkerPlots::LeptonFELinkerPlots
LeptonFELinkerPlots(PlotBase *pParent, const std::string &sDir, const std::string &LeptonContainerName, const bool &m_doNeutralFE, const int &m_LeptonID)
Definition: LeptonFELinkerPlots.cxx:14
xAOD::Electron_v1
Definition: Electron_v1.h:34
PFO::LeptonFELinkerPlots::fill
void fill(const xAOD::Electron &el, const xAOD::EventInfo &eventInfo)
Definition: LeptonFELinkerPlots.cxx:70
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MuonContainer.h
PFO::LeptonFELinkerPlots::m_tau_NMatchedNFE
TH1 * m_tau_NMatchedNFE
Definition: LeptonFELinkerPlots.h:42
xAOD::Photon_v1
Definition: Photon_v1.h:37
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
PFO::LeptonFELinkerPlots::m_electron_NMatchedCFE
TH1 * m_electron_NMatchedCFE
Definition: LeptonFELinkerPlots.h:35
LeptonFELinkerPlots.h
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
PFO::LeptonFELinkerPlots::m_tau_NMatchedCFE
TH1 * m_tau_NMatchedCFE
Definition: LeptonFELinkerPlots.h:41
PhotonContainer.h
PFO::LeptonFELinkerPlots::m_doNeutralFE
bool m_doNeutralFE
Definition: LeptonFELinkerPlots.h:49