00001 #ifndef XANAElectronSeed_h 00002 #define XANAElectronSeed_h 00003 00011 class XANASuperCluster; 00012 class XANAElectronTrack; 00013 00014 #include <XANADOO/XANAElectronCandidate/interface/XANASeedMatch.h> 00015 #include <CLHEP/Geometry/Point3D.h> 00016 #include <TObject.h> 00017 #include <TRef.h> 00018 #include <Rtypes.h> 00019 00020 using namespace HepGeom; 00021 00022 class XANAElectronSeed : public TObject { 00023 00024 public: 00025 00026 XANAElectronSeed(); 00028 XANAElectronSeed(Short_t numberOfTrackHits, 00029 Short_t direction, HepPoint3D positionAtFirstPoint, HepVector3D momentumAtFirstPoint, 00030 HepPoint3D positionAtLastPoint, HepVector3D momentumAtLastPoint, std::string algoName); 00031 00032 virtual ~XANAElectronSeed(); 00033 00034 // data access methods 00035 Short_t getNumberOfHits() const {return numberOfHits_;} 00036 Short_t getDirection() const {return direction_;} 00037 HepVector3D getMomentumAtFirstPoint() const {return momentumAtFirstPoint_;} 00038 HepPoint3D getPositionAtFirstPoint() const {return positionAtFirstPoint_;} 00039 HepVector3D getMomentumAtLastPoint() const {return momentumAtLastPoint_;} 00040 HepPoint3D getPositionAtLastPoint() const {return positionAtLastPoint_;} 00041 char *getCharAlgoName() const {return algoName_;} 00042 std::string getAlgoName() const {return std::string(algoName_);} 00043 00044 // set methods 00045 void setNumberOfHits(Short_t numberOfHits) {numberOfHits_=numberOfHits;} 00046 void setDirection(Short_t direction) {direction_=direction;} 00047 void setMomentumAtLastPoint(HepPoint3D positionAtLastPoint) {positionAtLastPoint_=positionAtLastPoint;} 00048 void setPositionAtLastPoint(HepVector3D momentumAtLastPoint) {momentumAtLastPoint_=momentumAtLastPoint;} 00049 void setMomentumAtFirstPoint(HepPoint3D positionAtFirstPoint) {positionAtFirstPoint_=positionAtFirstPoint;} 00050 void setPositionAtFirstPoint(HepVector3D momentumAtFirstPoint) {momentumAtFirstPoint_=momentumAtFirstPoint;} 00051 void setAlgoName(std::string algoName) {sprintf(algoName_,algoName.c_str());} 00052 00053 // relationships 00054 XANAElectronTrack *getElectronTrack() const {return (XANAElectronTrack *)(track_.GetObject());} 00055 void setElectronTrack(XANAElectronTrack *track); 00056 XANASuperCluster *getSuperCluster() const {return (XANASuperCluster *)(cluster_.GetObject());} 00057 void setSuperCluster(XANASuperCluster *super); 00058 00060 Bool_t IsUsed() const {return locked_;} 00061 00062 Bool_t operator==(const XANAElectronSeed&) const; 00063 Bool_t operator<(const XANAElectronSeed&) const; 00064 // copy constructor 00065 XANAElectronSeed(const XANAElectronSeed &right); 00066 00067 protected: 00068 00070 Short_t numberOfHits_; 00072 Short_t direction_; 00074 HepPoint3D positionAtFirstPoint_; 00076 HepVector3D momentumAtFirstPoint_; 00078 HepPoint3D positionAtLastPoint_; 00080 HepVector3D momentumAtLastPoint_; 00082 XANASeedMatch match_; 00084 TRef track_; 00086 TRef cluster_; 00088 Int_t algoLen_; 00089 char *algoName_; //[algoLen_] 00090 00091 private: 00092 00093 const static Int_t strLen_; 00094 Bool_t locked_; 00095 void lock() {locked_ = true;} 00096 void unlock() { locked_ = false;} 00097 00098 ClassDef(XANAElectronSeed,1) // electron seed class 00099 00100 }; 00101 00102 #endif 00103 00104 00105 00106 00107 00108 00109