#include <LHCbID.h>
Public Member Functions | |
LHCbID (const VeloChannelID &chanID) | |
Constructor from VeloChannelID. | |
LHCbID (const ITChannelID &chanID) | |
Constructor from ITChannelID. | |
LHCbID (const OTChannelID &chanID) | |
Constructor from OTChannelID. | |
LHCbID (const RichSmartID &chanID) | |
Constructor from RichSmartID. | |
LHCbID (const CaloCellID &chanID) | |
Constructor from CaloCellID. | |
LHCbID () | |
Default Constructor. | |
virtual | ~LHCbID () |
Default Destructor. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
bool | operator== (const LHCbID &chanID) const |
comparison equality | |
bool | isVelo () const |
return true if this is a Velo identifier | |
VeloChannelID | veloID () const |
return the VeloChannelID | |
bool | isST () const |
return true if this is a Silicon Tracker identifier | |
ITChannelID | stID () const |
return the ITChannelID | |
bool | isOT () const |
return true if this is a Outer Tracker identifier | |
OTChannelID | otID () const |
return the OTChannelID | |
bool | isRich () const |
return true if this is a Rich identifier | |
RichSmartID | richID () const |
return the richSmartID | |
bool | isCalo () const |
return true if this is a Calo identifier | |
CaloCellID | caloID () const |
return the CaloCellID | |
unsigned int | spareBits () const |
retrieve the spare bits | |
void | setSpareBits (unsigned int value) |
set the spare bits | |
unsigned int | channelID () const |
retrieve the channelID | |
void | setChannelID (unsigned int value) |
set the channelID | |
unsigned int | lhcbID () const |
Retrieve const the internal representation. | |
unsigned int | detectorType () const |
Retrieve the LHCb detector type bits. | |
void | setDetectorType (unsigned int value) |
Update the LHCb detector type bits. | |
Private Types | |
enum | channelIDType { veloType = 1, stType, otType, richType, caloType, muonType } |
types of sub-detector channel ID More... | |
enum | lhcbIDBits { detectorTypeBits = 0, channelIDBits = 4, spareBitsBits = 28 } |
Offsets of bitfield lhcbID. More... | |
enum | lhcbIDMasks { detectorTypeMask = 0xFL, channelIDMask = 0xFFFFFF0L, spareBitsMask = 0xF0000000L } |
Bitmasks for bitfield lhcbID. More... | |
Private Attributes | |
unsigned int | m_lhcbID |
the internal representation | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const LHCbID &obj) |
Operator overloading for stringoutput. |
Definition at line 40 of file LHCbID.h.
|
types of sub-detector channel ID
Definition at line 131 of file LHCbID.h.
|
|
Offsets of bitfield lhcbID.
Definition at line 139 of file LHCbID.h. 00139 {detectorTypeBits = 0, 00140 channelIDBits = 4, 00141 spareBitsBits = 28};
|
|
Bitmasks for bitfield lhcbID.
Definition at line 144 of file LHCbID.h. 00144 {detectorTypeMask = 0xFL, 00145 channelIDMask = 0xFFFFFF0L, 00146 spareBitsMask = 0xF0000000L};
|
|
Constructor from VeloChannelID.
Definition at line 159 of file LHCbID.h. References setChannelID(), setDetectorType(), and veloType. 00159 : m_lhcbID(0) 00160 { 00161 00162 setDetectorType( veloType ); 00163 setChannelID( chanID ); 00164 00165 }
|
|
Constructor from ITChannelID.
Definition at line 167 of file LHCbID.h. References setChannelID(), setDetectorType(), and stType. 00167 : m_lhcbID(0) 00168 { 00169 00170 setDetectorType( stType ); 00171 setChannelID( ((chanID.uniqueWafer()-1)>>4) + (chanID.strip()-1) ); 00172 00173 }
|
|
Constructor from OTChannelID.
Definition at line 175 of file LHCbID.h. References otType, setChannelID(), and setDetectorType(). 00175 : m_lhcbID(0) 00176 { 00177 00178 setDetectorType( otType ); 00179 setChannelID( chanID ); 00180 00181 }
|
|
Constructor from RichSmartID.
Definition at line 183 of file LHCbID.h. References richType, setChannelID(), and setDetectorType(). 00183 : m_lhcbID(0) 00184 { 00185 00186 unsigned int richData = chanID.dataBitsOnly(); 00187 if( chanID.pixelDataAreValid() ) richData += 0x8000000; 00188 setDetectorType( richType ); 00189 setChannelID( richData ); 00190 00191 }
|
|
Constructor from CaloCellID.
Definition at line 193 of file LHCbID.h. References caloType, setChannelID(), and setDetectorType(). 00193 : m_lhcbID(0) 00194 { 00195 00196 setDetectorType( caloType ); 00197 setChannelID( chanID.ccid() ); 00198 00199 }
|
|
Default Constructor.
Definition at line 60 of file LHCbID.h. References m_lhcbID. 00060 : m_lhcbID(0) {}
|
|
Default Destructor.
Definition at line 63 of file LHCbID.h. 00063 {}
|
|
return the CaloCellID
Definition at line 306 of file LHCbID.h. References channelID(), and isCalo().
|
|
retrieve the channelID
Definition at line 331 of file LHCbID.h. References channelIDBits, channelIDMask, isOT(), isVelo(), m_lhcbID, and spareBitsMask. Referenced by caloID(), TrFitTrack2TrackCnv::execute(), otID(), richID(), stID(), and veloID(). 00332 { 00333 00334 unsigned int mask = channelIDMask | spareBitsMask; 00335 if ( isVelo() || isOT() ) mask = channelIDMask; 00336 return (unsigned int)((m_lhcbID & mask) >> channelIDBits); 00337 00338 }
|
|
Retrieve the LHCb detector type bits.
Definition at line 219 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by TrFitTrack2TrackCnv::execute(), isCalo(), isOT(), isRich(), isST(), and isVelo(). 00220 { 00221 return (unsigned int)((m_lhcbID & detectorTypeMask) >> detectorTypeBits); 00222 }
|
|
Fill the ASCII output stream.
Definition at line 207 of file LHCbID.h. References m_lhcbID. 00208 { 00209 s << "{ " << "lhcbID : " << m_lhcbID << std::endl << " }"; 00210 return s; 00211 }
|
|
return true if this is a Calo identifier
Definition at line 299 of file LHCbID.h. References caloType, and detectorType(). Referenced by caloID(). 00300 { 00301 00302 return (caloType == detectorType()) ? true : false; 00303 00304 }
|
|
return true if this is a Outer Tracker identifier
Definition at line 266 of file LHCbID.h. References detectorType(), and otType. Referenced by channelID(), otID(), setChannelID(), setSpareBits(), and spareBits(). 00267 { 00268 00269 return (otType == detectorType()) ? true : false; 00270 00271 }
|
|
return true if this is a Rich identifier
Definition at line 280 of file LHCbID.h. References detectorType(), and richType. Referenced by richID(). 00281 { 00282 00283 return (richType == detectorType()) ? true : false; 00284 00285 }
|
|
return true if this is a Silicon Tracker identifier
Definition at line 252 of file LHCbID.h. References detectorType(), and stType. Referenced by stID(). 00253 { 00254 00255 return (stType == detectorType()) ? true : false; 00256 00257 }
|
|
return true if this is a Velo identifier
Definition at line 238 of file LHCbID.h. References detectorType(), and veloType. Referenced by channelID(), setChannelID(), setSpareBits(), spareBits(), and veloID(). 00239 { 00240 00241 return (veloType == detectorType()) ? true : false; 00242 00243 }
|
|
Retrieve const the internal representation.
Definition at line 214 of file LHCbID.h. References m_lhcbID. Referenced by TrFitTrack2TrackCnv::execute(). 00215 { 00216 return m_lhcbID; 00217 }
|
|
comparison equality
Definition at line 231 of file LHCbID.h. 00232 { 00233 00234 return (this->lhcbID() == chanID.lhcbID()); 00235 00236 }
|
|
return the OTChannelID
Definition at line 273 of file LHCbID.h. References channelID(), and isOT().
|
|
return the richSmartID
Definition at line 287 of file LHCbID.h. References channelID(), and isRich(). 00288 { 00289 00290 unsigned int rID = 0; 00291 if( isRich() ) { 00292 rID = channelID() & 0x7000000; 00293 if( channelID() && 0x8000000 ) rID += 0x7E000000; 00294 } 00295 return rID; 00296 00297 }
|
|
set the channelID
Definition at line 340 of file LHCbID.h. References channelIDBits, channelIDMask, isOT(), isVelo(), m_lhcbID, and spareBitsMask. Referenced by LHCbID(). 00341 { 00342 00343 unsigned int mask = channelIDMask | spareBitsMask; 00344 if ( isVelo() || isOT() ) mask = channelIDMask; 00345 unsigned int val = (unsigned int)value; 00346 m_lhcbID &= ~mask; 00347 m_lhcbID |= ((((unsigned int)val) << channelIDBits) & mask); 00348 00349 }
|
|
Update the LHCb detector type bits.
Definition at line 224 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by LHCbID(). 00225 { 00226 unsigned int val = (unsigned int)value; 00227 m_lhcbID &= ~detectorTypeMask; 00228 m_lhcbID |= ((((unsigned int)val) << detectorTypeBits) & detectorTypeMask); 00229 }
|
|
set the spare bits
Definition at line 321 of file LHCbID.h. References isOT(), isVelo(), m_lhcbID, spareBitsBits, and spareBitsMask. Referenced by TrFitTrack2TrackCnv::execute(). 00322 { 00323 00324 if ( !( isVelo() || isOT() ) ) return; 00325 unsigned int val = (unsigned int)value; 00326 m_lhcbID &= ~spareBitsMask; 00327 m_lhcbID |= ((((unsigned int)val) << spareBitsBits) & spareBitsMask); 00328 00329 }
|
|
retrieve the spare bits
Definition at line 313 of file LHCbID.h. References isOT(), isVelo(), m_lhcbID, spareBitsBits, and spareBitsMask. Referenced by TrFitTrack2TrackCnv::execute(). 00314 { 00315 00316 if ( !( isVelo() || isOT() ) ) return 0; 00317 return (unsigned int)((m_lhcbID & spareBitsMask) >> spareBitsBits); 00318 00319 }
|
|
return the ITChannelID
Definition at line 259 of file LHCbID.h. References channelID(), and isST(). 00260 { 00261 00262 return isST() ? ( ((channelID()&0xFFFF000)<<4)+(channelID()&0xFFF) ) : 0xF0000000; 00263 00264 }
|
|
return the VeloChannelID
Definition at line 245 of file LHCbID.h. References channelID(), and isVelo().
|
|
Operator overloading for stringoutput.
Definition at line 201 of file LHCbID.h. 00203 { 00204 return obj.fillStream(str); 00205 }
|
|
the internal representation
Definition at line 149 of file LHCbID.h. Referenced by channelID(), detectorType(), fillStream(), lhcbID(), LHCbID(), setChannelID(), setDetectorType(), setSpareBits(), and spareBits(). |