ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4ShowerLib
LArG4ShowerLib
FCALDistEtaEnergyShowerLib.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef SHOWER_LIB_FCALDIST_ETA_ENERGY_SHOWER_LIB_H
6
#define SHOWER_LIB_FCALDIST_ETA_ENERGY_SHOWER_LIB_H
7
// STL includes
8
#include <map>
9
#include <vector>
10
11
// local includes
12
#include "
LArG4ShowerLib/IShowerLib.h
"
13
14
// G4 forward declarations
15
class
G4Track;
16
17
// Namespace for the ShowerLib related classes
18
namespace
ShowerLib
{
19
20
// forward declarations in namespace
21
34
35
class
FCALDistEtaEnergyShowerLib
:
public
IShowerLib
{
36
37
public
:
38
40
static
IShowerLib
*
readFromROOTFile
(TFile* source);
41
43
static
IShowerLib
*
createEmptyLib
(
const
std::string& inputFile);
44
46
virtual
~FCALDistEtaEnergyShowerLib
()
47
{
48
for
(
auto
&
eta
:
m_libData
) {
// dist bins
49
for
(
auto
& dist :
eta
.second ) {
// eta bins
50
for
(
auto
& ene : dist.second ) {
// energy map
51
for
(
auto
& spot : ene.second ) {
52
delete
spot;
53
}
54
ene.second.clear();
55
}
56
dist.second.clear();
57
}
58
eta
.second.clear();
59
}
60
m_libData
.clear();
61
}
62
64
virtual
std::vector<EnergySpot>*
getShower
(
const
G4Track* track,
ShowerLibStatistics
* stats,
int
randomShift)
const
;
66
virtual
double
getContainmentZ
(
const
G4Track* track)
const
;
68
virtual
double
getContainmentR
(
const
G4Track* track)
const
;
70
virtual
bool
storeShower
(
HepMC::ConstGenParticlePtr
genParticle,
const
Shower
* shower);
72
virtual
bool
writeToROOT
(TFile* dest);
73
74
virtual
ShowerLibStatistics
*
createStatistics
()
const
;
75
76
inline
virtual
const
std::string
getName
()
const
{
return
"FCALDist Eta Energy ShowerLib"
; }
77
78
protected
:
79
80
virtual
const
std::string
printParameters
()
const
;
81
82
private
:
83
84
FCALDistEtaEnergyShowerLib
():
m_xrodcent
(0.0)
85
,
m_yrodcent
(0.0)
86
,
m_step
(0.0)
87
#ifndef __FSLIB_NO_BACKWARD_COMPAT__
88
,
m_compat
(false)
89
#endif
90
{}
91
93
bool
read
(TTree* source);
95
bool
write
(TTree* dest)
const
;
97
bool
readStructure
(std::map<
float
, std::vector<float> >& structure);
98
99
float
distance
(
double
x
,
double
y
)
const
;
100
101
typedef
std::map<float,Shower>
distbin
;
102
typedef
std::map<float,distbin>
etabin
;
103
typedef
std::map<float,etabin>
library
;
104
105
library
m_libData
;
106
107
//distance calculator parameters
108
double
m_xrodcent
;
109
double
m_yrodcent
;
110
double
m_step
;
111
112
#ifndef __FSLIB_NO_BACKWARD_COMPAT__
113
bool
m_compat
;
114
#endif
115
116
};
117
118
}
// namespace ShowerLib
119
120
#endif
// SHOWER_LIB_FCALDIST_SHOWER_LIB_H
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
IShowerLib.h
y
#define y
x
#define x
ShowerLib::FCALDistEtaEnergyShowerLib::distbin
std::map< float, Shower > distbin
Definition
FCALDistEtaEnergyShowerLib.h:101
ShowerLib::FCALDistEtaEnergyShowerLib::getContainmentR
virtual double getContainmentR(const G4Track *track) const
get average lateral spread of the showers for the given energy
Definition
FCALDistEtaEnergyShowerLib.cxx:455
ShowerLib::FCALDistEtaEnergyShowerLib::createEmptyLib
static IShowerLib * createEmptyLib(const std::string &inputFile)
factory method. create empty library with the given structure. returns NULL if file is invalid.
Definition
FCALDistEtaEnergyShowerLib.cxx:94
ShowerLib::FCALDistEtaEnergyShowerLib::m_xrodcent
double m_xrodcent
Definition
FCALDistEtaEnergyShowerLib.h:108
ShowerLib::FCALDistEtaEnergyShowerLib::library
std::map< float, etabin > library
Definition
FCALDistEtaEnergyShowerLib.h:103
ShowerLib::FCALDistEtaEnergyShowerLib::etabin
std::map< float, distbin > etabin
Definition
FCALDistEtaEnergyShowerLib.h:102
ShowerLib::FCALDistEtaEnergyShowerLib::readStructure
bool readStructure(std::map< float, std::vector< float > > &structure)
Definition
FCALDistEtaEnergyShowerLib.cxx:779
ShowerLib::FCALDistEtaEnergyShowerLib::~FCALDistEtaEnergyShowerLib
virtual ~FCALDistEtaEnergyShowerLib()
default destructor
Definition
FCALDistEtaEnergyShowerLib.h:46
ShowerLib::FCALDistEtaEnergyShowerLib::storeShower
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)
store shower in the library
Definition
FCALDistEtaEnergyShowerLib.cxx:551
ShowerLib::FCALDistEtaEnergyShowerLib::read
bool read(TTree *source)
read library from given TTree
Definition
FCALDistEtaEnergyShowerLib.cxx:615
ShowerLib::FCALDistEtaEnergyShowerLib::getContainmentZ
virtual double getContainmentZ(const G4Track *track) const
get average length of showers for the given energy
Definition
FCALDistEtaEnergyShowerLib.cxx:359
ShowerLib::FCALDistEtaEnergyShowerLib::FCALDistEtaEnergyShowerLib
FCALDistEtaEnergyShowerLib()
Definition
FCALDistEtaEnergyShowerLib.h:84
ShowerLib::FCALDistEtaEnergyShowerLib::m_libData
library m_libData
Definition
FCALDistEtaEnergyShowerLib.h:105
ShowerLib::FCALDistEtaEnergyShowerLib::write
bool write(TTree *dest) const
write library to given TTree
Definition
FCALDistEtaEnergyShowerLib.cxx:697
ShowerLib::FCALDistEtaEnergyShowerLib::m_step
double m_step
Definition
FCALDistEtaEnergyShowerLib.h:110
ShowerLib::FCALDistEtaEnergyShowerLib::readFromROOTFile
static IShowerLib * readFromROOTFile(TFile *source)
factory method. create a library from root file. returns NULL if file is invalid.
Definition
FCALDistEtaEnergyShowerLib.cxx:56
ShowerLib::FCALDistEtaEnergyShowerLib::getShower
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const
get shower for given G4 track
Definition
FCALDistEtaEnergyShowerLib.cxx:247
ShowerLib::FCALDistEtaEnergyShowerLib::writeToROOT
virtual bool writeToROOT(TFile *dest)
write library to ROOT file
Definition
FCALDistEtaEnergyShowerLib.cxx:595
ShowerLib::FCALDistEtaEnergyShowerLib::getName
virtual const std::string getName() const
Definition
FCALDistEtaEnergyShowerLib.h:76
ShowerLib::FCALDistEtaEnergyShowerLib::distance
float distance(double x, double y) const
Definition
FCALDistEtaEnergyShowerLib.cxx:39
ShowerLib::FCALDistEtaEnergyShowerLib::m_compat
bool m_compat
Definition
FCALDistEtaEnergyShowerLib.h:113
ShowerLib::FCALDistEtaEnergyShowerLib::createStatistics
virtual ShowerLibStatistics * createStatistics() const
Definition
FCALDistEtaEnergyShowerLib.cxx:794
ShowerLib::FCALDistEtaEnergyShowerLib::m_yrodcent
double m_yrodcent
Definition
FCALDistEtaEnergyShowerLib.h:109
ShowerLib::FCALDistEtaEnergyShowerLib::printParameters
virtual const std::string printParameters() const
Definition
FCALDistEtaEnergyShowerLib.cxx:771
ShowerLib::IShowerLib::IShowerLib
IShowerLib()
default constructor
Definition
IShowerLib.h:98
ShowerLib::ShowerLibStatistics
Definition
ShowerLibStatistics.h:20
ShowerLib::Shower
Class for shower library shower.
Definition
Shower.h:36
HepMC::ConstGenParticlePtr
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition
GenParticle.h:20
ShowerLib
Namespace for the ShowerLib related classes.
Definition
StepInfo.h:17
Generated on
for ATLAS Offline Software by
1.17.0