test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PSimHit.h
Go to the documentation of this file.
1 #ifndef PSimHit_H
2 #define PSimHit_H
3 
7 
8 class TrackingSlaveSD; // for friend declaration only
9 
15 class PSimHit {
16 public:
17 
19 
21  float pabs, float tof, float eloss, int particleType,
22  unsigned int detId, unsigned int trackId,
23  float theta, float phi, unsigned short processType=0) :
24  theEntryPoint( entry),
25  theSegment(exit-entry),
26  thePabs(pabs),
27  theEnergyLoss(eloss),
28  theThetaAtEntry(theta), thePhiAtEntry(phi),
29  theTof(tof),
31  theDetUnitId( detId), theTrackId( trackId)
32 {}
33 
36 
39 
45 
48  return LocalVector( thetaAtEntry(), phiAtEntry(), pabs());
49  }
50 
53  return LocalVector( thetaAtEntry(), phiAtEntry(), 1.f);
54  }
55 
58 
61 
63  float pabs() const {return thePabs;}
64 
69  float timeOfFlight() const {return tof();}
70 
72  float tof() const {return theTof;}
73 
75  float energyLoss() const {return theEnergyLoss;}
76 
85  int particleType() const {return theParticleType;}
86 
93  unsigned int detUnitId() const {return theDetUnitId;}
94 
102  unsigned int trackId() const {return theTrackId;}
103 
104 
106 
107 
109 
118  unsigned short processType() const {return theProcessType;}
119 
120 
121  void setTof(float tof) {theTof=tof;}
122 
123 protected:
124 
125  // properties
126  Local3DPoint theEntryPoint; // position at entry
127  Local3DVector theSegment; // exitPos - entryPos
128  float thePabs; // momentum
129  float theEnergyLoss; // Energy loss
132 
133  float theTof; // Time Of Flight
135  unsigned short theProcessType; // ID of the process which created the track
136  // which created the PSimHit
137 
138  // association
139  unsigned int theDetUnitId;
140  unsigned int theTrackId;
142 
143  friend class TrackingSlaveSD;
144 };
145 
146 std::ostream & operator<<(std::ostream & o, const PSimHit & hit);
147 
148 #endif // PSimHit_H
Local3DVector LocalVector
Definition: LocalVector.h:12
float thePabs
Definition: PSimHit.h:128
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:72
unsigned int theTrackId
Definition: PSimHit.h:140
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
Definition: PSimHit.h:57
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:47
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
unsigned int theDetUnitId
Definition: PSimHit.h:139
Geom::Theta< T > theta() const
PSimHit(const Local3DPoint &entry, const Local3DPoint &exit, float pabs, float tof, float eloss, int particleType, unsigned int detId, unsigned int trackId, float theta, float phi, unsigned short processType=0)
Definition: PSimHit.h:20
float theTof
Definition: PSimHit.h:133
float thePhiAtEntry
Definition: PSimHit.h:131
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
unsigned short theProcessType
Definition: PSimHit.h:135
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
float theEnergyLoss
Definition: PSimHit.h:129
float timeOfFlight() const
Definition: PSimHit.h:69
Local3DPoint localPosition() const
Definition: PSimHit.h:44
double f[11][100]
EncodedEventId eventId() const
Definition: PSimHit.h:105
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
void setTof(float tof)
Definition: PSimHit.h:121
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
Definition: PSimHit.h:52
Local3DVector theSegment
Definition: PSimHit.h:127
int theParticleType
Definition: PSimHit.h:134
unsigned short processType() const
Definition: PSimHit.h:118
float theThetaAtEntry
Definition: PSimHit.h:130
void setEventId(EncodedEventId e)
Definition: PSimHit.h:108
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
int particleType() const
Definition: PSimHit.h:85
EncodedEventId theEventId
Definition: PSimHit.h:141
unsigned int trackId() const
Definition: PSimHit.h:102
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
Definition: PSimHit.h:60
list entry
Definition: mps_splice.py:62
PSimHit()
Definition: PSimHit.h:18
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
unsigned int detUnitId() const
Definition: PSimHit.h:93