ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
EgammaPhysValMonitoring
src
ClusMomentumPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <utility>
6
7
#include "
ClusMomentumPlots.h
"
8
9
using
CLHEP::GeV;
10
11
namespace
Egamma
{
12
13
14
ClusMomentumPlots::ClusMomentumPlots
(
PlotBase
* pParent,
const
std::string& sDir, std::string sParticleType):
PlotBase
(pParent, sDir),
15
m_sParticleType
(
std
::move(sParticleType)),
16
secondlambda
(nullptr),
17
secondr
(nullptr),
18
centerlambda
(nullptr),
19
engfracmax
(nullptr),
20
longitudinal
(nullptr),
21
lateral
(nullptr)
22
{}
23
24
25
26
void
ClusMomentumPlots::initializePlots
(){
27
secondlambda
=
Book1D
(
"secondlambda"
,
"Second Lambda; #lambda_{2};"
+
m_sParticleType
, 100, 0., 10000.);
28
secondr
=
Book1D
(
"secondr"
,
"Second R; #R_{2};"
+
m_sParticleType
, 100, 0., 5000.);
29
centerlambda
=
Book1D
(
"centerlambda"
,
"Center Lambda; #lambda_{center};"
+
m_sParticleType
, 100, 100., 500.);
30
engfracmax
=
Book1D
(
"engfracmax"
,
"ENG_FRAC_MAX; energy fraction max ;"
+
m_sParticleType
, 100, 0., 1.);
31
longitudinal
=
Book1D
(
"longitudinal"
,
"LONGITUDINAL; longitudinal ;"
+
m_sParticleType
, 100, 0., 1.);
32
lateral
=
Book1D
(
"lateral"
,
"LATERAL;lateral ;"
+
m_sParticleType
, 100, 0., 1.);
33
34
}
35
36
void
ClusMomentumPlots::fill
(
const
xAOD::Egamma
&
egamma
,
const
xAOD::EventInfo
& eventInfo) {
37
38
float
weight = 1.;
39
weight = eventInfo.
beamSpotWeight
();
40
41
const
xAOD::CaloCluster
* cluster=
egamma
.caloCluster();
42
if
(cluster){
43
double
eng_frac_max;
44
double
lon;
45
double
second_lambda;
46
double
lat;
47
double
second_r;
48
double
center_lambda;
49
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::ENG_FRAC_MAX
,eng_frac_max)){
50
engfracmax
->Fill(eng_frac_max,weight);
51
}
52
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::LONGITUDINAL
,lon)){
53
longitudinal
->Fill(lon,weight);
54
}
55
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::SECOND_LAMBDA
,second_lambda)){
56
secondlambda
->Fill(second_lambda,weight);
57
}
58
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::LATERAL
,lat)){
59
lateral
->Fill(lat,weight);
60
}
61
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::SECOND_R
,second_r)){
62
secondr
->Fill(second_r,weight);
63
}
64
if
(cluster->
retrieveMoment
(
xAOD::CaloCluster::CENTER_LAMBDA
,center_lambda)){
65
centerlambda
->Fill(center_lambda,weight);
66
}
67
}
68
}
69
70
}
ClusMomentumPlots.h
Egamma::ClusMomentumPlots::secondlambda
TH1 * secondlambda
Definition
ClusMomentumPlots.h:23
Egamma::ClusMomentumPlots::ClusMomentumPlots
ClusMomentumPlots(PlotBase *pParent, const std::string &sDir, std::string sParticleType)
Definition
ClusMomentumPlots.cxx:14
Egamma::ClusMomentumPlots::fill
void fill(const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
Definition
ClusMomentumPlots.cxx:36
Egamma::ClusMomentumPlots::m_sParticleType
std::string m_sParticleType
Definition
ClusMomentumPlots.h:21
Egamma::ClusMomentumPlots::centerlambda
TH1 * centerlambda
Definition
ClusMomentumPlots.h:25
Egamma::ClusMomentumPlots::secondr
TH1 * secondr
Definition
ClusMomentumPlots.h:24
Egamma::ClusMomentumPlots::longitudinal
TH1 * longitudinal
Definition
ClusMomentumPlots.h:27
Egamma::ClusMomentumPlots::engfracmax
TH1 * engfracmax
Definition
ClusMomentumPlots.h:26
Egamma::ClusMomentumPlots::lateral
TH1 * lateral
Definition
ClusMomentumPlots.h:28
Egamma::ClusMomentumPlots::initializePlots
virtual void initializePlots()
Definition
ClusMomentumPlots.cxx:26
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
egamma
elec/gamma data class.
Definition
egamma.h:59
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition
CaloCluster_v1.cxx:662
xAOD::CaloCluster_v1::SECOND_LAMBDA
@ SECOND_LAMBDA
Second Moment in .
Definition
CaloCluster_v1.h:127
xAOD::CaloCluster_v1::LATERAL
@ LATERAL
Normalized lateral moment.
Definition
CaloCluster_v1.h:140
xAOD::CaloCluster_v1::LONGITUDINAL
@ LONGITUDINAL
Normalized longitudinal moment.
Definition
CaloCluster_v1.h:141
xAOD::CaloCluster_v1::ENG_FRAC_MAX
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
Definition
CaloCluster_v1.h:143
xAOD::CaloCluster_v1::SECOND_R
@ SECOND_R
Second Moment in .
Definition
CaloCluster_v1.h:126
xAOD::CaloCluster_v1::CENTER_LAMBDA
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
Definition
CaloCluster_v1.h:139
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
Egamma
Definition
ClusMomentumPlots.cxx:11
std
STL namespace.
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::Egamma
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition
Egamma.h:17
Generated on
for ATLAS Offline Software by
1.17.0