00001 #ifndef XANAGeantTrack_h 00002 #define XANAGeantTrack_h 00003 00009 class XANAGeantVertex; 00010 class XANAGeneratorParticle; 00011 #include "CLHEP/config/CLHEP.h" 00012 #include "CLHEP/Vector/LorentzVector.h" 00013 #include "CLHEP/Geometry/Point3D.h" 00014 00015 #include <string> 00016 #include <TObject.h> 00017 #include <TRef.h> 00018 #include <Rtypes.h> 00019 00020 using namespace CLHEP; 00021 using namespace HepGeom; 00022 00023 class XANAGeantTrack : public TObject { 00024 00025 public: 00026 00027 XANAGeantTrack(); 00028 00029 virtual ~XANAGeantTrack(); 00030 00032 XANAGeantTrack(Short_t id, HepLorentzVector momentum); 00034 XANAGeantTrack(Short_t index, Short_t id, HepLorentzVector momentum, Short_t mothindex); 00035 00036 void setPartId(Short_t id) {id_=id;} 00037 void setMomentum(HepLorentzVector momentum) {momentum_=momentum;} 00038 00039 // access 00040 Short_t getIndex() const {return index_;} 00041 Short_t getPartId() const {return id_;} 00042 HepLorentzVector getMomentum() const {return momentum_;} 00043 00044 HepPoint3D getPositionAtCalo(); 00045 HepLorentzVector getMomentumAtCalo(); 00046 Bool_t atCalo(); 00047 00048 // relationships 00049 XANAGeantVertex *getVertex() const {return (XANAGeantVertex *)(vertex_.GetObject());} 00050 XANAGeneratorParticle *getGeneratorParticle() const {return (XANAGeneratorParticle *)(genpart_.GetObject());} 00051 void setVertex(XANAGeantVertex *vertex); 00052 void setGeneratorParticle(XANAGeneratorParticle *genpart); 00053 Short_t getMotherIndex() const {return mothindex_;} 00054 00055 // operators 00056 Bool_t operator==(const XANAGeantTrack &t) const; 00057 Bool_t operator<(const XANAGeantTrack &t) const; 00058 00059 void print() const; 00060 00061 private: 00062 00064 Short_t index_; 00066 Short_t id_; 00068 HepLorentzVector momentum_; 00070 TRef vertex_; 00072 TRef genpart_; 00074 Short_t mothindex_; 00075 00076 ClassDef(XANAGeantTrack,1) 00077 00078 }; 00079 00080 #endif