00001 #ifndef __StEEmcPoint_h__ 00002 #define __StEEmcPoint_h__ 00003 00004 #include "TObject.h" 00005 #include "TVector3.h" 00006 00007 #include "StEEmcTower.h" 00008 #include "StEEmcSmdCluster.h" 00009 00010 class StEmcPoint; 00011 00012 class StEEmcPoint : public TObject { 00013 00014 public: 00015 00016 StEEmcPoint(); 00017 ~StEEmcPoint(){ /* nada */ }; 00018 00020 StEEmcPoint( const StEEmcPoint &p ); 00021 00023 void position( TVector3 p ) { mPosition=p; } 00025 void energy( Float_t e ) { mEnergy=e; } 00027 void fraction ( Float_t f ) { mFraction=f; } 00029 void tower( StEEmcTower t, Float_t w=1. ) { mTowers.push_back(t); mWeights.push_back(w); } 00031 void cluster( StEEmcSmdCluster c, Int_t plane ){mSmdClusters[plane]=c;} 00032 00034 void numberOfRelatives( Int_t r ){ mRelatives=r; } 00035 00037 TVector3 position(){ return mPosition; } 00039 Float_t energy(){ return mEnergy; } 00041 Float_t fraction(){ return mFraction; } 00043 Float_t energy() const { return mEnergy; } 00045 Int_t numberOfTowers(){ return (Int_t)mTowers.size(); } 00047 StEEmcTower tower(Int_t t){ return mTowers[t]; } 00049 Float_t weight(Int_t t){ return mWeights[t]; } 00052 StEEmcSmdCluster cluster(Int_t c){ return mSmdClusters[c]; } 00053 00056 Int_t numberOfRelatives(){ return mRelatives; } 00057 00060 StEmcPoint *stemc(); 00061 00063 Int_t sector(); 00064 00065 void print(); 00066 00067 Bool_t operator<( const StEEmcPoint &other ) const; 00068 Bool_t chiSquare( const StEEmcPoint &other ) const; 00069 00070 private: 00071 protected: 00072 00074 TVector3 mPosition; 00075 Float_t mEnergy; 00076 Float_t mFraction; 00077 00079 StEEmcSmdCluster mSmdClusters[2]; 00080 00083 StEEmcTowerVec_t mTowers; 00084 std::vector<Float_t> mWeights; 00085 00086 Int_t mRelatives; 00087 00088 StEmcPoint *mEmcPoint; 00089 00090 ClassDef(StEEmcPoint,1); 00091 00092 }; 00093 00094 typedef std::vector<StEEmcPoint> StEEmcPointVec_t; 00095 00096 inline Bool_t StEEmcPoint::operator<( const StEEmcPoint &other ) const { return this->energy() < other.energy(); } 00097 inline Bool_t chiSquare( const StEEmcPoint &me, const StEEmcPoint &other ) { return me.chiSquare( other ); } 00098 00099 inline Int_t StEEmcPoint::sector(){ if ( mSmdClusters[0].sector()==mSmdClusters[1].sector() ) return mSmdClusters[0].sector(); else return -1; } 00100 00101 #endif
1.5.9