00001 #ifndef McTkrStrip_H
00002 #define McTkrStrip_H
00003
00004
00005
00006 #include "TObject.h"
00007 #include "TVector.h"
00008 #include "TRef.h"
00009
00010 #include "commonRootData/idents/VolumeIdentifier.h"
00011 #include "McPositionHit.h"
00012
00040 class McTkrStrip : public TObject
00041 {
00042 public:
00045 McTkrStrip();
00046
00048 McTkrStrip(const VolumeIdentifier& id, UInt_t strip, Double_t e=0,
00049 Bool_t noise=0, Double_t deltaX=0, Double_t deltaY=0, TRefArray* hitList = 0);
00051 virtual ~McTkrStrip();
00052
00054 void initialize(const VolumeIdentifier& id, UInt_t strip, Double_t e,
00055 Bool_t noise, Double_t deltaX, Double_t deltaY, TRefArray* hitList);
00056
00057 void Clear(Option_t *option ="");
00058
00059 void Print(Option_t *option="") const;
00060
00062 VolumeIdentifier getId() const {return m_planeId; }
00064 UInt_t getStripNumber() const {return m_strip; }
00066 Double_t getEnergy() const {return m_energy; }
00068 Double_t energy() const {return m_energy; }
00069 Bool_t noise() const {return getNoise();}
00070 Bool_t getNoise() const {return m_noise;}
00071
00072 const TRefArray& getHits() const {return m_hits;}
00073
00075 void addHit(McPositionHit* hit) {
00076 TObject* inList = m_hits.FindObject(hit);
00077 if (inList == 0) {
00078 m_hits.Add(hit);
00079 }
00080 }
00081
00083 void operator+=(double de){m_energy += de;}
00084
00086 TVector3 getDelta() const {return TVector3(m_deltaX, m_deltaY, 0.0); }
00087
00088 Double_t getDeltaX() const {return m_deltaX; }
00089 Double_t getDeltaY() const {return m_deltaY; }
00090
00091 private:
00093 VolumeIdentifier m_planeId;
00094
00096 UInt_t m_strip;
00097
00099 Double_t m_energy;
00100
00102 Bool_t m_noise;
00103
00105 TRefArray m_hits;
00106
00108 Double_t m_deltaX;
00109 Double_t m_deltaY;
00110
00111 ClassDef(McTkrStrip,1)
00112 };
00113
00114 #endif