ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4ShowerLib
LArG4ShowerLib
FCALDistEnergyShowerLib.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_ENERGY_SHOWER_LIB_H
6
#define SHOWER_LIB_FCALDIST_ENERGY_SHOWER_LIB_H
7
8
// STL includes
9
#include <map>
10
#include <vector>
11
12
// local includes
13
#include "
LArG4ShowerLib/IShowerLib.h
"
14
15
// G4 forward declarations
16
class
G4Track;
17
18
// Namespace for the ShowerLib related classes
19
namespace
ShowerLib
{
20
21
// forward declarations in namespace
22
35
36
class
FCALDistEnergyShowerLib
:
public
IShowerLib
{
37
38
public
:
39
41
static
IShowerLib
*
readFromROOTFile
(TFile* source);
42
44
static
IShowerLib
*
createEmptyLib
(
const
std::string& inputFile);
45
47
virtual
~FCALDistEnergyShowerLib
()
48
{
49
for
(
auto
& dist :
m_libData
) {
// dist 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
m_libData
.clear();
59
}
60
62
virtual
std::vector<EnergySpot>*
getShower
(
const
G4Track* track,
ShowerLibStatistics
* stats,
int
randomShift)
const
;
64
virtual
double
getContainmentZ
(
const
G4Track* track)
const
;
66
virtual
double
getContainmentR
(
const
G4Track* track)
const
;
68
virtual
bool
storeShower
(
HepMC::ConstGenParticlePtr
genParticle,
const
Shower
* shower);
70
virtual
bool
writeToROOT
(TFile* dest);
71
72
virtual
ShowerLibStatistics
*
createStatistics
()
const
;
73
74
inline
virtual
const
std::string
getName
()
const
{
return
"FCALDist Energy ShowerLib"
; }
75
76
protected
:
77
78
virtual
const
std::string
printParameters
()
const
;
79
80
private
:
81
82
FCALDistEnergyShowerLib
():
m_xrodcent
(0.0),
m_yrodcent
(0.0),
m_step
(0.0) {}
83
85
bool
read
(TTree* source);
87
bool
write
(TTree* dest)
const
;
89
bool
readStructure
(std::vector<float>& structure);
90
91
float
distance
(
double
x
,
double
y
)
const
;
92
93
typedef
std::map<float,Shower>
distbin
;
94
typedef
std::map<float,distbin>
library
;
95
96
library
m_libData
;
97
98
//distance calculator parameters
99
double
m_xrodcent
;
100
double
m_yrodcent
;
101
double
m_step
;
102
103
};
104
105
}
// namespace ShowerLib
106
107
#endif
// SHOWER_LIB_FCALDIST_SHOWER_LIB_H
IShowerLib.h
y
#define y
x
#define x
ShowerLib::FCALDistEnergyShowerLib::~FCALDistEnergyShowerLib
virtual ~FCALDistEnergyShowerLib()
default destructor
Definition
FCALDistEnergyShowerLib.h:47
ShowerLib::FCALDistEnergyShowerLib::createStatistics
virtual ShowerLibStatistics * createStatistics() const
Definition
FCALDistEnergyShowerLib.cxx:632
ShowerLib::FCALDistEnergyShowerLib::m_xrodcent
double m_xrodcent
Definition
FCALDistEnergyShowerLib.h:99
ShowerLib::FCALDistEnergyShowerLib::m_yrodcent
double m_yrodcent
Definition
FCALDistEnergyShowerLib.h:100
ShowerLib::FCALDistEnergyShowerLib::library
std::map< float, distbin > library
Definition
FCALDistEnergyShowerLib.h:94
ShowerLib::FCALDistEnergyShowerLib::write
bool write(TTree *dest) const
write library to given TTree
Definition
FCALDistEnergyShowerLib.cxx:551
ShowerLib::FCALDistEnergyShowerLib::FCALDistEnergyShowerLib
FCALDistEnergyShowerLib()
Definition
FCALDistEnergyShowerLib.h:82
ShowerLib::FCALDistEnergyShowerLib::distbin
std::map< float, Shower > distbin
Definition
FCALDistEnergyShowerLib.h:93
ShowerLib::FCALDistEnergyShowerLib::printParameters
virtual const std::string printParameters() const
Definition
FCALDistEnergyShowerLib.cxx:613
ShowerLib::FCALDistEnergyShowerLib::readFromROOTFile
static IShowerLib * readFromROOTFile(TFile *source)
factory method. create a library from root file. returns NULL if file is invalid.
Definition
FCALDistEnergyShowerLib.cxx:53
ShowerLib::FCALDistEnergyShowerLib::storeShower
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)
store shower in the library
Definition
FCALDistEnergyShowerLib.cxx:442
ShowerLib::FCALDistEnergyShowerLib::read
bool read(TTree *source)
read library from given TTree
Definition
FCALDistEnergyShowerLib.cxx:490
ShowerLib::FCALDistEnergyShowerLib::writeToROOT
virtual bool writeToROOT(TFile *dest)
write library to ROOT file
Definition
FCALDistEnergyShowerLib.cxx:470
ShowerLib::FCALDistEnergyShowerLib::getName
virtual const std::string getName() const
Definition
FCALDistEnergyShowerLib.h:74
ShowerLib::FCALDistEnergyShowerLib::createEmptyLib
static IShowerLib * createEmptyLib(const std::string &inputFile)
factory method. create empty library with the given structure. returns NULL if file is invalid.
Definition
FCALDistEnergyShowerLib.cxx:79
ShowerLib::FCALDistEnergyShowerLib::distance
float distance(double x, double y) const
Definition
FCALDistEnergyShowerLib.cxx:36
ShowerLib::FCALDistEnergyShowerLib::getShower
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const
get shower for given G4 track
Definition
FCALDistEnergyShowerLib.cxx:184
ShowerLib::FCALDistEnergyShowerLib::readStructure
bool readStructure(std::vector< float > &structure)
Definition
FCALDistEnergyShowerLib.cxx:621
ShowerLib::FCALDistEnergyShowerLib::m_libData
library m_libData
Definition
FCALDistEnergyShowerLib.h:96
ShowerLib::FCALDistEnergyShowerLib::m_step
double m_step
Definition
FCALDistEnergyShowerLib.h:101
ShowerLib::FCALDistEnergyShowerLib::getContainmentR
virtual double getContainmentR(const G4Track *track) const
get average lateral spread of the showers for the given energy
Definition
FCALDistEnergyShowerLib.cxx:361
ShowerLib::FCALDistEnergyShowerLib::getContainmentZ
virtual double getContainmentZ(const G4Track *track) const
get average length of showers for the given energy
Definition
FCALDistEnergyShowerLib.cxx:280
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