// TODO comment to be changed /** CbmMuchDigi.h **@author M.Ryzhinskiy **@since 19.03.07 **@version 1.0 ** ** Data class for digital MUCH information ** Data level: RAW ** ** The detector ID consists of: ** system ID (0-15, STS=2), bits 24-27 ** station number (0-255), bits 16-23 ** sector number (0-32767), bits 1-15 ** ** The index of the (first) MCPoint having activated this channel ** is accessible via GetMcPointIndex(). **/ #ifndef CBMMUCHDIGI_H #define CBMMUCHDIGI_H 1 #include #include "TObject.h" class CbmMuchDigi : public TObject { public: /** Default constructor **/ CbmMuchDigi(); /** Constructor from station number, sector number, ** front/back side and channel number **@param iStation station number (0-255) **@param iSector sector number (0-32767) **@param iChannel channel number **@param time time since event start [ns] **@param dTime time resolution [ns] **/ CbmMuchDigi(Int_t iStation, Int_t iSector, Int_t iChannel, Double_t time, Double_t dTime = 8e-2); /** Destructor **/ virtual ~CbmMuchDigi(); /** Accessors **/ Int_t GetDetectorId() const { return fDetectorId; } Int_t GetSystemId() const { return ( fDetectorId & (15<<24) ) >> 24; } Int_t GetStationNr() const { return ( fDetectorId & (255<<16) ) >> 16; } Int_t GetSectorNr() const { return ( fDetectorId & (32767<<1) ) >> 1; } Int_t GetChannelNr() const { return fChannelNr; } /** Gets time since event start **/ Double_t GetTime(Int_t i) { return fTime[i]; } Double_t* GetTimes() { return fTime;} /** Gets time resolution **/ Double_t GetDTime(Int_t i) { return fDTime[i]; } Double_t* GetDTimes() { return fDTime; } /** Adds one more time information **/ Int_t AddTime(Double_t time); /** Adds one more time resolution information **/ Int_t AddDTime(Double_t dTime=8e-2); private: Int_t fDetectorId; Int_t fChannelNr; Double_t fTime[3]; /** Time since event start [ns] **/ Double_t fDTime[3]; /** Time resolution [ns] **/ ClassDef(CbmMuchDigi,1); }; #endif