CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 //ROOT
22 #include "TROOT.h"
23 #include "TFile.h"
24 #include "TTree.h"
25 #include "TBranchObject.h"
26 
27 #include <string>
28 #include <memory>
29 
30 class G4Step;
31 
33 
34 public:
35 
36  //Constructor and Destructor
39 
40 public:
41 
42  void initParticleTable(G4ParticleTable *);
43  CastorShowerEvent getShowerHits(G4Step*, bool&);
44  int FindEnergyBin(double);
45  int FindEtaBin(double);
46  int FindPhiBin(double);
47 
48 protected:
49 
50  void initFile(edm::ParameterSet const & );
51  void getRecord(int, int);
52  void loadEventInfo(TBranchObject *);
53 // if eta or phi is not given, take into account only the binning in energy
54  void select(int, double,double =0,double=9); // Replaces interpolate / extrapolate
55  // void interpolate(int, double);
56  // void extrapolate(int, double);
57 
58 private:
59 
60  TFile *hf;
61  TBranchObject *evtInfo; // pointer to CastorShowerLibraryInfo-type branch
62  TBranchObject *emBranch, *hadBranch; // pointer to CastorShowerEvent-type branch
63 
64  // User defined classes in Root Dictionary
67 
68  bool verbose;
69  unsigned int nMomBin, totEvents, evtPerBin;
70 
71  std::vector<double> pmom;
72 
76  int mumPDG, mupPDG;
77 // new variables (bins in eta and phi)
78  unsigned int nBinsE, nBinsEta, nBinsPhi;
80  std::vector<double> SLenergies;
81  std::vector<double> SLetas;
82  std::vector<double> SLphis;
83 };
84 #endif
void initParticleTable(G4ParticleTable *)
void select(int, double, double=0, double=9)
std::vector< double > pmom
std::vector< double > SLetas
TBranchObject * emBranch
std::vector< double > SLphis
TBranchObject * hadBranch
CastorShowerLibrary(std::string &name, edm::ParameterSet const &p)
void initFile(edm::ParameterSet const &)
std::vector< double > SLenergies
CastorShowerLibraryInfo * eventInfo
void loadEventInfo(TBranchObject *)
CastorShowerEvent getShowerHits(G4Step *, bool &)
CastorShowerEvent * showerEvent
TBranchObject * evtInfo