Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:53

0001 #ifndef UpdatablePSimHit_H
0002 #define UpdatablePSimHit_H
0003 
0004 /** \class UpdatablePSimHit
0005  * extension of PSimHit;
0006  * the exit point and the energy loss can be modified;
0007  * maybe not the final solution
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