CMS 3D CMS Logo

HFShowerLibrary.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_HFShowerLibrary_h
2 #define SimG4CMS_HFShowerLibrary_h 1
3 // File: HFShowerLibrary.h
5 // Description: Gets information from a shower library
7 
14 
15 #include "G4ThreeVector.hh"
16 
17 //ROOT
18 #include "TROOT.h"
19 #include "TFile.h"
20 #include "TTree.h"
21 
22 #include <string>
23 #include <memory>
24 
25 class G4Step;
26 class G4ParticleTable;
27 
29 public:
30  //Constructor and Destructor
32  const HcalDDDSimConstants *hcons,
33  const HcalSimulationParameters *hps,
34  edm::ParameterSet const &p);
36 
37 public:
38  struct Hit {
39  Hit() {}
40  G4ThreeVector position;
41  int depth;
42  double time;
43  };
44 
45  std::vector<Hit> getHits(const G4Step *aStep, bool &ok, double weight, bool onlyLong = false);
46  std::vector<Hit> fillHits(const G4ThreeVector &p,
47  const G4ThreeVector &v,
48  int parCode,
49  double parEnergy,
50  bool &ok,
51  double weight,
52  double time,
53  bool onlyLong = false);
54 
55 protected:
56  bool rInside(double r);
57  void getRecord(int, int);
58  void loadEventInfo(TBranch *);
59  void interpolate(int, double);
60  void extrapolate(int, double);
61  void storePhoton(int j);
62 
63 private:
65  std::unique_ptr<HFFibre> fibre_;
66  TFile *hf;
67  TBranch *emBranch, *hadBranch;
68 
72  std::vector<double> pmom;
73 
76  double probMax, backProb;
77  double dphi, rMin, rMax;
78  std::vector<double> gpar;
79 
80  int npe;
84 };
85 #endif
HFShowerLibrary::hf
TFile * hf
Definition: HFShowerLibrary.h:66
HFShowerLibrary::HFShowerLibrary
HFShowerLibrary(const std::string &name, const HcalDDDSimConstants *hcons, const HcalSimulationParameters *hps, edm::ParameterSet const &p)
Definition: HFShowerLibrary.cc:23
MessageLogger.h
HFShowerLibrary::nMomBin
int nMomBin
Definition: HFShowerLibrary.h:70
HFShowerLibrary::Hit::depth
int depth
Definition: HFShowerLibrary.h:41
HFFibre.h
protons_cff.time
time
Definition: protons_cff.py:35
HFShowerLibrary::gpar
std::vector< double > gpar
Definition: HFShowerLibrary.h:78
HFShowerLibrary::probMax
double probMax
Definition: HFShowerLibrary.h:76
HFShowerLibrary::photon
HFShowerPhotonCollection photon
Definition: HFShowerLibrary.h:83
HFShowerLibrary::evtPerBin
int evtPerBin
Definition: HFShowerLibrary.h:70
HFShowerLibrary::npe
int npe
Definition: HFShowerLibrary.h:80
HFShowerLibrary::fibre_
std::unique_ptr< HFFibre > fibre_
Definition: HFShowerLibrary.h:65
findQualityFiles.v
v
Definition: findQualityFiles.py:179
HFShowerLibrary::v3version
bool v3version
Definition: HFShowerLibrary.h:69
HFShowerLibrary::storePhoton
void storePhoton(int j)
Definition: HFShowerLibrary.cc:580
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HFShowerLibrary::~HFShowerLibrary
~HFShowerLibrary()
Definition: HFShowerLibrary.cc:137
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
HFShowerLibrary::emBranch
TBranch * emBranch
Definition: HFShowerLibrary.h:67
HFShowerLibrary::getRecord
void getRecord(int, int)
Definition: HFShowerLibrary.cc:349
HFShowerLibrary::fileVersion_
int fileVersion_
Definition: HFShowerLibrary.h:74
HFShowerLibrary::hcalConstant_
const HcalDDDSimConstants * hcalConstant_
Definition: HFShowerLibrary.h:64
HFShowerLibrary
Definition: HFShowerLibrary.h:28
HcalSimulationParameters.h
HFShowerLibrary::dphi
double dphi
Definition: HFShowerLibrary.h:77
HFShowerLibrary::totEvents
int totEvents
Definition: HFShowerLibrary.h:70
HFShowerLibrary::hadBranch
TBranch * hadBranch
Definition: HFShowerLibrary.h:67
HFShowerLibrary::extrapolate
void extrapolate(int, double)
Definition: HFShowerLibrary.cc:515
HFShowerLibrary::Hit::time
double time
Definition: HFShowerLibrary.h:42
HFShowerPhotonCollection
std::vector< HFShowerPhoton > HFShowerPhotonCollection
Definition: HFShowerPhoton.h:36
HFShowerLibrary::equalizeTimeShift_
bool equalizeTimeShift_
Definition: HFShowerLibrary.h:75
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HFShowerLibrary::Hit::Hit
Hit()
Definition: HFShowerLibrary.h:39
HFShowerLibrary::Hit::position
G4ThreeVector position
Definition: HFShowerLibrary.h:40
HFShowerLibrary::newForm
bool newForm
Definition: HFShowerLibrary.h:69
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HFShowerLibrary::getHits
std::vector< Hit > getHits(const G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
Definition: HFShowerLibrary.cc:143
HFShowerLibrary::pe
HFShowerPhotonCollection pe
Definition: HFShowerLibrary.h:81
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HFShowerLibrary::pmom
std::vector< double > pmom
Definition: HFShowerLibrary.h:72
HFShowerLibrary::fillHits
std::vector< Hit > fillHits(const G4ThreeVector &p, const G4ThreeVector &v, int parCode, double parEnergy, bool &ok, double weight, double time, bool onlyLong=false)
Definition: HFShowerLibrary.cc:184
HFShowerLibrary::rMin
double rMin
Definition: HFShowerLibrary.h:77
HFShowerLibrary::Hit
Definition: HFShowerLibrary.h:38
HFShowerLibrary::rInside
bool rInside(double r)
Definition: HFShowerLibrary.cc:347
HFShowerLibrary::libVers
float libVers
Definition: HFShowerLibrary.h:71
HFShowerLibrary::loadEventInfo
void loadEventInfo(TBranch *)
Definition: HFShowerLibrary.cc:408
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HFShowerLibrary::applyFidCut
bool applyFidCut
Definition: HFShowerLibrary.h:69
HFShowerLibrary::rMax
double rMax
Definition: HFShowerLibrary.h:77
HFShowerPhoton.h
HFShowerLibrary::photo
HFShowerPhotonCollection * photo
Definition: HFShowerLibrary.h:82
HFShowerLibrary::interpolate
void interpolate(int, double)
Definition: HFShowerLibrary.cc:437
ParameterSet.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HFShowerLibrary::backProb
double backProb
Definition: HFShowerLibrary.h:76
HcalSimulationParameters
Definition: HcalSimulationParameters.h:6
HFShowerLibrary::listVersion
float listVersion
Definition: HFShowerLibrary.h:71
HFShowerLibrary::verbose
bool verbose
Definition: HFShowerLibrary.h:69
weight
Definition: weight.py:1
HcalDDDSimConstants.h