ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4ShowerLib
LArG4ShowerLib
TestShowerLib.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#ifndef SHOWER_LIB_TEST_SHOWER_LIB_H
7
#define SHOWER_LIB_TEST_SHOWER_LIB_H
8
9
// STL includes
10
#include <list>
11
12
// local includes
13
#include "
LArG4ShowerLib/IShowerLib.h
"
14
15
// G4 forward declarations
16
class
G4Track;
17
// forward declarations in namespace
18
#include "
AtlasHepMC/SimpleVector.h
"
19
// Namespace for the ShowerLib related classes
20
namespace
ShowerLib
{
21
34
35
class
TestShowerLib
:
public
IShowerLib
{
36
37
public
:
38
40
static
IShowerLib
*
readFromROOTFile
(TFile* source);
41
43
static
IShowerLib
*
createEmptyLib
(
const
std::string& inputFile);
44
46
virtual
~TestShowerLib
();
47
49
virtual
std::vector<EnergySpot>*
getShower
(
const
G4Track* track,
ShowerLibStatistics
* stats,
int
randomShift)
const
;
51
virtual
double
getContainmentZ
(
const
G4Track* track)
const
;
53
virtual
double
getContainmentR
(
const
G4Track* track)
const
;
55
virtual
bool
storeShower
(
HepMC::ConstGenParticlePtr
genParticle,
const
Shower
* shower);
57
virtual
bool
writeToROOT
(TFile* dest);
58
59
virtual
ShowerLibStatistics
*
createStatistics
()
const
;
60
61
inline
virtual
const
std::string
getName
()
const
{
return
"Test Energy ShowerLib"
; }
62
63
protected
:
64
65
virtual
const
std::string
printParameters
()
const
{
return
""
;}
66
67
private
:
68
69
TestShowerLib
() {}
70
71
struct
genInfo
{
72
std::unique_ptr<HepMC::FourVector>
vertex
;
73
std::unique_ptr<HepMC::FourVector>
momentum
;
74
};
75
76
typedef
std::pair<genInfo,Shower>
storedShower
;
77
typedef
std::list<storedShower>
library
;
78
80
bool
read
(TTree* source);
82
bool
write
(TTree* dest)
const
;
83
84
library
m_libData
;
85
};
86
87
}
// namespace ShowerLib
88
89
#endif
// SHOWER_LIB_ETA_SHOWER_LIB_H
IShowerLib.h
SimpleVector.h
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
ShowerLib::TestShowerLib::getShower
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const
get shower for given G4 track
Definition
TestShowerLib.cxx:118
ShowerLib::TestShowerLib::getName
virtual const std::string getName() const
Definition
TestShowerLib.h:61
ShowerLib::TestShowerLib::storeShower
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)
store shower in the library
Definition
TestShowerLib.cxx:151
ShowerLib::TestShowerLib::storedShower
std::pair< genInfo, Shower > storedShower
Definition
TestShowerLib.h:76
ShowerLib::TestShowerLib::createEmptyLib
static IShowerLib * createEmptyLib(const std::string &inputFile)
factory method. create empty library with the given structure. returns NULL if file is invalid.
Definition
TestShowerLib.cxx:67
ShowerLib::TestShowerLib::writeToROOT
virtual bool writeToROOT(TFile *dest)
write library to ROOT file
Definition
TestShowerLib.cxx:167
ShowerLib::TestShowerLib::getContainmentR
virtual double getContainmentR(const G4Track *track) const
get average lateral spread of the showers for the given energy
Definition
TestShowerLib.cxx:140
ShowerLib::TestShowerLib::TestShowerLib
TestShowerLib()
Definition
TestShowerLib.h:69
ShowerLib::TestShowerLib::getContainmentZ
virtual double getContainmentZ(const G4Track *track) const
get average length of showers for the given energy
Definition
TestShowerLib.cxx:129
ShowerLib::TestShowerLib::write
bool write(TTree *dest) const
write library to given TTree
Definition
TestShowerLib.cxx:233
ShowerLib::TestShowerLib::readFromROOTFile
static IShowerLib * readFromROOTFile(TFile *source)
factory method. create a library from root file. returns NULL if file is invalid.
Definition
TestShowerLib.cxx:41
ShowerLib::TestShowerLib::~TestShowerLib
virtual ~TestShowerLib()
default destructor
Definition
TestShowerLib.cxx:37
ShowerLib::TestShowerLib::read
bool read(TTree *source)
read library from given TTree
Definition
TestShowerLib.cxx:187
ShowerLib::TestShowerLib::m_libData
library m_libData
Definition
TestShowerLib.h:84
ShowerLib::TestShowerLib::library
std::list< storedShower > library
Definition
TestShowerLib.h:77
ShowerLib::TestShowerLib::printParameters
virtual const std::string printParameters() const
Definition
TestShowerLib.h:65
ShowerLib::TestShowerLib::createStatistics
virtual ShowerLibStatistics * createStatistics() const
Definition
TestShowerLib.cxx:281
HepMC::ConstGenParticlePtr
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition
GenParticle.h:20
ShowerLib
Namespace for the ShowerLib related classes.
Definition
StepInfo.h:17
ShowerLib::TestShowerLib::genInfo
Definition
TestShowerLib.h:71
ShowerLib::TestShowerLib::genInfo::momentum
std::unique_ptr< HepMC::FourVector > momentum
Definition
TestShowerLib.h:73
ShowerLib::TestShowerLib::genInfo::vertex
std::unique_ptr< HepMC::FourVector > vertex
Definition
TestShowerLib.h:72
Generated on
for ATLAS Offline Software by
1.17.0