// -*- mode: c++ -*- // // $Id: BrBbCalHits.h,v 1.2 2002/05/14 18:51:35 cholm Exp $ // $Author: cholm $ // $Date: 2002/05/14 18:51:35 $ // //___________________________________________________________________// // // // BrBbCalHits // // // // BRAHMS Calibrated Hits for Beam-Beam counters // // // // Author : D.Ouerdane // // Created : August 2001 // // Version : 2.0 // // Modified: September 2001 F.Videbaek //___________________________________________________________________// #ifndef BRAT_BrBbCalHits #define BRAT_BrBbCalHits #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef ROOT_TClonesArray #include "TClonesArray.h" #endif #ifndef BRAT_BrDataObject #include "BrDataObject.h" #endif #ifndef BRAT_BrNestedHack #include "BrNestedHack.h" #endif class BrBbCalHits : public BrDataObject { public: // Nested class for single hits; class BrBbHit : public TObject { public: BrBbHit(){ }; BrBbHit(Int_t, Double_t, Double_t); virtual ~BrBbHit() { }; virtual Int_t GetTubeNo() const { return fTubeNo; } virtual Double_t GetTof() const { return fTof; } virtual Double_t GetEnergy() const { return fEnergy; } virtual void SetTubeNo(Int_t i) { fTubeNo = i; } virtual void SetTof(Double_t time) { fTof = time; } virtual void SetEnergy(Double_t energy) { fEnergy = energy; } virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* private: Int_t fTubeNo; // Tube Number Double_t fTof; // Tof (tdc*gain - slK/sqrt(ener) - slewDt) Double_t fEnergy; // calibrated energy (ADC - ped)*gain ClassDefNested(BrBbHit, 1) // a recontructed tof hit }; private: TClonesArray fBbHits; // Array of bb hits Float_t fArrayMult; // sum of hit multiplicity UShort_t fFastestTube; // fastest tube number public: BrBbCalHits(); BrBbCalHits(const char* name, const char* title); virtual ~BrBbCalHits(); virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* const BrBbCalHits& operator=(const BrBbCalHits& other); void AddHit(Int_t, Double_t, Double_t); void SetArrayMult(Float_t m) { fArrayMult = m; } void SetFastest(Int_t t) { fFastestTube = (UShort_t)t; } Int_t GetEntries() const { return fBbHits.GetEntries(); } BrBbHit* GetHit(Int_t idx) const { return (BrBbHit*)fBbHits.At(idx); } Float_t GetArrayMult() const { return fArrayMult; } Int_t GetFastest() const { return (Int_t)fFastestTube; } ClassDef(BrBbCalHits,1) // BRAHMS BeamBeam Counters Calibrated Hits }; #endif //______________________________________________________________________ // // $Log: BrBbCalHits.h,v $ // Revision 1.2 2002/05/14 18:51:35 cholm // In the current ROOT CVS head (May 14, 2002) the 'ClassDef' macro has // changed a lot, meaning that it's no longer nessecary to redefine it // for nested classes. Hence, I introduced the header file // BrNestedHack, which only defined ClassDefNested to something else than // ClassDef if the version number of ROOT is less than 3.03/05, and then only // if it's not processed by rootcint. note, that this meant that preprocessing // had to be turned on for these (and other) header (rootcint option -p). // The data classs header files have been changed to include the new // header file BrNestedHack.h (which is ofcourse installed). // // Revision 1.1 2001/09/23 01:38:56 videbaek // Add class BrBbCalhits very much equivalent to the BrBbRdonew by DO. // The difference is that the geometry for Bb which is trivial has been removed. //