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;
82  std::unique_ptr<HFShowerPhotonCollection> photo;
84 };
85 #endif
std::vector< Hit > getHits(const G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
void getRecord(int, int)
const HcalDDDSimConstants * hcalConstant_
std::unique_ptr< HFFibre > fibre_
HFShowerPhotonCollection pe
Definition: weight.py:1
std::vector< HFShowerPhoton > HFShowerPhotonCollection
void loadEventInfo(TBranch *)
std::vector< double > gpar
TBranch * emBranch
std::vector< double > pmom
G4ThreeVector position
HFShowerLibrary(const std::string &name, const HcalDDDSimConstants *hcons, const HcalSimulationParameters *hps, edm::ParameterSet const &p)
void extrapolate(int, double)
std::unique_ptr< HFShowerPhotonCollection > photo
void storePhoton(int j)
std::vector< Hit > fillHits(const G4ThreeVector &p, const G4ThreeVector &v, int parCode, double parEnergy, bool &ok, double weight, double time, bool onlyLong=false)
HFShowerPhotonCollection photon
bool rInside(double r)
void interpolate(int, double)
TBranch * hadBranch