ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4ShowerLib
LArG4ShowerLib
EtaEnergyShowerLib.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
6
#ifndef SHOWER_LIB_ETA_ENERGY_SHOWER_LIB_H
7
#define SHOWER_LIB_ETA_ENERGY_SHOWER_LIB_H
8
9
// STL includes
10
#include <map>
11
#include <vector>
12
13
// local includes
14
#include "
LArG4ShowerLib/IShowerLib.h
"
15
16
// G4 forward declarations
17
class
G4Track;
18
19
// Namespace for the ShowerLib related classes
20
namespace
ShowerLib
{
21
34
35
class
EtaEnergyShowerLib
:
public
IShowerLib
{
36
37
public
:
38
40
static
IShowerLib
*
readFromROOTFile
(TFile* source);
41
43
static
IShowerLib
*
createEmptyLib
(
const
std::string& inputFile);
44
46
virtual
~EtaEnergyShowerLib
()
47
{
48
for
(
auto
&
eta
:
m_libData
) {
// eta bins
49
for
(
auto
& ene :
eta
.second ) {
// energy map
50
for
(
auto
& spot : ene.second ) {
51
delete
spot;
52
}
53
ene.second.clear();
54
}
55
eta
.second.clear();
56
}
57
m_libData
.clear();
58
}
59
61
virtual
std::vector<EnergySpot>*
getShower
(
const
G4Track* track,
ShowerLibStatistics
* stats,
int
randomShift)
const
;
63
virtual
double
getContainmentZ
(
const
G4Track* track)
const
;
65
virtual
double
getContainmentR
(
const
G4Track* track)
const
;
67
virtual
bool
storeShower
(
HepMC::ConstGenParticlePtr
genParticle,
const
Shower
* shower);
69
virtual
bool
writeToROOT
(TFile* dest);
70
71
virtual
ShowerLibStatistics
*
createStatistics
()
const
;
72
73
inline
virtual
const
std::string
getName
()
const
{
return
"Eta Energy ShowerLib"
; }
74
75
protected
:
76
77
virtual
const
std::string
printParameters
()
const
{
return
""
;}
78
79
private
:
80
81
EtaEnergyShowerLib
():
m_mineta
(0),
m_maxeta
(0),
m_onlyPositive
(false) {}
82
84
bool
read
(TTree* source);
86
bool
write
(TTree* dest)
const
;
88
bool
readStructure
(std::vector<float>& structure);
89
90
bool
checkEtaAndStuff
(
const
G4Track* track)
const
;
91
92
float
m_mineta
,
m_maxeta
;
93
94
typedef
std::map<float,Shower>
etabin
;
95
typedef
std::map<float,etabin>
library
;
96
97
library
m_libData
;
98
bool
m_onlyPositive
;
99
100
};
101
102
}
// namespace ShowerLib
103
104
#endif
// SHOWER_LIB_ETA_SHOWER_LIB_H
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
IShowerLib.h
ShowerLib::EtaEnergyShowerLib::etabin
std::map< float, Shower > etabin
Definition
EtaEnergyShowerLib.h:94
ShowerLib::EtaEnergyShowerLib::m_onlyPositive
bool m_onlyPositive
Definition
EtaEnergyShowerLib.h:98
ShowerLib::EtaEnergyShowerLib::printParameters
virtual const std::string printParameters() const
Definition
EtaEnergyShowerLib.h:77
ShowerLib::EtaEnergyShowerLib::createEmptyLib
static IShowerLib * createEmptyLib(const std::string &inputFile)
factory method. create empty library with the given structure. returns NULL if file is invalid.
Definition
EtaEnergyShowerLib.cxx:62
ShowerLib::EtaEnergyShowerLib::readFromROOTFile
static IShowerLib * readFromROOTFile(TFile *source)
factory method. create a library from root file. returns NULL if file is invalid.
Definition
EtaEnergyShowerLib.cxx:36
ShowerLib::EtaEnergyShowerLib::write
bool write(TTree *dest) const
write library to given TTree
Definition
EtaEnergyShowerLib.cxx:467
ShowerLib::EtaEnergyShowerLib::m_libData
library m_libData
Definition
EtaEnergyShowerLib.h:97
ShowerLib::EtaEnergyShowerLib::read
bool read(TTree *source)
read library from given TTree
Definition
EtaEnergyShowerLib.cxx:410
ShowerLib::EtaEnergyShowerLib::EtaEnergyShowerLib
EtaEnergyShowerLib()
Definition
EtaEnergyShowerLib.h:81
ShowerLib::EtaEnergyShowerLib::library
std::map< float, etabin > library
Definition
EtaEnergyShowerLib.h:95
ShowerLib::EtaEnergyShowerLib::getName
virtual const std::string getName() const
Definition
EtaEnergyShowerLib.h:73
ShowerLib::EtaEnergyShowerLib::m_maxeta
float m_maxeta
Definition
EtaEnergyShowerLib.h:92
ShowerLib::EtaEnergyShowerLib::getContainmentZ
virtual double getContainmentZ(const G4Track *track) const
get average length of showers for the given energy
Definition
EtaEnergyShowerLib.cxx:231
ShowerLib::EtaEnergyShowerLib::storeShower
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)
store shower in the library
Definition
EtaEnergyShowerLib.cxx:359
ShowerLib::EtaEnergyShowerLib::m_mineta
float m_mineta
Definition
EtaEnergyShowerLib.h:92
ShowerLib::EtaEnergyShowerLib::createStatistics
virtual ShowerLibStatistics * createStatistics() const
Definition
EtaEnergyShowerLib.cxx:527
ShowerLib::EtaEnergyShowerLib::writeToROOT
virtual bool writeToROOT(TFile *dest)
write library to ROOT file
Definition
EtaEnergyShowerLib.cxx:390
ShowerLib::EtaEnergyShowerLib::readStructure
bool readStructure(std::vector< float > &structure)
Definition
EtaEnergyShowerLib.cxx:516
ShowerLib::EtaEnergyShowerLib::getShower
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const
get shower for given G4 track
Definition
EtaEnergyShowerLib.cxx:151
ShowerLib::EtaEnergyShowerLib::checkEtaAndStuff
bool checkEtaAndStuff(const G4Track *track) const
Definition
EtaEnergyShowerLib.cxx:550
ShowerLib::EtaEnergyShowerLib::getContainmentR
virtual double getContainmentR(const G4Track *track) const
get average lateral spread of the showers for the given energy
Definition
EtaEnergyShowerLib.cxx:295
ShowerLib::EtaEnergyShowerLib::~EtaEnergyShowerLib
virtual ~EtaEnergyShowerLib()
default destructor
Definition
EtaEnergyShowerLib.h:46
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