00001 00010 #include "TObject.h" 00011 #include "TList.h" 00012 #include <math.h> 00013 #include "StEmcUtil/geometry/StEmcGeom.h" 00014 #include "StEmcUtil/others/StEmcMath.h" 00015 #include "StEmcRawMaker/defines.h" 00016 00017 #ifndef StEmcPreCluster_HH 00018 #define StEmcPreCluster_HH 00019 00020 class StEmcRawHit; 00021 class StEmcCluster; 00022 class StEmcPreCluster: public TObject 00023 { 00024 private: 00025 StEmcGeom* mGeom; 00026 TList mHits; 00027 00028 Int_t mDetector; 00029 Int_t mMatchingId; 00030 Float_t mEta; 00031 Float_t mPhi; 00032 Float_t mSigmaEta; 00033 Float_t mSigmaPhi; 00034 Float_t mEnergy; 00035 00036 protected: 00037 public: 00038 StEmcPreCluster(Int_t); 00039 StEmcPreCluster(StEmcPreCluster&); 00040 StEmcPreCluster(StEmcCluster*); 00041 virtual ~StEmcPreCluster(); 00042 00043 Float_t eta() const; 00044 Float_t phi() const; 00045 Float_t sigmaEta() const; 00046 Float_t sigmaPhi() const; 00047 Float_t energy() const; 00048 Int_t nHits() const; 00049 Int_t detector() const; 00050 Int_t matchingId() const; 00051 00052 void addHit(StEmcRawHit*); 00053 void removeHit(StEmcRawHit*); 00054 void removeHit(Int_t); 00055 StEmcRawHit* getHit(Int_t i) 00056 { 00057 return (StEmcRawHit*)mHits.At(i); 00058 } 00059 00060 void addCluster(StEmcPreCluster*); 00061 void addCluster(StEmcCluster*); 00062 void subtractCluster(StEmcPreCluster*); 00063 void subtractCluster(StEmcCluster*); 00064 StEmcPreCluster* splitInEta(Float_t); 00065 StEmcPreCluster* splitInPhi(Float_t); 00066 00067 void setMatchingId(Int_t a) 00068 { 00069 mMatchingId = a; 00070 } 00071 00072 void update(); 00073 StEmcCluster* makeStCluster(); 00074 00075 ClassDef(StEmcPreCluster,1) 00076 }; 00077 inline Float_t StEmcPreCluster::eta() const 00078 { 00079 return mEta; 00080 } 00081 inline Float_t StEmcPreCluster::phi() const 00082 { 00083 return mPhi; 00084 } 00085 inline Float_t StEmcPreCluster::sigmaEta() const 00086 { 00087 return mSigmaEta; 00088 } 00089 inline Float_t StEmcPreCluster::sigmaPhi() const 00090 { 00091 return mSigmaPhi; 00092 } 00093 inline Float_t StEmcPreCluster::energy() const 00094 { 00095 return mEnergy; 00096 } 00097 inline Int_t StEmcPreCluster::nHits() const 00098 { 00099 return mHits.GetSize(); 00100 } 00101 inline Int_t StEmcPreCluster::detector() const 00102 { 00103 return mDetector; 00104 } 00105 inline Int_t StEmcPreCluster::matchingId() const 00106 { 00107 return mMatchingId; 00108 } 00109 #endif
1.5.9