#ifndef TBaseMuonStub_hh #define TBaseMuonStub_hh #include "TObject.h" class TMuonHit; class TMuonChamber; class TBaseMuonStub : public TObject { //----------------------------------------------------------------------------- // data members //----------------------------------------------------------------------------- protected: Int_t fGeomCode; // geom. code of the CMU/CMP chamber Int_t fDigiCode; // CDF muon digi code Int_t fFitType; Int_t fNHits; Int_t fNcHits; Int_t fTrigTower; // trigger tower Float_t fPhi; // global phi as defined by the cog Float_t fTheta; // global theta as defined by the cog Float_t fChi2XY; // local chi**2 XY Float_t fChi2XZ; // local chi**2 XZ Float_t fY0; // local fit results Float_t fDyDx; Float_t fZ0; // local fit in XZ Float_t fDzDx; TMuonChamber* fChamber; // ! pointer to the chamber TMuonHit* fHit[8]; // ! pointers to the hits, don't save Char_t fDriftSign[8]; // ! drift sign , don't save Int_t fMaxLayer; // ! max layer in which stub has hit Int_t fEOR; // ! end of record marker used by copy // constructor //----------------------------------------------------------------------------- public: // ****** constructors and destructor TBaseMuonStub(); TBaseMuonStub(const TBaseMuonStub& s); TBaseMuonStub(const TBaseMuonStub& s, Int_t define_all); virtual ~TBaseMuonStub(); // ****** init functions // ****** accessors // 1: CMU, 2: CMP, 4: CMX Int_t Subsystem () const { return ((GetUniqueID() >> 16) & 0xff); } Int_t DetCode () const { return GetUniqueID(); } Int_t DigiCode () const { return fDigiCode; } Int_t Layer () const { return (fDigiCode ) &0x07; } Int_t StackNumber () const { return (fDigiCode >> 3) &0x7f; } Int_t WedgeNumber () const { return (fDigiCode >> 10) &0x1f; } Int_t Side () const { return (fDigiCode >> 15) &0x01; } Int_t Meantime () const { return (fDigiCode >> 16) &0x01; } Int_t FitType () const { return fFitType; } Int_t NHits () const { return fNHits; } Int_t NcHits () const { return fNcHits; } Int_t TrigTower () const { return fTrigTower; } Float_t Phi () const { return fPhi; } Float_t Theta () const { return fTheta; } Float_t Y0 () const { return fY0; } Float_t Z0 () const { return fZ0; } Float_t DyDx () const { return fDyDx; } Float_t DzDx () const { return fDzDx; } Float_t Chi2XY () const { return fChi2XY; } Float_t Chi2XZ () const { return fChi2XZ; } Float_t Chi2 () const { return fChi2XY+fChi2XZ; } TMuonHit* Hit (int i) const { return fHit[i]; } Int_t DriftSign(int i) const { return (Int_t) ((signed char) fDriftSign[i]); } Int_t MaxLayer () const { return fMaxLayer; } TMuonChamber* GetChamber() { return fChamber; } // ****** modifiers void SetPhi (Double_t Phi ) { fPhi = Phi; } void SetTheta (Double_t Thet) { fTheta = Thet; } void SetY0 (Double_t y0 ) { fY0 = y0; } void SetZ0 (Double_t z0 ) { fZ0 = z0; } void SetDyDx (Double_t dydx) { fDyDx = dydx; } void SetDzDx (Double_t dzdx) { fDzDx = dzdx; } void SetChi2XY(Double_t chi2) { fChi2XY = chi2; } void SetChi2XZ(Double_t chi2) { fChi2XZ = chi2; } void SetDigiCode(Int_t code ) { fDigiCode = code; } void SetNHits (Int_t n ) { fNHits = n; } void SetNcHits (Int_t n ) { fNcHits = n; } // ****** other methods virtual void AddHit(Int_t il, TMuonHit* hit, Int_t drift_sign) {} //----------------------------------------------------------------------------- // overloaded methods of TObject //----------------------------------------------------------------------------- // copy '*this'into 'stub' virtual void Copy (TObject& stub) const; void Clear(Option_t* opt = ""); void Print(Option_t* opt = "") const; ClassDef (TBaseMuonStub,2) }; #endif