File indexing completed on 2024-09-10 02:59:05
0001 #ifndef UpdatablePSimHit_H
0002 #define UpdatablePSimHit_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0011
0012 class UpdatablePSimHit : public PSimHit {
0013 public:
0014 UpdatablePSimHit() : PSimHit() {}
0015 UpdatablePSimHit(const Local3DPoint& entry,
0016 const Local3DPoint& exit,
0017 float pabs,
0018 float tof,
0019 float eloss,
0020 int particleType,
0021 unsigned int detId,
0022 unsigned int trackId,
0023 float theta,
0024 float phi,
0025 unsigned short processType = 0)
0026 : PSimHit(entry, exit, pabs, tof, eloss, particleType, detId, trackId, theta, phi, processType) {}
0027 ~UpdatablePSimHit() {}
0028 void updateExitPoint(const Local3DPoint& exit) { theSegment = exit - theEntryPoint; }
0029 void setExitPoint(const Local3DPoint& exit) { updateExitPoint(exit); }
0030 void setEntryPoint(const Local3DPoint& entry) {
0031 theSegment = theSegment + theEntryPoint - entry;
0032 theEntryPoint = entry;
0033 }
0034 void addEnergyLoss(float eloss) { theEnergyLoss += eloss; }
0035 void setEnergyLoss(float eloss) { theEnergyLoss = eloss; }
0036 void setTrackId(unsigned int k) { theTrackId = k; }
0037 };
0038
0039 #endif