CMS 3D CMS Logo

ZdcShowerLibrary.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_ZdcShowerLibrary_h
2 #define SimG4CMS_ZdcShowerLibrary_h 1
3 // File: ZdcShowerLibrary.h
5 // Description: Gets information from a shower library
6 // E. Garcia June 2008
8 
12 
13 #include "G4ParticleTable.hh"
14 #include "G4ThreeVector.hh"
17 
18 #include <string>
19 #include <memory>
20 
21 class G4Step;
23 public:
24  //Constructor and Destructor
26  ~ZdcShowerLibrary() = default;
27 
28  struct Hit {
29  Hit() {}
30  G4ThreeVector entryLocal;
31  G4ThreeVector position;
32  int depth;
33  double time;
34  int detID;
35  double DeHad;
36  double DeEM;
37  };
38 
39  void initRun(G4ParticleTable* theParticleTable);
40  std::vector<Hit>& getHits(const G4Step* aStep, bool& ok);
41  int getEnergyFromLibrary(const G4ThreeVector& posHit,
42  const G4ThreeVector& momDir,
43  double energy,
44  G4int parCode,
46  bool side,
47  int channel);
48  int photonFluctuation(double eav, double esig, double edis);
49  int encodePartID(G4int parCode);
50 
51 private:
52  bool verbose;
53  G4int emPDG, epPDG, gammaPDG;
56  int npe;
57  std::vector<ZdcShowerLibrary::Hit> hits;
58 };
59 #endif
G4ThreeVector entryLocal
~ZdcShowerLibrary()=default
ZdcShowerLibrary(const std::string &name, edm::ParameterSet const &p)
int getEnergyFromLibrary(const G4ThreeVector &posHit, const G4ThreeVector &momDir, double energy, G4int parCode, HcalZDCDetId::Section section, bool side, int channel)
std::vector< ZdcShowerLibrary::Hit > hits
int photonFluctuation(double eav, double esig, double edis)
std::vector< Hit > & getHits(const G4Step *aStep, bool &ok)
int encodePartID(G4int parCode)
void initRun(G4ParticleTable *theParticleTable)