00001 #ifndef __StEEmcIUPoint_h__ 00002 #define __StEEmcIUPoint_h__ 00003 00004 #include "TObject.h" 00005 #include "TVector3.h" 00006 00007 #include "StEEmcPool/StEEmcA2EMaker/StEEmcTower.h" 00008 #include "StEEmcIUSmdCluster.h" 00009 00010 class StEmcPoint; 00011 00012 class StEEmcIUPoint : public TObject { 00013 00014 public: 00015 00016 StEEmcIUPoint(); 00017 ~StEEmcIUPoint(){ /* nada */ }; 00018 00020 StEEmcIUPoint( const StEEmcIUPoint &p ); 00021 00023 void position( TVector3 p ) { mPosition=p; } 00025 void energy( Float_t e, Int_t layer=0 ) { mEnergy[layer]=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( StEEmcIUSmdCluster c, Int_t plane ){mSmdClusters[plane]=c;mSector=c.sector();} 00032 00034 void numberOfRelatives( Int_t r ){ mRelatives=r; } 00035 00037 TVector3 position(){ return mPosition; } 00039 Float_t energy(Int_t layer){ return mEnergy[layer]; } 00041 Float_t fraction(){ return mFraction; } 00043 Float_t energy(Int_t layer=0) const { return mEnergy[layer]; } 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 StEEmcIUSmdCluster cluster(Int_t c){ return mSmdClusters[c]; } 00053 00056 Int_t numberOfRelatives(){ return mRelatives; } 00057 00060 StEmcPoint *stemc(); 00061 00063 Int_t sector(){ return mSector; } 00065 void sector(Int_t s){ mSector=s; } 00066 00068 Float_t sigma(){ return mSigma; } 00070 void sigma(Float_t s){ mSigma=s; } 00071 00073 Float_t u(){ return mU; } 00075 void u(Float_t uu){ mU=uu; } 00076 00078 Float_t v(){ return mV; } 00080 void v(Float_t vv){ mV=vv; } 00081 00083 Float_t residueU(){ return mResidueU; } 00085 void residueU(Float_t r){ mResidueU=r; } 00087 Float_t residueV(){ return mResidueV; } 00089 void residueV(Float_t r){ mResidueV=r; } 00090 00091 00093 void print(); 00094 00096 Bool_t operator<( const StEEmcIUPoint &other ) const; 00098 Bool_t chiSquare( const StEEmcIUPoint &other ) const; 00099 00100 private: 00101 protected: 00102 00104 TVector3 mPosition; 00106 Float_t mEnergy[4]; 00108 Float_t mFraction; 00109 00111 Int_t mSector; 00113 Float_t mSigma; 00115 Float_t mU; 00117 Float_t mV; 00119 Float_t mResidueU; 00121 Float_t mResidueV; 00122 00124 StEEmcIUSmdCluster mSmdClusters[2]; 00125 00128 StEEmcTowerVec_t mTowers; 00129 00130 std::vector<Float_t> mWeights; 00131 00133 Int_t mRelatives; 00134 00136 StEmcPoint *mEmcPoint; 00137 00139 ClassDef(StEEmcIUPoint,1); 00140 00141 }; 00142 00143 typedef std::vector<StEEmcIUPoint> StEEmcIUPointVec_t; 00144 00145 inline Bool_t StEEmcIUPoint::operator<( const StEEmcIUPoint &other ) const { return this->energy() < other.energy(); } 00146 inline Bool_t chiSquare( const StEEmcIUPoint &me, const StEEmcIUPoint &other ) { return me.chiSquare( other ); } 00147 00148 //line Int_t StEEmcIUPoint::sector(){ if ( mSmdClusters[0].sector()==mSmdClusters[1].sector() ) return mSmdClusters[0].sector(); else return -1; } 00149 00150 #endif
1.5.9