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 TBranch;
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  CastorShowerEvent getRecord(int, int);
42  void loadEventInfo(TBranch *);
43  // if eta or phi is not given, take into account only the binning in energy
44  CastorShowerEvent select(int, double, double = 0, double = 9);
45 
46 private:
47  TFile *hf;
48  TBranch *emBranch, *hadBranch; // pointer to CastorShowerEvent-type branch
49 
50  bool verbose;
51  unsigned int nMomBin, totEvents, evtPerBin;
52 
53  std::vector<double> pmom;
54 
55  // new variables (bins in eta and phi)
56  unsigned int nBinsE, nBinsEta, nBinsPhi;
58  std::vector<double> SLenergies;
59  std::vector<double> SLetas;
60  std::vector<double> SLphis;
61 };
62 #endif
CastorShowerLibrary::SLphis
std::vector< double > SLphis
Definition: CastorShowerLibrary.h:60
CastorShowerLibrary::nBinsEta
unsigned int nBinsEta
Definition: CastorShowerLibrary.h:56
MessageLogger.h
CastorShowerLibrary::nMomBin
unsigned int nMomBin
Definition: CastorShowerLibrary.h:51
CastorShowerLibrary::initFile
void initFile(edm::ParameterSet const &)
Definition: CastorShowerLibrary.cc:59
CastorShowerLibrary::getRecord
CastorShowerEvent getRecord(int, int)
Definition: CastorShowerLibrary.cc:229
CastorShowerLibrary::SLetas
std::vector< double > SLetas
Definition: CastorShowerLibrary.h:59
CastorShowerLibrary::FindPhiBin
int FindPhiBin(double)
Definition: CastorShowerLibrary.cc:373
CastorShowerLibrary::loadEventInfo
void loadEventInfo(TBranch *)
Definition: CastorShowerLibrary.cc:123
CastorShowerLibrary::getShowerHits
CastorShowerEvent getShowerHits(const G4Step *, bool &)
Definition: CastorShowerLibrary.cc:191
CastorShowerLibrary
Definition: CastorShowerLibrary.h:27
CastorShowerLibrary::FindEnergyBin
int FindEnergyBin(double)
Definition: CastorShowerLibrary.cc:331
CastorShowerLibrary::hf
TFile * hf
Definition: CastorShowerLibrary.h:47
CastorShowerLibrary::FindEtaBin
int FindEtaBin(double)
Definition: CastorShowerLibrary.cc:353
CastorShowerLibrary::nEvtPerBinPhi
unsigned int nEvtPerBinPhi
Definition: CastorShowerLibrary.h:57
CastorShowerLibrary::nEvtPerBinE
unsigned int nEvtPerBinE
Definition: CastorShowerLibrary.h:57
CastorShowerLibrary::CastorShowerLibrary
CastorShowerLibrary(const std::string &name, edm::ParameterSet const &p)
Definition: CastorShowerLibrary.cc:30
CastorShowerLibrary::select
CastorShowerEvent select(int, double, double=0, double=9)
Definition: CastorShowerLibrary.cc:266
CastorShowerLibrary::totEvents
unsigned int totEvents
Definition: CastorShowerLibrary.h:51
CastorShowerLibrary::emBranch
TBranch * emBranch
Definition: CastorShowerLibrary.h:48
CastorShowerLibrary::evtPerBin
unsigned int evtPerBin
Definition: CastorShowerLibrary.h:51
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CastorShowerEvent
Definition: CastorShowerEvent.h:15
CastorShowerLibrary::verbose
bool verbose
Definition: CastorShowerLibrary.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CastorShowerLibraryInfo.h
CastorShowerLibrary::nBinsPhi
unsigned int nBinsPhi
Definition: CastorShowerLibrary.h:56
CastorShowerLibrary::nEvtPerBinEta
unsigned int nEvtPerBinEta
Definition: CastorShowerLibrary.h:57
CastorShowerLibrary::nBinsE
unsigned int nBinsE
Definition: CastorShowerLibrary.h:56
CastorShowerLibrary::SLenergies
std::vector< double > SLenergies
Definition: CastorShowerLibrary.h:58
CastorShowerLibrary::pmom
std::vector< double > pmom
Definition: CastorShowerLibrary.h:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CastorShowerLibrary::hadBranch
TBranch * hadBranch
Definition: CastorShowerLibrary.h:48
ParameterSet.h
CastorShowerLibrary::~CastorShowerLibrary
~CastorShowerLibrary()
Definition: CastorShowerLibrary.cc:52
CastorShowerEvent.h