CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastHFShowerLibrary.h
Go to the documentation of this file.
1 #ifndef FastHFShowerLibrary_H
2 #define FastHFShowerLibrary_H
3 // File: FastHFShowerLibrary.h
5 // Description: Gets information from a shower library
7 
12 
19 
23 #include "G4ThreeVector.hh"
24 
25 //ROOT
26 #include "TROOT.h"
27 #include "TFile.h"
28 #include "TTree.h"
29 
30 #include <string>
31 #include <memory>
32 #include <map>
33 
34 class DDCompactView;
35 class FSimEvent;
36 class FSimTrack;
37 
39 
40 public:
41 
42 // Constructor and Destructor
45 
46 public:
47 
48  struct Hit {
49  Hit() {}
50  G4ThreeVector position;
51  int depth;
52  double time;
53  };
54 
55  void initRun();
56  void const initHFShowerLibrary(const edm::EventSetup& );
57  void recoHFShowerLibrary(const FSimTrack &myTrack);
58  std::vector<Hit> getHits(const G4ThreeVector & p, const G4ThreeVector & v,
59  int parCode, double parEnergy, bool &ok,
60  double weight, bool onlyLong=false);
61  const std::map<CaloHitID,float>& getHitsMap() { return hitMap; };
62  bool isItinFidVolume (G4ThreeVector&);
63 
64 protected:
65 
66  bool rInside(double r);
67  void getRecord(int, int);
68  void loadEventInfo(TBranch *);
69  void interpolate(int, double);
70  void extrapolate(int, double);
71  void storePhoton(int j);
72  std::vector<double> getDDDArray(const std::string&, const DDsvalues_type&,
73  int&);
74 
75 private:
76 
78  TFile * hf;
79  TBranch *emBranch, *hadBranch;
80 
83  std::map<CaloHitID,float> hitMap;
84  double cFibre;
85 
89  std::vector<double> pmom;
90 
91  double probMax, backProb;
92  double dphi, rMin, rMax;
93  std::vector<double> gpar;
94 
98 
99  int npe;
103 
104 };
105 #endif
HcalNumberingScheme * numberingScheme
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &, int &)
void recoHFShowerLibrary(const FSimTrack &myTrack)
HFShowerPhotonCollection pe
type of data representation of DDCompactView
Definition: DDCompactView.h:77
void loadEventInfo(TBranch *)
HcalNumberingFromDDD * numberingFromDDD
void interpolate(int, double)
std::vector< HFShowerPhoton > HFShowerPhotonCollection
std::vector< Hit > getHits(const G4ThreeVector &p, const G4ThreeVector &v, int parCode, double parEnergy, bool &ok, double weight, bool onlyLong=false)
void extrapolate(int, double)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
int j
Definition: DBlmapReader.cc:9
HFShowerPhotonCollection * photo
std::vector< double > pmom
HFShowerPhotonCollection photon
FastHFShowerLibrary(edm::ParameterSet const &p)
std::vector< double > gpar
const std::map< CaloHitID, float > & getHitsMap()
int weight
Definition: histoStyle.py:50
void const initHFShowerLibrary(const edm::EventSetup &)
std::map< CaloHitID, float > hitMap
bool isItinFidVolume(G4ThreeVector &)