#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 | channelID () const |
return the specific detector channelID (the key value) | |
void | setSpareBits (unsigned int value) |
set the spare bits | |
unsigned int | spareBits () const |
retrieve the spare bits | |
unsigned int | lhcbID () const |
Retrieve const the internal representation. | |
void | setID (unsigned int value) |
Update the ID bits (to recreate the channelID). | |
unsigned int | detectorType () const |
Retrieve the LHCb detector type bits. | |
void | setDetectorType (unsigned int value) |
Update the LHCb detector type bits. | |
Protected Types | |
enum | SpecificMask { veloMask = 0x1FFFFFL, stMask = 0x3FFFFFFL, otMask = 0x3FFFFFFL } |
enumeration of the specific mask More... | |
enum | SpecificBits { veloBits = 21, stBits = 26, otBits = 26 } |
enumeration of the specific bits More... | |
Private Types | |
enum | channelIDType { veloType = 1, stType, otType, richType, caloType, muonType } |
types of sub-detector channel ID More... | |
enum | lhcbIDBits { IDBits = 0, detectorTypeBits = 28 } |
Offsets of bitfield lhcbID. More... | |
enum | lhcbIDMasks { IDMask = 0xFFFFFFFL, detectorTypeMask = 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 140 of file LHCbID.h.
|
|
Offsets of bitfield lhcbID.
Definition at line 148 of file LHCbID.h. 00148 {IDBits = 0, 00149 detectorTypeBits = 28};
|
|
Bitmasks for bitfield lhcbID.
Definition at line 152 of file LHCbID.h. 00152 {IDMask = 0xFFFFFFFL, 00153 detectorTypeMask = 0xF0000000L};
|
|
enumeration of the specific bits
Definition at line 133 of file LHCbID.h.
|
|
enumeration of the specific mask
Definition at line 129 of file LHCbID.h.
|
|
Constructor from VeloChannelID.
Definition at line 166 of file LHCbID.h. References setDetectorType(), setID(), and veloType. 00166 : m_lhcbID(0) 00167 { 00168 00169 setDetectorType( veloType ); 00170 setID( chanID ); 00171 00172 }
|
|
Constructor from ITChannelID.
Definition at line 174 of file LHCbID.h. References setDetectorType(), setID(), and stType. 00174 : m_lhcbID(0) 00175 { 00176 00177 setDetectorType( stType ); 00178 setID( ((chanID.uniqueWafer()-1)>>4) + (chanID.strip()-1) ); 00179 00180 }
|
|
Constructor from OTChannelID.
Definition at line 182 of file LHCbID.h. References otType, setDetectorType(), and setID(). 00182 : m_lhcbID(0) 00183 { 00184 00185 setDetectorType( otType ); 00186 setID( chanID ); 00187 00188 }
|
|
Constructor from RichSmartID.
Definition at line 190 of file LHCbID.h. References richType, setDetectorType(), and setID(). 00190 : m_lhcbID(0) 00191 { 00192 00193 unsigned int richData = chanID.dataBitsOnly(); 00194 if( chanID.pixelDataAreValid() ) richData += 0x8000000; 00195 setDetectorType( richType ); 00196 setID( richData ); 00197 00198 }
|
|
Constructor from CaloCellID.
Definition at line 200 of file LHCbID.h. References caloType, setDetectorType(), and setID(). 00200 : m_lhcbID(0) 00201 { 00202 00203 setDetectorType( caloType ); 00204 setID( chanID.ccid() ); 00205 00206 }
|
|
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 315 of file LHCbID.h. References channelID(), and isCalo().
|
|
return the specific detector channelID (the key value)
Definition at line 322 of file LHCbID.h. References IDBits, IDMask, isOT(), isRich(), isST(), isVelo(), m_lhcbID, otMask, stMask, and veloMask. Referenced by caloID(), otID(), richID(), stID(), and veloID(). 00323 { 00324 00325 unsigned mask = IDMask; 00326 unsigned bits = IDBits; 00327 if (isVelo()) mask = veloMask; 00328 if (isOT()) mask = otMask; 00329 if (isST()) mask = stMask; 00330 unsigned int id = (m_lhcbID & mask) >> bits; 00331 if (isST()) id = (((id & 0xFFFF000) << 4)+(id & 0xFFF)); 00332 if (isRich()) { 00333 id = id & 0x7000000; 00334 if( id && 0x8000000 ) id = id + 0x7E000000; 00335 } 00336 return id; 00337 00338 }
|
|
Retrieve the LHCb detector type bits.
Definition at line 233 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by isCalo(), isOT(), isRich(), isST(), and isVelo(). 00234 { 00235 return (unsigned int)((m_lhcbID & detectorTypeMask) >> detectorTypeBits); 00236 }
|
|
Fill the ASCII output stream.
Definition at line 214 of file LHCbID.h. References m_lhcbID. 00215 { 00216 s << "{ " << "lhcbID : " << m_lhcbID << std::endl << " }"; 00217 return s; 00218 }
|
|
return true if this is a Calo identifier
Definition at line 308 of file LHCbID.h. References caloType, and detectorType(). Referenced by caloID(). 00309 { 00310 00311 return (caloType == detectorType()) ? true : false; 00312 00313 }
|
|
return true if this is a Outer Tracker identifier
Definition at line 280 of file LHCbID.h. References detectorType(), and otType. Referenced by channelID(), otID(), setSpareBits(), and spareBits(). 00281 { 00282 00283 return (otType == detectorType()) ? true : false; 00284 00285 }
|
|
return true if this is a Rich identifier
Definition at line 294 of file LHCbID.h. References detectorType(), and richType. Referenced by channelID(), and richID(). 00295 { 00296 00297 return (richType == detectorType()) ? true : false; 00298 00299 }
|
|
return true if this is a Silicon Tracker identifier
Definition at line 266 of file LHCbID.h. References detectorType(), and stType. Referenced by channelID(), setSpareBits(), spareBits(), and stID(). 00267 { 00268 00269 return (stType == detectorType()) ? true : false; 00270 00271 }
|
|
return true if this is a Velo identifier
Definition at line 252 of file LHCbID.h. References detectorType(), and veloType. Referenced by channelID(), setSpareBits(), spareBits(), and veloID(). 00253 { 00254 00255 return (veloType == detectorType()) ? true : false; 00256 00257 }
|
|
Retrieve const the internal representation.
Definition at line 221 of file LHCbID.h. References m_lhcbID. 00222 { 00223 return m_lhcbID; 00224 }
|
|
comparison equality
Definition at line 245 of file LHCbID.h. 00246 { 00247 00248 return (this->lhcbID() == chanID.lhcbID()); 00249 00250 }
|
|
return the OTChannelID
Definition at line 287 of file LHCbID.h. References channelID(), and isOT().
|
|
return the richSmartID
Definition at line 301 of file LHCbID.h. References channelID(), and isRich().
|
|
Update the LHCb detector type bits.
Definition at line 238 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by LHCbID(). 00239 { 00240 unsigned int val = (unsigned int)value; 00241 m_lhcbID &= ~detectorTypeMask; 00242 m_lhcbID |= ((((unsigned int)val) << detectorTypeBits) & detectorTypeMask); 00243 }
|
|
Update the ID bits (to recreate the channelID).
Definition at line 226 of file LHCbID.h. References IDBits, IDMask, and m_lhcbID. Referenced by LHCbID(). 00227 { 00228 unsigned int val = (unsigned int)value; 00229 m_lhcbID &= ~IDMask; 00230 m_lhcbID |= ((((unsigned int)val) << IDBits) & IDMask); 00231 }
|
|
set the spare bits
Definition at line 340 of file LHCbID.h. References IDBits, IDMask, isOT(), isST(), isVelo(), m_lhcbID, otBits, otMask, stBits, stMask, veloBits, and veloMask. 00341 { 00342 00343 if ( !( isVelo() || isOT() || isST() ) ) return; 00344 unsigned int mask = IDMask; 00345 unsigned int bits = IDBits; 00346 if (isVelo()) { 00347 mask &= (~veloMask); 00348 bits = veloBits; 00349 } else if (isST()) { 00350 mask &= (~stMask); 00351 bits = stBits; 00352 } else if (isOT()) { 00353 mask &= (~otMask); 00354 bits = otBits; 00355 } 00356 m_lhcbID &= ~mask; 00357 m_lhcbID |= ((((unsigned int)value) << bits) & mask); 00358 00359 }
|
|
retrieve the spare bits
Definition at line 361 of file LHCbID.h. References IDBits, IDMask, isOT(), isST(), isVelo(), m_lhcbID, otBits, otMask, stBits, stMask, veloBits, and veloMask. 00362 { 00363 00364 if ( !( isVelo() || isOT() || isST()) ) return 0; 00365 unsigned int mask = IDMask; 00366 unsigned int bits = IDBits; 00367 if (isVelo()) { 00368 mask &= (~veloMask); 00369 bits = veloBits; 00370 } else if (isST()) { 00371 mask &= (~stMask); 00372 bits = stBits; 00373 } else if (isOT()) { 00374 mask &= (~otMask); 00375 bits = otBits; 00376 } 00377 unsigned int val = ((m_lhcbID & mask) >> bits); 00378 return val; 00379 00380 }
|
|
return the ITChannelID
Definition at line 273 of file LHCbID.h. References channelID(), and isST().
|
|
return the VeloChannelID
Definition at line 259 of file LHCbID.h. References channelID(), and isVelo().
|
|
Operator overloading for stringoutput.
Definition at line 208 of file LHCbID.h. 00210 { 00211 return obj.fillStream(str); 00212 }
|
|
the internal representation
Definition at line 156 of file LHCbID.h. Referenced by channelID(), detectorType(), fillStream(), lhcbID(), LHCbID(), setDetectorType(), setID(), setSpareBits(), and spareBits(). |