ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4ShowerLib
LArG4ShowerLib
IShowerLib.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_ISHOWER_LIB_H
6
#define SHOWER_LIB_ISHOWER_LIB_H
7
8
// STL includes
9
#include <string>
10
#include <vector>
11
#include "
LArG4Code/EnergySpot.h
"
12
13
#include "
LArG4ShowerLib/Shower.h
"
14
#include "
LArG4ShowerLib/ShowerLibStatistics.h
"
15
16
// forward declarations
17
class
G4Track;
18
class
TFile;
19
class
TTree;
20
21
#include "
AtlasHepMC/GenParticle_fwd.h
"
22
23
// Namespace for the ShowerLib related classes
24
namespace
ShowerLib
{
25
26
39
40
class
IShowerLib
{
41
42
public
:
43
45
virtual
~IShowerLib
() {}
46
48
virtual
std::vector<EnergySpot>*
getShower
(
const
G4Track* track,
ShowerLibStatistics
* stats,
int
randomShift)
const
= 0;
50
virtual
double
getContainmentZ
(
const
G4Track* track)
const
= 0;
52
virtual
double
getContainmentR
(
const
G4Track* track)
const
= 0;
54
virtual
bool
storeShower
(
HepMC::ConstGenParticlePtr
genParticle,
const
Shower
* shower) = 0;
56
virtual
bool
writeToROOT
(TFile* dest) = 0;
57
58
virtual
ShowerLibStatistics
*
createStatistics
()
const
= 0;
60
const
std::string
statistics
()
const
;
61
63
inline
virtual
const
std::string
detector
()
const
;
64
// //! set detector tag
65
// inline virtual void detector(const std::string& det);
67
inline
virtual
int
particle_id
()
const
;
68
// //! set particle tag
69
// inline virtual void particle_id(const int particle_id);
71
inline
virtual
const
std::string
release
()
const
;
73
inline
virtual
void
release
(
const
std::string&
release
);
75
inline
virtual
const
std::string
geometry
()
const
;
77
inline
virtual
void
geometry
(
const
std::string&
geometry
);
79
inline
virtual
const
std::string
geantVersion
()
const
;
81
inline
virtual
void
geantVersion
(
const
std::string& version);
83
inline
virtual
const
std::string
physicsList
()
const
;
85
inline
virtual
void
physicsList
(
const
std::string& list);
87
inline
virtual
const
std::string
comment
()
const
;
89
inline
virtual
void
comment
(
const
std::string&
comment
);
91
inline
virtual
void
addComment
(
const
std::string&
comment
);
92
93
inline
virtual
const
std::string
getName
()
const
{
return
"IShowerLib"
; }
94
95
protected
:
96
98
IShowerLib
() :
m_detector
(
"NotSet"
),
m_particle
(0),
m_release
(
"NotSet"
),
m_geometry
(
"NotSet"
),
m_geantVersion
(
"NotSet"
),
m_physicsList
(
"NotSet"
),
m_filled
(false) {}
100
bool
readMeta
(TTree* source);
102
bool
writeMeta
(TTree* dest)
const
;
103
104
virtual
const
std::string
printParameters
()
const
= 0;
105
106
std::string
m_detector
;
107
int
m_particle
;
108
std::string
m_release
;
109
std::string
m_geometry
;
110
std::string
m_geantVersion
;
111
std::string
m_physicsList
;
112
std::string
m_comment
;
113
114
bool
m_filled
;
115
116
};
117
118
119
// inline functions
120
121
const
std::string
IShowerLib::detector
()
const
{
return
m_detector
; }
122
//void IShowerLib::detector(const std::string& det) { m_detector = det; }
123
124
int
IShowerLib::particle_id
()
const
{
return
m_particle
; }
125
//void IShowerLib::particle_id(const int particle) { m_particle = particle; }
126
127
const
std::string
IShowerLib::release
()
const
{
return
m_release
; }
128
void
IShowerLib::release
(
const
std::string&
release
) {
m_release
=
release
; }
129
130
const
std::string
IShowerLib::geometry
()
const
{
return
m_geometry
; }
131
void
IShowerLib::geometry
(
const
std::string&
geometry
) {
m_geometry
=
geometry
; }
132
133
const
std::string
IShowerLib::geantVersion
()
const
{
return
m_geantVersion
; }
134
void
IShowerLib::geantVersion
(
const
std::string& version) {
m_geantVersion
= version; }
135
136
const
std::string
IShowerLib::physicsList
()
const
{
return
m_physicsList
; }
137
void
IShowerLib::physicsList
(
const
std::string& list) {
m_physicsList
= list; }
138
139
const
std::string
IShowerLib::comment
()
const
{
return
m_comment
; }
140
void
IShowerLib::comment
(
const
std::string&
comment
) {
m_comment
=
comment
; }
141
void
IShowerLib::addComment
(
const
std::string&
comment
) {
m_comment
+=
comment
; }
142
143
}
// namespace ShowerLib
144
145
#endif
// SHOWER_LIB_ISHOWER_LIB_H
EnergySpot.h
GenParticle_fwd.h
ShowerLibStatistics.h
Shower.h
ShowerLib::IShowerLib::readMeta
bool readMeta(TTree *source)
read metadata from the given TTree
Definition
IShowerLib.cxx:16
ShowerLib::IShowerLib::m_geantVersion
std::string m_geantVersion
geant 4 version
Definition
IShowerLib.h:110
ShowerLib::IShowerLib::geometry
virtual const std::string geometry() const
get Geometry tag
Definition
IShowerLib.h:130
ShowerLib::IShowerLib::IShowerLib
IShowerLib()
default constructor
Definition
IShowerLib.h:98
ShowerLib::IShowerLib::release
virtual const std::string release() const
get Release tag
Definition
IShowerLib.h:127
ShowerLib::IShowerLib::addComment
virtual void addComment(const std::string &comment)
add given string to comment
Definition
IShowerLib.h:141
ShowerLib::IShowerLib::statistics
const std::string statistics() const
print library statistics
Definition
IShowerLib.cxx:71
ShowerLib::IShowerLib::particle_id
virtual int particle_id() const
get particle tag
Definition
IShowerLib.h:124
ShowerLib::IShowerLib::geantVersion
virtual const std::string geantVersion() const
get geant version tag
Definition
IShowerLib.h:133
ShowerLib::IShowerLib::physicsList
virtual const std::string physicsList() const
get geant 4 physics list name
Definition
IShowerLib.h:136
ShowerLib::IShowerLib::m_release
std::string m_release
atlas software release
Definition
IShowerLib.h:108
ShowerLib::IShowerLib::m_particle
int m_particle
ID of the generated particles.
Definition
IShowerLib.h:107
ShowerLib::IShowerLib::getShower
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const =0
get shower for given G4 track
ShowerLib::IShowerLib::writeToROOT
virtual bool writeToROOT(TFile *dest)=0
write library to ROOT file
ShowerLib::IShowerLib::printParameters
virtual const std::string printParameters() const =0
ShowerLib::IShowerLib::getContainmentR
virtual double getContainmentR(const G4Track *track) const =0
get average lateral spread of the showers for the given energy
ShowerLib::IShowerLib::comment
virtual const std::string comment() const
get comment
Definition
IShowerLib.h:139
ShowerLib::IShowerLib::writeMeta
bool writeMeta(TTree *dest) const
write metadata to the given TTree
Definition
IShowerLib.cxx:40
ShowerLib::IShowerLib::m_detector
std::string m_detector
name of the detector
Definition
IShowerLib.h:106
ShowerLib::IShowerLib::storeShower
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)=0
store shower in the library
ShowerLib::IShowerLib::getContainmentZ
virtual double getContainmentZ(const G4Track *track) const =0
get average length of showers for the given energy
ShowerLib::IShowerLib::createStatistics
virtual ShowerLibStatistics * createStatistics() const =0
ShowerLib::IShowerLib::m_comment
std::string m_comment
comment
Definition
IShowerLib.h:112
ShowerLib::IShowerLib::detector
virtual const std::string detector() const
get detector tag
Definition
IShowerLib.h:121
ShowerLib::IShowerLib::m_filled
bool m_filled
is the library read from ROOT or from structure file
Definition
IShowerLib.h:114
ShowerLib::IShowerLib::m_physicsList
std::string m_physicsList
used geant 4 physics list
Definition
IShowerLib.h:111
ShowerLib::IShowerLib::~IShowerLib
virtual ~IShowerLib()
empty destructor
Definition
IShowerLib.h:45
ShowerLib::IShowerLib::getName
virtual const std::string getName() const
Definition
IShowerLib.h:93
ShowerLib::IShowerLib::m_geometry
std::string m_geometry
atlas geometry version
Definition
IShowerLib.h:109
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