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

#include <RecoPhotonHistograms.h>

Inheritance diagram for egammaMonitoring::RecoPhotonHistograms:
Collaboration diagram for egammaMonitoring::RecoPhotonHistograms:

Public Member Functions

StatusCode initializePlots ()
 
void fill (const xAOD::Photon &phrec)
 
void fill (const xAOD::IParticle &egamma)
 
void fill (const xAOD::IParticle &egamma, float mu)
 
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

float m_cR_bins [15]
 
bool m_hasFwd = false
 

Detailed Description

Definition at line 15 of file RecoPhotonHistograms.h.

Member Function Documentation

◆ fill() [1/5]

void egammaMonitoring::ParticleHistograms::fill

Definition at line 23 of file ParticleHistograms.cxx.

41  {
43  }

◆ fill() [2/5]

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

Implements egammaMonitoring::IHistograms.

Reimplemented in egammaMonitoring::TruthPhotonHistograms.

Definition at line 41 of file ParticleHistograms.cxx.

41  {
43  }

◆ fill() [3/5]

void egammaMonitoring::ParticleHistograms::fill

Definition at line 24 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  }

◆ fill() [4/5]

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

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  }

◆ fill() [5/5]

void RecoPhotonHistograms::fill ( const xAOD::Photon phrec)

Definition at line 34 of file RecoPhotonHistograms.cxx.

34  {
35 
37 
38  static const SG::AuxElement::ConstAccessor<int> accType("truthType");
39  static const SG::AuxElement::ConstAccessor<int> accOrigin("truthOrigin");
40  if (accOrigin.isAvailable(phrec))
41  histoMap["truthOrigin"]->Fill(accOrigin(phrec));
42  else
43  histoMap["truthOrigin"]->Fill(-1);
44  if (accType.isAvailable(phrec))
45  histoMap["truthType"]->Fill(accType(phrec));
46  else
47  histoMap["truthType"]->Fill(-1);
48 
49  double trueR(-999);
51  if (tmp) {
52  if (tmp->pdgId() == 22 && tmp->hasDecayVtx()) {
53 
54  float x = tmp->decayVtx()->x();
55  float y = tmp->decayVtx()->y();
56  trueR = std::sqrt( x*x + y*y );
57 
58  }
59  }
60  histoMap["convRadius"]->Fill(trueR);
61 
62 
63 } // fill

◆ hasFwd()

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

Definition at line 26 of file ParticleHistograms.h.

26 { m_hasFwd = a; }

◆ IHistograms() [1/2]

egammaMonitoring::IHistograms::IHistograms
inherited

◆ IHistograms() [2/2]

egammaMonitoring::IHistograms::IHistograms
inlineinherited

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 RecoPhotonHistograms::initializePlots ( )
virtual

Reimplemented from egammaMonitoring::ParticleHistograms.

Definition at line 17 of file RecoPhotonHistograms.cxx.

17  {
18 
20 
21  const char* fN = m_name.c_str();
22 
23  histoMap["convRadius"] = new TH1D(Form("%s_convRadius",fN), ";Conversion Radius [mm]; Events", 14, m_cR_bins);
24  histoMap["truthType"] = new TH1D(Form("%s_truthType",fN), ";truth type; Events", 41,-1,40);
25  histoMap["truthOrigin"] = new TH1D(Form("%s_truthOrigin",fN), ";truth origin; Events",51,-1,50);
26 
27  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"convRadius", histoMap["convRadius"]));
28  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"truthType", histoMap["truthType"]));
29  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"truthOrigin", histoMap["truthOrigin"]));
30 
31  return StatusCode::SUCCESS;
32 }

Member Data Documentation

◆ histoMap

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

Definition at line 42 of file IHistograms.h.

◆ m_cR_bins

float egammaMonitoring::RecoPhotonHistograms::m_cR_bins[15]
private
Initial value:
=
{0, 50, 89, 123, 170, 210, 250, 299, 335, 371, 443, 514, 554, 800, 1085}

Definition at line 26 of file RecoPhotonHistograms.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
privateinherited

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:
egammaMonitoring::RecoPhotonHistograms::m_cR_bins
float m_cR_bins[15]
Definition: RecoPhotonHistograms.h:26
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
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
egammaMonitoring::ParticleHistograms::fill
void fill(const xAOD::IParticle &egamma)
Definition: ParticleHistograms.cxx:41
x
#define x
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
egammaMonitoring::ParticleHistograms::initializePlots
StatusCode initializePlots()
Definition: ParticleHistograms.cxx:13
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
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
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
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