ATLAS Offline Software
Reconstruction
PFlow
PFlowValidation
PFOHistUtils
src
PFOAlgPropertyPlots.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 "
PFOHistUtils/PFOAlgPropertyPlots.h
"
6
7
namespace
PFO
{
8
9
PFOAlgPropertyPlots::PFOAlgPropertyPlots
(
PlotBase
* pParent, std::string
sDir
, std::string sFEContainerName) :
PlotBase
(pParent,
sDir
), m_sFEContainerName(sFEContainerName){
10
m_FE_isInDenseEnvironment
=
nullptr
;
11
m_FE_tracksExpectedEnergyDeposit
=
nullptr
;
12
13
m_FE_isInDenseEnvironment_etaBinA
=
nullptr
;
14
m_FE_tracksExpectedEnergyDeposit_etaBinA
=
nullptr
;
15
16
m_FE_isInDenseEnvironment_etaBinB
=
nullptr
;
17
m_FE_tracksExpectedEnergyDeposit_etaBinB
=
nullptr
;
18
19
m_FE_isInDenseEnvironment_etaBinC
=
nullptr
;
20
m_FE_tracksExpectedEnergyDeposit_etaBinC
=
nullptr
;
21
}
22
23
void
PFOAlgPropertyPlots::initializePlots
(){
24
// book FlowElement histograms
25
if
(!
m_sFEContainerName
.empty()){
26
m_FE_isInDenseEnvironment
=
Book1D
(
"_isInDenseEnvironment"
,
m_sFEContainerName
+
"_isInDenseEnvironment"
,3,-1,2);
27
m_FE_tracksExpectedEnergyDeposit
=
Book1D
(
"_tracksExpectedEnergyDeposit"
,
m_sFEContainerName
+
"_tracksExpectedEnergyDeposit"
,11,-1,10);
28
29
m_FE_isInDenseEnvironment_etaBinA
=
Book1D
(
"_isInDenseEnvironment_binA"
,
m_sFEContainerName
+
"_isInDenseEnvironment (|eta| < 1)"
,3,-1,2);
30
m_FE_tracksExpectedEnergyDeposit_etaBinA
=
Book1D
(
"_tracksExpectedEnergyDeposit_binA)"
,
m_sFEContainerName
+
"_tracksExpectedEnergyDeposit (|eta| < 1)"
,11,-1,10);
31
32
m_FE_isInDenseEnvironment_etaBinB
=
Book1D
(
"_isInDenseEnvironment_binB"
,
m_sFEContainerName
+
"_isInDenseEnvironment (1 <= |eta| < 2)"
,3,-1,2);
33
m_FE_tracksExpectedEnergyDeposit_etaBinB
=
Book1D
(
"_tracksExpectedEnergyDeposit_binB"
,
m_sFEContainerName
+
"_tracksExpectedEnergyDeposit (1 <= |eta| < 2)"
,11,-1,10);
34
35
m_FE_isInDenseEnvironment_etaBinC
=
Book1D
(
"_isInDenseEnvironment_binC"
,
m_sFEContainerName
+
"_isInDenseEnvironment (|eta| >= 2)"
,3,-1,2);
36
m_FE_tracksExpectedEnergyDeposit_etaBinC
=
Book1D
(
"_tracksExpectedEnergyDeposit_binC"
,
m_sFEContainerName
+
"_tracksExpectedEnergyDeposit (|eta| >= 2)"
,11,-1,10);
37
}
38
}
39
40
void
PFOAlgPropertyPlots::fill
(
const
xAOD::FlowElement
& FE,
const
xAOD::EventInfo
& eventInfo){
41
42
static
const
SG::AuxElement::ConstAccessor<int>
acc_IsInDenseEnvironment(
"IsInDenseEnvironment"
);
43
// dump the "isInDenseEnvironment
44
if
(acc_IsInDenseEnvironment.
isAvailable
(FE)){
45
int
isInDenseEnvironment=acc_IsInDenseEnvironment(FE);
46
m_FE_isInDenseEnvironment
->Fill(isInDenseEnvironment,eventInfo.
beamSpotWeight
());
47
if
(fabs(FE.
eta
()) < 1)
m_FE_isInDenseEnvironment_etaBinA
->Fill(isInDenseEnvironment,eventInfo.
beamSpotWeight
());
48
else
if
(fabs(FE.
eta
()) < 2)
m_FE_isInDenseEnvironment_etaBinB
->Fill(isInDenseEnvironment,eventInfo.
beamSpotWeight
());
49
else
m_FE_isInDenseEnvironment_etaBinC
->Fill(isInDenseEnvironment,eventInfo.
beamSpotWeight
());
50
}
51
else
{
52
m_FE_isInDenseEnvironment
->Fill(-1.0,eventInfo.
beamSpotWeight
());
53
if
(fabs(FE.
eta
()) < 1)
m_FE_isInDenseEnvironment_etaBinA
->Fill(-1.0,eventInfo.
beamSpotWeight
());
54
else
if
(fabs(FE.
eta
()) < 2)
m_FE_isInDenseEnvironment_etaBinB
->Fill(-1.0,eventInfo.
beamSpotWeight
());
55
else
m_FE_isInDenseEnvironment_etaBinC
->Fill(-1.0,eventInfo.
beamSpotWeight
());
56
}
57
static
const
SG::AuxElement::ConstAccessor<float>
acc_FE_tracksExpectedEnergyDeposit(
"TracksExpectedEnergyDeposit"
);
58
59
if
(acc_FE_tracksExpectedEnergyDeposit.
isAvailable
(FE)){
60
float
expectedEnergy=acc_FE_tracksExpectedEnergyDeposit(FE);
61
m_FE_tracksExpectedEnergyDeposit
->Fill(expectedEnergy/1000.0,eventInfo.
beamSpotWeight
());
62
if
(fabs(FE.
eta
())<1)
63
m_FE_tracksExpectedEnergyDeposit_etaBinA
->Fill(expectedEnergy/1000.0,eventInfo.
beamSpotWeight
());
64
else
if
(fabs(FE.
eta
())<2)
65
m_FE_tracksExpectedEnergyDeposit_etaBinB
->Fill(expectedEnergy/1000.0,eventInfo.
beamSpotWeight
());
66
else
67
m_FE_tracksExpectedEnergyDeposit_etaBinC
->Fill(expectedEnergy/1000.0,eventInfo.
beamSpotWeight
());
68
}
// end of accessor block on tracks expected energy deposit
69
else
{
70
m_FE_tracksExpectedEnergyDeposit
->Fill(-1.0,eventInfo.
beamSpotWeight
());
71
if
( fabs(FE.
eta
())<1)
m_FE_tracksExpectedEnergyDeposit_etaBinA
->Fill(-1.0,eventInfo.
beamSpotWeight
());
72
else
if
((fabs(FE.
eta
())<2))
m_FE_tracksExpectedEnergyDeposit_etaBinB
->Fill(-1.0,eventInfo.
beamSpotWeight
());
73
else
74
m_FE_tracksExpectedEnergyDeposit_etaBinC
->Fill(-1.0,eventInfo.
beamSpotWeight
());
75
}
76
77
}
// end of PFOAlgPropertyPlots::fill(const xAOD::FlowElement& FE)
78
}
// end of namespace PFO
PFO::PFOAlgPropertyPlots::m_FE_isInDenseEnvironment
TH1 * m_FE_isInDenseEnvironment
Flow Element Histograms.
Definition:
PFOAlgPropertyPlots.h:24
PFO::PFOAlgPropertyPlots::m_sFEContainerName
std::string m_sFEContainerName
Definition:
PFOAlgPropertyPlots.h:39
PlotBase
Definition:
PlotBase.h:34
PFO::PFOAlgPropertyPlots::fill
void fill(const xAOD::FlowElement &theFE, const xAOD::EventInfo &eventInfo)
Definition:
PFOAlgPropertyPlots.cxx:40
PFO::PFOAlgPropertyPlots::m_FE_tracksExpectedEnergyDeposit
TH1 * m_FE_tracksExpectedEnergyDeposit
Definition:
PFOAlgPropertyPlots.h:25
python.copyTCTOutput.sDir
sDir
Definition:
copyTCTOutput.py:60
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition:
ConstAccessor.h:55
PFO::PFOAlgPropertyPlots::initializePlots
void initializePlots()
Definition:
PFOAlgPropertyPlots.cxx:23
PlotBase::Book1D
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition:
PlotBase.cxx:94
PFO::PFOAlgPropertyPlots::m_FE_tracksExpectedEnergyDeposit_etaBinC
TH1 * m_FE_tracksExpectedEnergyDeposit_etaBinC
Definition:
PFOAlgPropertyPlots.h:35
PFO::PFOAlgPropertyPlots::m_FE_tracksExpectedEnergyDeposit_etaBinA
TH1 * m_FE_tracksExpectedEnergyDeposit_etaBinA
Definition:
PFOAlgPropertyPlots.h:29
PFO::PFOAlgPropertyPlots::m_FE_tracksExpectedEnergyDeposit_etaBinB
TH1 * m_FE_tracksExpectedEnergyDeposit_etaBinB
Definition:
PFOAlgPropertyPlots.h:32
PFOAlgPropertyPlots.h
PFO
Definition:
ClusterMomentPlots.h:13
xAOD::EventInfo_v1
Class describing the basic event information.
Definition:
EventInfo_v1.h:43
xAOD::FlowElement_v1::eta
virtual double eta() const override
The pseudorapidity ( ) of the particle.
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
PFO::PFOAlgPropertyPlots::PFOAlgPropertyPlots
PFOAlgPropertyPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName)
Definition:
PFOAlgPropertyPlots.cxx:9
PFO::PFOAlgPropertyPlots::m_FE_isInDenseEnvironment_etaBinA
TH1 * m_FE_isInDenseEnvironment_etaBinA
Definition:
PFOAlgPropertyPlots.h:28
PFO::PFOAlgPropertyPlots::m_FE_isInDenseEnvironment_etaBinC
TH1 * m_FE_isInDenseEnvironment_etaBinC
Definition:
PFOAlgPropertyPlots.h:34
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition:
EventInfo_v1.cxx:970
PFO::PFOAlgPropertyPlots::m_FE_isInDenseEnvironment_etaBinB
TH1 * m_FE_isInDenseEnvironment_etaBinB
Definition:
PFOAlgPropertyPlots.h:31
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition:
FlowElement_v1.h:25
Generated on Thu Nov 7 2024 21:23:26 for ATLAS Offline Software by
1.8.18