CMS 3D CMS Logo

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:
18 
20  const Local3DPoint& exit,
21  float pabs,
22  float tof,
23  float eloss,
24  int particleType,
25  unsigned int detId,
26  unsigned int trackId,
27  float theta,
28  float phi,
29  unsigned short processType = 0)
32  thePabs(pabs),
33  theEnergyLoss(eloss),
36  theTof(tof),
39  theDetUnitId(detId),
41 
44 
47 
52  Local3DPoint localPosition() const { return theEntryPoint + 0.5 * theSegment; }
53 
56 
59 
62 
65 
67  float pabs() const { return thePabs; }
68 
73  float timeOfFlight() const { return tof(); }
74 
76  float tof() const { return theTof; }
77 
79  float energyLoss() const { return theEnergyLoss; }
80 
89  int particleType() const { return theParticleType; }
90 
97  unsigned int detUnitId() const { return theDetUnitId; }
98 
106  unsigned int trackId() const { return theTrackId; }
107 
108  EncodedEventId eventId() const { return theEventId; }
109 
111 
120  unsigned short processType() const { return theProcessType; }
121 
122  void setTof(float tof) { theTof = tof; }
123 
124 protected:
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
Vector3DBase< float, LocalTag >
PSimHit::timeOfFlight
float timeOfFlight() const
Definition: PSimHit.h:73
PSimHit::PSimHit
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:19
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
mps_splice.entry
entry
Definition: mps_splice.py:68
Geom::Theta
Definition: Theta.h:12
PSimHit::tof
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:76
PSimHit::theEntryPoint
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
PSimHit::theSegment
Local3DVector theSegment
Definition: PSimHit.h:127
PSimHit::PSimHit
PSimHit()
Definition: PSimHit.h:17
PSimHit::entryPoint
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:43
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
PSimHit::theTof
float theTof
Definition: PSimHit.h:133
PSimHit::eventId
EncodedEventId eventId() const
Definition: PSimHit.h:108
PSimHit::detUnitId
unsigned int detUnitId() const
Definition: PSimHit.h:97
EncodedEventId
Definition: EncodedEventId.h:11
PSimHit::thePabs
float thePabs
Definition: PSimHit.h:128
PSimHit::pabs
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:67
PSimHit::thePhiAtEntry
float thePhiAtEntry
Definition: PSimHit.h:131
PSimHit::theProcessType
unsigned short theProcessType
Definition: PSimHit.h:135
PSimHit::processType
unsigned short processType() const
Definition: PSimHit.h:120
PSimHit::exitPoint
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:46
PSimHit::localPosition
Local3DPoint localPosition() const
Definition: PSimHit.h:52
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
Point3DBase< float, LocalTag >
PSimHit::theTrackId
unsigned int theTrackId
Definition: PSimHit.h:140
PSimHit::localDirection
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
Definition: PSimHit.h:58
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
Geom::Phi< float >
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
PSimHit::phiAtEntry
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
Definition: PSimHit.h:64
DDAxes::phi
operator<<
std::ostream & operator<<(std::ostream &o, const PSimHit &hit)
Definition: PSimHit.cc:4
LocalPoint.h
PSimHit::momentumAtEntry
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:55
PSimHit::energyLoss
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:79
PSimHit::theThetaAtEntry
float theThetaAtEntry
Definition: PSimHit.h:130
PSimHit::particleType
int particleType() const
Definition: PSimHit.h:89
PSimHit::trackId
unsigned int trackId() const
Definition: PSimHit.h:106
PSimHit::theParticleType
int theParticleType
Definition: PSimHit.h:134
PSimHit::theEnergyLoss
float theEnergyLoss
Definition: PSimHit.h:129
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
PSimHit::thetaAtEntry
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
Definition: PSimHit.h:61
PSimHit
Definition: PSimHit.h:15
PSimHit::setTof
void setTof(float tof)
Definition: PSimHit.h:122
PSimHit::setEventId
void setEventId(EncodedEventId e)
Definition: PSimHit.h:110
LocalVector.h
PSimHit::theDetUnitId
unsigned int theDetUnitId
Definition: PSimHit.h:139
PSimHit::theEventId
EncodedEventId theEventId
Definition: PSimHit.h:141
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EncodedEventId.h