#ifndef TStrawTrkChannelId_hxx_seen #define TStrawTrkChannelId_hxx_seen #include "IChannelId.hxx" namespace COMET { class IStrawTrkChannelId; } class COMET::IStrawTrkChannelId : public COMET::IChannelId { public: explicit IStrawTrkChannelId(UInt_t id =0); explicit IStrawTrkChannelId(const COMET::IChannelId& src); explicit IStrawTrkChannelId(UInt_t subDet, UInt_t Channel); explicit IStrawTrkChannelId(UInt_t stationId, UInt_t manifoldId, UInt_t strawId); virtual ~IStrawTrkChannelId(); virtual std::string AsString() const; virtual const UInt_t GetChannel() const; bool SetChannelIdFromModuleId(const UInt_t stationId, const UInt_t manifoldId, const UInt_t strawId); bool GetStationId(UInt_t& stationId) const; bool GetManifoldId(UInt_t& manifoldId) const; bool GetStrawId(UInt_t& strawId) const; bool GetModuleId(UInt_t& stationId, UInt_t& manifoldId, UInt_t& strawId) const; protected: enum BitDefinitions { kChanMSB=24, kChanLSB=0 }; private: virtual void SetChannel(int val); /// @{ Define the sub-detector specific part of the channel id. The /// sub-detector specific part of the channel id is a 25 bit field with /// bits number from 0 (lsb) to 24 (msb). The sub-fields are defined /// /// sss d tttt tttt xxxx xxxx xxxx x /// /// s(3) [24:22] -- Station /// d(1) [21:21] -- Manifold X:0 Y:1 /// t(8) [20:13] -- StrawTube /// x(13) [12: 0] -- Spare /// /// Note: The shift and the least significant bit (lsb) must be the same. enum kBitDefinitions { kStationMSB = 24, kStationLSB = 22, kManifoldMSB = 21, kManifoldLSB = 21, kStrawTubeMSB = 20, kStrawTubeLSB = 13, kSpareMSB = 12, kSpareLSB = 0 }; /// Manifold of position detected by a straw layer (See GetStrawManifold()) enum kStrawManifoldDefinitions{ kStrawTrkManifoldX = 0, kStrawTrkManifoldY = 1 }; ClassDef(IStrawTrkChannelId, 1) }; #endif