#ifndef STNTUPLE_TPesCluster #define STNTUPLE_TPesCluster #ifdef __GNUG__ #pragma interface #endif #include "TMath.h" #include "TObject.h" class TStnDataBlock; class AbsEvent; class PesCluster; class TPesCluster : public TObject { friend Int_t StntupleInitClusterBlock(TStnDataBlock* block, AbsEvent* event, int mode); protected: //------------------------------------------------------------------------------ // data members //------------------------------------------------------------------------------ Int_t fCode; // packed module, wire numbering see acPessors Float_t fEnergy; // GeV Float_t fCoord; // local u or v within the module Float_t fYSlope; // y slope Float_t fYInter; // y intercept Float_t fSigma; // width in cm Float_t fChiSq; // Chi squared const PesCluster* fPesp; //! for internal use, finding links //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TPesCluster(); virtual ~TPesCluster(); // ****** accessors // 1 = west layer U or east layer V // (both point the same direction, are at the same, larger |z|) // 0 = west layer V or east layer U Int_t View () const { return (fCode ) & 0x1; } // 0 = z<0 (west), 1 = z>0 (east) Int_t Side () const { return (fCode >> 1) & 0x1; } // wedge 0-23 Int_t Octant () const { return (fCode >> 2) & 0x7; } // first hit wire or strip Int_t FirstHit () const { return (fCode >> 5) & 0xff; } // number of hits in clusters Int_t NHit () const { return (fCode >>13) & 0xff; } Float_t Energy () const { return fEnergy; } // local x within module Float_t LocalCoord () const { return fCoord; } // CDF coords, y slope Float_t YSlope () const { return fYSlope; } // CDF coords, y intercept Float_t YIntercept () const { return fYInter; } // CDF z Float_t Z () const { float z = (View() ? 184.8 : 186.0 ); return (Side() ? -z : z) ; } // cluster width in cm Float_t Sigma() const { return fSigma; } // cluster chi**2 Float_t ChiSq() const { return fChiSq; } // ****** setters const PesCluster* GetPesCluster() const {return fPesp;} void SetCode (Int_t i) { fCode = i; } void SetEnergy(Float_t x) { fEnergy = x; } void SetCoord (Float_t x) { fCoord = x; } void SetYSlope(Float_t x) { fYSlope = x; } void SetYInter(Float_t x) { fYInter = x; } void SetSigma (Float_t x) { fSigma = x; } void SetChiSq( Float_t x) { fChiSq = x; } void SetPesCluster(const PesCluster* p) { fPesp = p; } // ****** overloaded methods of TObject void Print(const char* Opt = "") const; ClassDef(TPesCluster,1) }; #endif