ATLAS Offline Software
Loading...
Searching...
No Matches
egammaMonitoring::DiObjectHistograms Class Reference

#include <DiObjectHistograms.h>

Collaboration diagram for egammaMonitoring::DiObjectHistograms:

Public Member Functions

 DiObjectHistograms (std::string name, std::string title, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
StatusCode initializePlots ()
void fill (const xAOD::IParticle &eg1, const xAOD::IParticle &eg2)
void fill (const xAOD::IParticle &eg1, const xAOD::IParticle &eg2, float mu)

Public Attributes

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

Protected Attributes

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

Detailed Description

Definition at line 23 of file DiObjectHistograms.h.

Constructor & Destructor Documentation

◆ DiObjectHistograms()

egammaMonitoring::DiObjectHistograms::DiObjectHistograms ( std::string name,
std::string title,
std::string folder,
SmartIF< ITHistSvc > rootHistSvc )
inline

Definition at line 26 of file DiObjectHistograms.h.

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

Member Function Documentation

◆ fill() [1/2]

void egammaMonitoring::DiObjectHistograms::fill ( const xAOD::IParticle & eg1,
const xAOD::IParticle & eg2 )

Definition at line 28 of file DiObjectHistograms.cxx.

28 {
29 fill(eg1,eg2,0.);
30 }
void fill(const xAOD::IParticle &eg1, const xAOD::IParticle &eg2)

◆ fill() [2/2]

void egammaMonitoring::DiObjectHistograms::fill ( const xAOD::IParticle & eg1,
const xAOD::IParticle & eg2,
float mu )

Definition at line 32 of file DiObjectHistograms.cxx.

32 {
33
34 xAOD::IParticle::FourMom_t di = eg1.p4()+eg2.p4();
35 double m = di.M()*1e-3;
36 histoMap["mass"]->Fill(m);
37 histoMap["massvsmu"]->Fill(mu,m);
38 histoMap["massvspT"]->Fill(di.Pt()*1e-3,m);
39
40 }
std::map< std::string, TH1 * > histoMap
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
TLorentzVector FourMom_t
Definition of the 4-momentum type.

◆ initializePlots()

StatusCode egammaMonitoring::DiObjectHistograms::initializePlots ( )

Definition at line 13 of file DiObjectHistograms.cxx.

13 {
14
15 const char* fN = m_name.c_str();
16
17 histoMap["mass"] = new TH1D(Form("%s_mass",fN),";m [GeV]; Events",300,50,200);
18 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"mass", histoMap["mass"]));
19
20 histoMap["massvsmu"] = new TH2D(Form("%s_massvsmu",fN),";#mu;m [GeV]",100,0,100,150,50,200);
21 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"massvsmu", histoMap["massvsmu"]));
22
23 histoMap["massvspT"] = new TH2D(Form("%s_massvspT",fN),";p_{T} [GeV];m [GeV]",20,0,100,150,50,200);
24 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"massvspT", histoMap["massvspT"]));
25 return StatusCode::SUCCESS;
26 }
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ histoMap

std::map<std::string, TH1*> egammaMonitoring::DiObjectHistograms::histoMap

Definition at line 39 of file DiObjectHistograms.h.

◆ m_folder

std::string egammaMonitoring::DiObjectHistograms::m_folder
protected

Definition at line 44 of file DiObjectHistograms.h.

◆ m_name

std::string egammaMonitoring::DiObjectHistograms::m_name
protected

Definition at line 42 of file DiObjectHistograms.h.

◆ m_rootHistSvc

SmartIF<ITHistSvc> egammaMonitoring::DiObjectHistograms::m_rootHistSvc
protected

Definition at line 45 of file DiObjectHistograms.h.

◆ m_title

std::string egammaMonitoring::DiObjectHistograms::m_title
protected

Definition at line 43 of file DiObjectHistograms.h.


The documentation for this class was generated from the following files: