CMS 3D CMS Logo

CastorShowerLibrary.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_CastorShowerLibrary_h
2 #define SimG4CMS_CastorShowerLibrary_h
3 // File: CastorShowerLibrary.h
5 // Description: Gets information from a shower library
6 // Adapted from HFShowerLibrary class
7 //
8 // Wagner Carvalho (wcarvalh@cern.ch)
9 //
11 
17 
18 #include "G4ParticleTable.hh"
19 #include "G4ThreeVector.hh"
20 
21 #include <string>
22 #include <memory>
23 
24 class G4Step;
25 class TFile;
26 class TBranchObject;
27 
29 
30 public:
31 
32  //Constructor and Destructor
35 
36 public:
37 
38  CastorShowerEvent getShowerHits(const G4Step*, bool&);
39  int FindEnergyBin(double);
40  int FindEtaBin(double);
41  int FindPhiBin(double);
42 
43 protected:
44 
45  void initFile(edm::ParameterSet const & );
46  void getRecord(int, int);
47  void loadEventInfo(TBranchObject *);
48  // if eta or phi is not given, take into account only the binning in energy
49  void select(int, double,double =0,double=9);
50 
51 private:
52 
53  TFile *hf;
54  TBranchObject *evtInfo; // pointer to CastorShowerLibraryInfo-type branch
55  TBranchObject *emBranch, *hadBranch; // pointer to CastorShowerEvent-type branch
56 
57  // User defined classes in Root Dictionary
60 
61  bool verbose;
62  unsigned int nMomBin, totEvents, evtPerBin;
63 
64  std::vector<double> pmom;
65 
66  // new variables (bins in eta and phi)
67  unsigned int nBinsE, nBinsEta, nBinsPhi;
69  std::vector<double> SLenergies;
70  std::vector<double> SLetas;
71  std::vector<double> SLphis;
72 };
73 #endif
void select(int, double, double=0, double=9)
CastorShowerLibrary(const std::string &name, edm::ParameterSet const &p)
std::vector< double > pmom
std::vector< double > SLetas
CastorShowerEvent getShowerHits(const G4Step *, bool &)
TBranchObject * emBranch
std::vector< double > SLphis
TBranchObject * hadBranch
void initFile(edm::ParameterSet const &)
std::vector< double > SLenergies
CastorShowerLibraryInfo * eventInfo
void loadEventInfo(TBranchObject *)
CastorShowerEvent * showerEvent
TBranchObject * evtInfo