ATLAS Offline Software
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaValidation
src
DiObjectHistograms.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
DiObjectHistograms.h
"
5
#include "
xAODBase/IParticle.h
"
6
#include "GaudiKernel/ITHistSvc.h"
7
#include "
AsgMessaging/Check.h
"
8
#include "TH1D.h"
9
#include "TH2D.h"
10
11
namespace
egammaMonitoring
{
12
13
StatusCode
DiObjectHistograms::initializePlots
() {
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
}
27
28
void
DiObjectHistograms::fill
(
const
xAOD::IParticle
& eg1,
const
xAOD::IParticle
& eg2) {
29
fill
(eg1,eg2,0.);
30
}
31
32
void
DiObjectHistograms::fill
(
const
xAOD::IParticle
& eg1,
const
xAOD::IParticle
& eg2,
float
mu) {
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
}
41
42
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
Check.h
DiObjectHistograms.h
IParticle.h
egammaMonitoring::DiObjectHistograms::m_name
std::string m_name
Definition
DiObjectHistograms.h:42
egammaMonitoring::DiObjectHistograms::m_folder
std::string m_folder
Definition
DiObjectHistograms.h:44
egammaMonitoring::DiObjectHistograms::fill
void fill(const xAOD::IParticle &eg1, const xAOD::IParticle &eg2)
Definition
DiObjectHistograms.cxx:28
egammaMonitoring::DiObjectHistograms::initializePlots
StatusCode initializePlots()
Definition
DiObjectHistograms.cxx:13
egammaMonitoring::DiObjectHistograms::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition
DiObjectHistograms.h:45
egammaMonitoring::DiObjectHistograms::histoMap
std::map< std::string, TH1 * > histoMap
Definition
DiObjectHistograms.h:39
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::IParticle::p4
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:69
egammaMonitoring
Definition
ClusterHistograms.h:19
Generated on
for ATLAS Offline Software by
1.14.0