ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
egammaMonitoring::ParticleHistograms Class Reference

#include <ParticleHistograms.h>

Inheritance diagram for egammaMonitoring::ParticleHistograms:
Collaboration diagram for egammaMonitoring::ParticleHistograms:

Public Member Functions

StatusCode initializePlots ()
 
void fill (const xAOD::IParticle &egamma)
 
void fill (const xAOD::IParticle &egamma, float mu)
 
void hasFwd (bool a=true)
 
 IHistograms ()
 
 IHistograms (std::string name, std::string title, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
 

Public Attributes

std::map< std::string, TH1D * > histoMap
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_folder
 
SmartIF< ITHistSvc > m_rootHistSvc
 

Private Attributes

bool m_hasFwd = false
 

Detailed Description

Definition at line 16 of file ParticleHistograms.h.

Member Function Documentation

◆ fill() [1/2]

void egammaMonitoring::ParticleHistograms::fill ( const xAOD::IParticle egamma)
virtual

Implements egammaMonitoring::IHistograms.

Reimplemented in egammaMonitoring::TruthPhotonHistograms.

Definition at line 41 of file ParticleHistograms.cxx.

41  {
43  }

◆ fill() [2/2]

void egammaMonitoring::ParticleHistograms::fill ( const xAOD::IParticle egamma,
float  mu 
)
virtual

Implements egammaMonitoring::IHistograms.

Reimplemented in egammaMonitoring::TruthPhotonHistograms.

Definition at line 45 of file ParticleHistograms.cxx.

45  {
46 
47  double pT = egamma.pt()*1e-3;
48  if (pT > 0)
49  histoMap["pT"]->Fill(pT);
50  histoMap["eta"]->Fill(egamma.eta());
51  histoMap["phi"]->Fill(egamma.phi());
52 
53  if (pT > 15) {
54  histoMap["eta_15GeV"]->Fill(egamma.eta());
55  histoMap["phi_15GeV"]->Fill(egamma.phi());
56  }
57 
58  if (m_hasFwd && std::abs(egamma.eta()) < 4.) {
59  histoMap["pT_eta4"]->Fill(pT);
60  histoMap["phi_eta4"]->Fill(egamma.phi());
61  }
62 
63  }

◆ hasFwd()

void egammaMonitoring::ParticleHistograms::hasFwd ( bool  a = true)
inline

Definition at line 26 of file ParticleHistograms.h.

26 { m_hasFwd = a; }

◆ IHistograms() [1/2]

egammaMonitoring::IHistograms::IHistograms

◆ IHistograms() [2/2]

egammaMonitoring::IHistograms::IHistograms
inline

Definition at line 26 of file IHistograms.h.

30  :
31  m_name(std::move(std::move(name))),
32  m_title(std::move(std::move(title))),
33  m_folder(std::move(std::move(folder))),
34  m_rootHistSvc(std::move(rootHistSvc)) {}

◆ initializePlots()

StatusCode egammaMonitoring::ParticleHistograms::initializePlots ( )
virtual

Implements egammaMonitoring::IHistograms.

Reimplemented in egammaMonitoring::TruthElectronHistograms, egammaMonitoring::TruthPhotonHistograms, egammaMonitoring::RecoElectronHistograms, and egammaMonitoring::RecoPhotonHistograms.

Definition at line 13 of file ParticleHistograms.cxx.

13  {
14 
15  const char* fN = m_name.c_str();
16 
17  histoMap["pT"] = new TH1D(Form("%s_pT",fN) , ";p_{T} [GeV];Events", 40, 0, 200);
18  histoMap["eta"] = new TH1D(Form("%s_eta",fN), ";#eta;Events" , 90, -4.5, 4.5);
19  histoMap["phi"] = new TH1D(Form("%s_phi",fN), ";#phi;Events" , 20, -TMath::Pi(), TMath::Pi());
20 
21  histoMap["eta_15GeV"] = new TH1D(Form("%s_eta_15GeV",fN), ";#eta;Events", 90, -4.5, 4.5);
22  histoMap["phi_15GeV"] = new TH1D(Form("%s_phi_15GeV",fN), ";#phi;Events", 20, -TMath::Pi(), TMath::Pi());
23 
24  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"pT", histoMap["pT"]));
25  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eta", histoMap["eta"]));
26  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"phi", histoMap["phi"]));
27 
28  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eta_15GeV", histoMap["eta_15GeV"]));
29  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"phi_15GeV", histoMap["phi_15GeV"]));
30 
31  if (m_hasFwd) {
32  histoMap["pT_eta4"] = new TH1D(Form("%s_pT_eta4",fN) , ";p_{T} [GeV];Events",40, 0, 200);
33  histoMap["phi_eta4"] = new TH1D(Form("%s_phi_eta4",fN), ";#phi;Events" ,20, -TMath::Pi(), TMath::Pi());
34  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"pT_eta4", histoMap["pT_eta4"]));
35  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"phi_eta4", histoMap["phi_eta4"]));
36  }
37 
38  return StatusCode::SUCCESS;
39  }

Member Data Documentation

◆ histoMap

std::map<std::string, TH1D*> egammaMonitoring::IHistograms::histoMap
inherited

Definition at line 42 of file IHistograms.h.

◆ m_folder

std::string egammaMonitoring::IHistograms::m_folder
protectedinherited

Definition at line 47 of file IHistograms.h.

◆ m_hasFwd

bool egammaMonitoring::ParticleHistograms::m_hasFwd = false
private

Definition at line 29 of file ParticleHistograms.h.

◆ m_name

std::string egammaMonitoring::IHistograms::m_name
protectedinherited

Definition at line 45 of file IHistograms.h.

◆ m_rootHistSvc

SmartIF<ITHistSvc> egammaMonitoring::IHistograms::m_rootHistSvc
protectedinherited

Definition at line 48 of file IHistograms.h.

◆ m_title

std::string egammaMonitoring::IHistograms::m_title
protectedinherited

Definition at line 46 of file IHistograms.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
ParticleImpl::pt
virtual double pt() const
transverse momentum
Definition: ParticleImpl.h:554
egammaMonitoring::ParticleHistograms::fill
void fill(const xAOD::IParticle &egamma)
Definition: ParticleHistograms.cxx:41
egamma
Definition: egamma.h:58
egammaMonitoring::IHistograms::m_folder
std::string m_folder
Definition: IHistograms.h:47
egammaMonitoring::IHistograms::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition: IHistograms.h:48
covarianceTool.title
title
Definition: covarianceTool.py:542
ParticleImpl::phi
virtual double phi() const
phi in [-pi,pi[
Definition: ParticleImpl.h:524
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ParticleImpl::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleImpl.h:514
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
egammaMonitoring::IHistograms::m_title
std::string m_title
Definition: IHistograms.h:46
egammaMonitoring::ParticleHistograms::m_hasFwd
bool m_hasFwd
Definition: ParticleHistograms.h:29
egammaMonitoring::IHistograms::m_name
std::string m_name
Definition: IHistograms.h:45
egammaMonitoring::IHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition: IHistograms.h:40