6#ifndef SHOWER_LIB_ETA_ENERGY_SHOWER_LIB_H
7#define SHOWER_LIB_ETA_ENERGY_SHOWER_LIB_H
49 for (
auto& ene :
eta.second ) {
50 for (
auto& spot : ene.second ) {
73 inline virtual const std::string
getName()
const {
return "Eta Energy ShowerLib"; }
84 bool read(TTree* source);
86 bool write(TTree* dest)
const;
94 typedef std::map<float,Shower>
etabin;
Scalar eta() const
pseudorapidity method
std::map< float, Shower > etabin
virtual const std::string printParameters() const
static IShowerLib * createEmptyLib(const std::string &inputFile)
factory method. create empty library with the given structure. returns NULL if file is invalid.
static IShowerLib * readFromROOTFile(TFile *source)
factory method. create a library from root file. returns NULL if file is invalid.
bool write(TTree *dest) const
write library to given TTree
bool read(TTree *source)
read library from given TTree
std::map< float, etabin > library
virtual const std::string getName() const
virtual double getContainmentZ(const G4Track *track) const
get average length of showers for the given energy
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower *shower)
store shower in the library
virtual ShowerLibStatistics * createStatistics() const
virtual bool writeToROOT(TFile *dest)
write library to ROOT file
bool readStructure(std::vector< float > &structure)
virtual std::vector< EnergySpot > * getShower(const G4Track *track, ShowerLibStatistics *stats, int randomShift) const
get shower for given G4 track
bool checkEtaAndStuff(const G4Track *track) const
virtual double getContainmentR(const G4Track *track) const
get average lateral spread of the showers for the given energy
virtual ~EtaEnergyShowerLib()
default destructor
IShowerLib()
default constructor
Class for shower library shower.
const GenParticle * ConstGenParticlePtr
Namespace for the ShowerLib related classes.