CMS 3D CMS Logo

PHcalTB06Info.h
Go to the documentation of this file.
1 #ifndef HcalTestBeam_PHcalTB06Info_h
2 #define HcalTestBeam_PHcalTB06Info_h
3 // -*- C++ -*-
4 //
5 // Package: HcalTestBeam
6 // Class : PHcalTB06Info
7 //
17 //
18 // Original Author: Sunanda Banerjee
19 // Created: Tue Oct 10 10:14:34 CEST 2006
20 //
21 
22 // system include files
23 #include <string>
24 #include <vector>
25 #include <memory>
26 #include <cmath>
27 
28 // user include files
29 
31 public:
32  PHcalTB06Info();
33  virtual ~PHcalTB06Info();
34 
35  struct Vtx {
36  Vtx() : trackID(0), partID(0), px(0), py(0), pz(0), eKin(0) {}
37  int trackID;
38  int partID;
39  float px;
40  float py;
41  float pz;
42  float eKin;
43  };
44 
45  struct Hit {
46  Hit() : id(0), eta(0), phi(0), e(0), t(0) {}
47  unsigned int id;
48  float eta;
49  float phi;
50  float e;
51  float t;
52  };
53 
54  typedef std::vector<float> FloatVector;
55  typedef std::vector<int> IntVector;
56  typedef std::vector<Vtx> VtxVector;
57  typedef std::vector<Hit> HitVector;
58 
59  // ---------- const member functions ---------------------
60  int primary() const { return nPrimary; }
61  int partID() const { return idBeam; }
62  float initE() const { return eBeam; }
63  float eta() const { return etaBeam; }
64  float phi() const { return phiBeam; }
65  float simEtotal() const { return simEtot; }
66  float simEcE() const { return simEEc; }
67  float simHcE() const { return simEHc; }
68 
69  HitVector simHits() const { return hits; }
70  Hit simHit(unsigned int i) const { return hits[i]; }
71  unsigned int simHitID(unsigned int i) const { return hits[i].id; }
72  float simHitEta(unsigned int i) const { return hits[i].eta; }
73  float simHitPhi(unsigned int i) const { return hits[i].phi; }
74  float simHitE(unsigned int i) const { return hits[i].e; }
75  float simHitT(unsigned int i) const { return hits[i].t; }
76 
77  int evNum() const { return v1EvNum; }
78  int vtxType() const { return v1Type; }
79  float vtxPrimX() const { return v1X; }
80  float vtxPrimY() const { return v1Y; }
81  float vtxPrimZ() const { return v1Z; }
82  float vtxPrimR() const { return v1R; }
83  float vtxPrimU() const { return v1U; }
84  float vtxPrimV() const { return v1V; }
85  float vtxPrimW() const { return v1W; }
86  float vtxPrimPx() const { return v1Px; }
87  float vtxPrimPy() const { return v1Py; }
88  float vtxPrimPz() const { return v1Pz; }
89  int vtxSec() const { return v1Nsec; }
90  VtxVector vtxSecondaries() const { return v1Sec; }
91  Vtx vtxSecondary(unsigned int i) const { return v1Sec[i]; }
92  int vtxTrackID(unsigned int i) const { return v1Sec[i].trackID; }
93  int vtxPartID(unsigned int i) const { return v1Sec[i].partID; }
94  float vtxSecPx(unsigned int i) const { return v1Sec[i].px; }
95  float vtxSecPy(unsigned int i) const { return v1Sec[i].py; }
96  float vtxSecPz(unsigned int i) const { return v1Sec[i].pz; }
97  float vtxSecEKin(unsigned int i) const { return v1Sec[i].eKin; }
98 
99  // ---------- static member functions --------------------
100 
101  // ---------- member functions ---------------------------
102  void clear();
103  void setPrimary(int primary, int id, double energy, double eta, double phi);
104  void setEdep(double simtot, double sime, double simh);
105  void saveHit(unsigned int det, double eta, double phi, double e, double t);
106 
107  //Vertex associated methods
108  void setVtxPrim(
109  int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz);
110  void setVtxSec(int id, int pdg, double px, double py, double pz, double ek);
111 
112 private:
113  // PHcalTB06Info(const PHcalTB06Info&);
114  // const PHcalTB06Info& operator=(const PHcalTB06Info&);
115 
116  // ---------- member data --------------------------------
117 
118  //Beam parameters
121 
122  //Deposited energies
125 
126  //Hit Members
127  int hit;
129 
130  //Vertex members
132  float v1X, v1Y, v1Z, v1R, v1U, v1V, v1W;
133  float v1Px, v1Py, v1Pz;
135 };
136 
137 #endif
float vtxPrimV() const
Definition: PHcalTB06Info.h:84
std::vector< int > IntVector
Definition: PHcalTB06Info.h:55
float vtxPrimZ() const
Definition: PHcalTB06Info.h:81
float simEtotal() const
Definition: PHcalTB06Info.h:65
float vtxSecEKin(unsigned int i) const
Definition: PHcalTB06Info.h:97
T w() const
void setEdep(double simtot, double sime, double simh)
unsigned int id
Definition: PHcalTB06Info.h:47
float simHitEta(unsigned int i) const
Definition: PHcalTB06Info.h:72
Vtx vtxSecondary(unsigned int i) const
Definition: PHcalTB06Info.h:91
Hit simHit(unsigned int i) const
Definition: PHcalTB06Info.h:70
float vtxSecPz(unsigned int i) const
Definition: PHcalTB06Info.h:96
std::vector< float > FloatVector
Definition: PHcalTB06Info.h:54
float vtxPrimR() const
Definition: PHcalTB06Info.h:82
void setVtxPrim(int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz)
float vtxPrimU() const
Definition: PHcalTB06Info.h:83
VtxVector vtxSecondaries() const
Definition: PHcalTB06Info.h:90
float vtxPrimPz() const
Definition: PHcalTB06Info.h:88
int vtxSec() const
Definition: PHcalTB06Info.h:89
float vtxPrimX() const
Definition: PHcalTB06Info.h:79
virtual ~PHcalTB06Info()
std::vector< Vtx > VtxVector
Definition: PHcalTB06Info.h:56
std::vector< Hit > HitVector
Definition: PHcalTB06Info.h:57
int primary() const
Definition: PHcalTB06Info.h:60
HitVector simHits() const
Definition: PHcalTB06Info.h:69
float initE() const
Definition: PHcalTB06Info.h:62
float vtxSecPx(unsigned int i) const
Definition: PHcalTB06Info.h:94
float simHcE() const
Definition: PHcalTB06Info.h:67
int vtxTrackID(unsigned int i) const
Definition: PHcalTB06Info.h:92
VtxVector v1Sec
void setVtxSec(int id, int pdg, double px, double py, double pz, double ek)
float simHitT(unsigned int i) const
Definition: PHcalTB06Info.h:75
void saveHit(unsigned int det, double eta, double phi, double e, double t)
float vtxPrimPy() const
Definition: PHcalTB06Info.h:87
float eta() const
Definition: PHcalTB06Info.h:63
HitVector hits
float simHitPhi(unsigned int i) const
Definition: PHcalTB06Info.h:73
int vtxPartID(unsigned int i) const
Definition: PHcalTB06Info.h:93
float vtxPrimW() const
Definition: PHcalTB06Info.h:85
unsigned int simHitID(unsigned int i) const
Definition: PHcalTB06Info.h:71
void setPrimary(int primary, int id, double energy, double eta, double phi)
float phi() const
Definition: PHcalTB06Info.h:64
float simHitE(unsigned int i) const
Definition: PHcalTB06Info.h:74
float simEcE() const
Definition: PHcalTB06Info.h:66
float vtxSecPy(unsigned int i) const
Definition: PHcalTB06Info.h:95
int evNum() const
Definition: PHcalTB06Info.h:77
float vtxPrimY() const
Definition: PHcalTB06Info.h:80
int partID() const
Definition: PHcalTB06Info.h:61
int vtxType() const
Definition: PHcalTB06Info.h:78
float vtxPrimPx() const
Definition: PHcalTB06Info.h:86