00001 #ifndef SimG4Core_TrackWithHistory_H 00002 #define SimG4Core_TrackWithHistory_H 00003 00004 #include "G4Track.hh" 00005 #include "DataFormats/Math/interface/Vector3D.h" 00006 #include "DataFormats/Math/interface/LorentzVector.h" 00007 00008 class G4VProcess; 00009 class G4TrackToParticleID; 00014 class TrackWithHistory 00015 { 00016 public: 00020 TrackWithHistory(const G4Track * g4track); 00021 ~TrackWithHistory() {} 00022 void save() { saved_ = true; } 00023 unsigned int trackID() const { return trackID_; } 00024 int particleID() const { return particleID_; } 00025 int parentID() const { return parentID_; } 00026 int genParticleID() const { return genParticleID_; } 00027 const math::XYZVectorD & momentum() const { return momentum_; } 00028 double totalEnergy() const { return totalEnergy_; } 00029 const math::XYZVectorD & vertexPosition() const { return vertexPosition_; } 00030 double globalTime() const { return globalTime_; } 00031 double localTime() const { return localTime_; } 00032 double properTime() const { return properTime_; } 00033 const G4VProcess * creatorProcess() const { return creatorProcess_; } 00034 double weight() const { return weight_; } 00035 void setTrackID(int i) { trackID_ = i; } 00036 void setParentID(int i) { parentID_ = i; } 00037 bool storeTrack() const { return storeTrack_; } 00038 bool saved() const { return saved_; } 00044 void checkAtEnd(const G4Track *); 00045 private: 00046 unsigned int trackID_; 00047 int particleID_; 00048 int parentID_; 00049 int genParticleID_; 00050 math::XYZVectorD momentum_; 00051 double totalEnergy_; 00052 math::XYZVectorD vertexPosition_; 00053 double globalTime_; 00054 double localTime_; 00055 double properTime_; 00056 const G4VProcess * creatorProcess_; 00057 double weight_; 00058 bool storeTrack_; 00059 bool saved_; 00060 static G4TrackToParticleID* theG4TrackToParticleID; 00061 int extractGenID(const G4Track * gt) const; 00062 }; 00063 00064 #endif