// -*- mode: c++ -*- // // $Id: BrTofRdo.h,v 1.7 2002/05/14 18:51:43 cholm Exp $ // #ifndef BRAT_BrTofRdo #define BRAT_BrTofRdo #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef ROOT_TClonesArray #include "TClonesArray.h" #endif #ifndef BRAT_BrDataObject #include "BrDataObject.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif #ifndef BRAT_BrNestedHack #include "BrNestedHack.h" #endif class BrTofRdo : public BrDataObject { public: // Nested class for single hits; class BrTofHit : public TObject { public: BrTofHit(){ }; BrTofHit(Int_t slat, Float_t tof, Float_t tofraw, Float_t de , Float_t x, Float_t y, Float_t z); virtual ~BrTofHit() { }; Int_t GetSlatNum() const { return fSlatNum; } Int_t GetSlatno() const { return fSlatNum; } Int_t GetSlatNo() const { return fSlatNum; } Float_t GetTof() const { return fTof; } Float_t GetRawTof() const { return fRawTof; } Float_t GetEnergy() const { return fEnergy; } Float_t GetLocalPosX() const { return fLocalPosX; } Float_t GetLocalPosY() const { return fLocalPosY; } Float_t GetLocalPosZ() const { return fLocalPosZ; } BrVector3D GetLocalPos() const { BrVector3D pos(fLocalPosX, fLocalPosY, fLocalPosZ); return pos; } void SetSlatNum(Int_t i) { fSlatNum = i; } void SetSlatno(Int_t i) { fSlatNum = i; } void SetSlatNo(Int_t i) { fSlatNum = i; } void SetTof(Float_t time) { fTof = time; } void SetRawTof(Float_t time) { fRawTof = time; } void SetEnergy(Float_t energy) { fEnergy = energy;} void SetLocalPosX(Float_t pos) { fLocalPosX = pos; } void SetLocalPosY(Float_t pos) { fLocalPosY = pos; } void SetLocalPosZ(Float_t pos) { fLocalPosZ = pos; } void SetLocalPos(BrVector3D pos) { fLocalPosX = pos(0); fLocalPosY = pos(1); fLocalPosZ = pos(2); } virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* private: Int_t fSlatNum; // SlatNumber Float_t fTof; // Calibrated Time of Flight Float_t fLocalPosX; // Calibrated Position (in panel coord. sys.) Float_t fLocalPosY; // Calibrated Position (in panel coord. sys.) Float_t fLocalPosZ; // Calibrated Position (in panel coord. sys.) Float_t fEnergy; // calibrated energy (ADC - ped)*gain Float_t fRawTof; // Calibrated but not T0 subtracted Time of Flight ClassDefNested(BrTofHit,3) // a recontructed tof hit }; private: TClonesArray fTofHits; // Array of tof hits public: BrTofRdo(); BrTofRdo(const char* name, const char* title); virtual ~BrTofRdo(); virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* Int_t GetEntries() const { return fTofHits.GetEntries(); } BrTofHit* GetHit(Int_t idx) const { return (BrTofHit*)fTofHits.At(idx); } virtual void AddHit(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t ); virtual void AddHit(Int_t slat, Float_t tof, Float_t tofraw, Float_t de, BrVector3D pos) { AddHit(slat, tof, tofraw, de, pos(0), pos(1), pos(2)); } ClassDef(BrTofRdo,1) // RDO structure for TOF hits }; #endif // // $Log: BrTofRdo.h,v $ // Revision 1.7 2002/05/14 18:51:43 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.6 2002/03/20 19:25:51 videbaek // Added rawtof to data structure. Used in BrTofRdoModule and pp PID. // // Revision 1.5 2001/12/13 12:32:35 ouerdane // Changed Double_t for Float_t for most variables and incremented the version number of BrTofHit // // Revision 1.4 2001/11/12 18:46:23 ouerdane // Added method AddHit with position in BrVecto3D type // // Revision 1.3 2001/11/05 06:52:30 ouerdane // added method BrVector3D GetLocalPos() // // Revision 1.2 2001/06/25 14:31:23 cholm // Made Print conform to TObject // // Revision 1.1.1.1 2001/06/21 14:55:02 hagel // Initial revision of brat2 // // Revision 1.1 2001/06/19 12:44:54 ouerdane // Added calibration classes and reconstruction classes. // Brat compiles but these classes haven't been tested in this // context. Be careful if you use them before I (DO) check if // all is ok. //