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 
16 
17 #include "G4ParticleTable.hh"
18 #include "G4ThreeVector.hh"
19 
20 #include <string>
21 #include <memory>
22 
23 class G4Step;
24 class TFile;
25 class TBranchObject;
26 
28 public:
29  //Constructor and Destructor
32 
33 public:
34  CastorShowerEvent getShowerHits(const G4Step *, bool &);
35  int FindEnergyBin(double);
36  int FindEtaBin(double);
37  int FindPhiBin(double);
38 
39 protected:
40  void initFile(edm::ParameterSet const &);
41  void getRecord(int, int);
42  void loadEventInfo(TBranchObject *);
43  // if eta or phi is not given, take into account only the binning in energy
44  void select(int, double, double = 0, double = 9);
45 
46 private:
47  TFile *hf;
48  TBranchObject *evtInfo; // pointer to CastorShowerLibraryInfo-type branch
49  TBranchObject *emBranch, *hadBranch; // pointer to CastorShowerEvent-type branch
50 
51  // User defined classes in Root Dictionary
54 
55  bool verbose;
56  unsigned int nMomBin, totEvents, evtPerBin;
57 
58  std::vector<double> pmom;
59 
60  // new variables (bins in eta and phi)
61  unsigned int nBinsE, nBinsEta, nBinsPhi;
63  std::vector<double> SLenergies;
64  std::vector<double> SLetas;
65  std::vector<double> SLphis;
66 };
67 #endif
CastorShowerLibrary::SLphis
std::vector< double > SLphis
Definition: CastorShowerLibrary.h:65
CastorShowerLibrary::nBinsEta
unsigned int nBinsEta
Definition: CastorShowerLibrary.h:61
CastorShowerLibrary::emBranch
TBranchObject * emBranch
Definition: CastorShowerLibrary.h:49
MessageLogger.h
CastorShowerLibrary::nMomBin
unsigned int nMomBin
Definition: CastorShowerLibrary.h:56
CastorShowerLibrary::initFile
void initFile(edm::ParameterSet const &)
Definition: CastorShowerLibrary.cc:59
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CastorShowerLibrary::SLetas
std::vector< double > SLetas
Definition: CastorShowerLibrary.h:64
CastorShowerLibrary::FindPhiBin
int FindPhiBin(double)
Definition: CastorShowerLibrary.cc:371
CastorShowerLibrary::getShowerHits
CastorShowerEvent getShowerHits(const G4Step *, bool &)
Definition: CastorShowerLibrary.cc:190
CastorShowerLibrary
Definition: CastorShowerLibrary.h:27
CastorShowerLibrary::evtInfo
TBranchObject * evtInfo
Definition: CastorShowerLibrary.h:48
CastorShowerLibrary::FindEnergyBin
int FindEnergyBin(double)
Definition: CastorShowerLibrary.cc:329
CastorShowerLibrary::hf
TFile * hf
Definition: CastorShowerLibrary.h:47
CastorShowerLibrary::FindEtaBin
int FindEtaBin(double)
Definition: CastorShowerLibrary.cc:351
CastorShowerLibrary::nEvtPerBinPhi
unsigned int nEvtPerBinPhi
Definition: CastorShowerLibrary.h:62
CastorShowerLibrary::nEvtPerBinE
unsigned int nEvtPerBinE
Definition: CastorShowerLibrary.h:62
CastorShowerLibraryInfo
Definition: CastorShowerLibraryInfo.h:41
CastorShowerLibrary::CastorShowerLibrary
CastorShowerLibrary(const std::string &name, edm::ParameterSet const &p)
Definition: CastorShowerLibrary.cc:30
CastorShowerLibrary::totEvents
unsigned int totEvents
Definition: CastorShowerLibrary.h:56
CastorShowerLibrary::select
void select(int, double, double=0, double=9)
Definition: CastorShowerLibrary.cc:264
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CastorShowerLibrary::evtPerBin
unsigned int evtPerBin
Definition: CastorShowerLibrary.h:56
edm::ParameterSet
Definition: ParameterSet.h:47
CastorShowerEvent
Definition: CastorShowerEvent.h:15
CastorShowerLibrary::verbose
bool verbose
Definition: CastorShowerLibrary.h:55
CastorShowerLibrary::hadBranch
TBranchObject * hadBranch
Definition: CastorShowerLibrary.h:49
CastorShowerLibraryInfo.h
CastorShowerLibrary::nBinsPhi
unsigned int nBinsPhi
Definition: CastorShowerLibrary.h:61
CastorShowerLibrary::nEvtPerBinEta
unsigned int nEvtPerBinEta
Definition: CastorShowerLibrary.h:62
CastorShowerLibrary::nBinsE
unsigned int nBinsE
Definition: CastorShowerLibrary.h:61
CastorShowerLibrary::SLenergies
std::vector< double > SLenergies
Definition: CastorShowerLibrary.h:63
CastorShowerLibrary::eventInfo
CastorShowerLibraryInfo * eventInfo
Definition: CastorShowerLibrary.h:52
CastorShowerLibrary::pmom
std::vector< double > pmom
Definition: CastorShowerLibrary.h:58
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CastorShowerLibrary::loadEventInfo
void loadEventInfo(TBranchObject *)
Definition: CastorShowerLibrary.cc:123
CastorShowerLibrary::getRecord
void getRecord(int, int)
Definition: CastorShowerLibrary.cc:229
CastorShowerLibrary::showerEvent
CastorShowerEvent * showerEvent
Definition: CastorShowerLibrary.h:53
ParameterSet.h
CastorShowerLibrary::~CastorShowerLibrary
~CastorShowerLibrary()
Definition: CastorShowerLibrary.cc:52
CastorShowerEvent.h