CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/SimDataFormats/TrackingHit/interface/UpdatablePSimHit.h

Go to the documentation of this file.
00001 #ifndef UpdatablePSimHit_H
00002 #define UpdatablePSimHit_H
00003 
00010 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00011 
00012 class UpdatablePSimHit : public PSimHit 
00013 {
00014 public:
00015     UpdatablePSimHit() : PSimHit() {}
00016     UpdatablePSimHit(const Local3DPoint & entry, const Local3DPoint & exit, 
00017                      float pabs, float tof, float eloss, int particleType,
00018                      unsigned int detId, unsigned int trackId, float theta, 
00019                      float phi, unsigned short processType=0) 
00020         : PSimHit(entry, exit, pabs, tof, eloss, particleType,
00021                   detId, trackId, theta, phi,processType) {}
00022     ~UpdatablePSimHit(){};  
00023     void updateExitPoint(const Local3DPoint & exit)
00024     { theSegment=exit-theEntryPoint; }
00025     void setExitPoint(const Local3DPoint& exit) 
00026     { updateExitPoint(exit); }
00027     void setEntryPoint(const Local3DPoint& entry)
00028     {
00029         theSegment = theSegment+theEntryPoint-entry;
00030         theEntryPoint = entry;
00031     }
00032     void addEnergyLoss(float eloss) { theEnergyLoss += eloss; }
00033     void setEnergyLoss(float eloss) { theEnergyLoss = eloss; }
00034     void setTrackId(unsigned int k) { theTrackId = k; }
00035 };
00036 
00037 #endif
00038