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