#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 internal channel ID | |
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 | setChannelID (unsigned int value) |
Update the detector channelID bits. | |
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, otMask = 0x3FFFFFFL } |
enumeration of the specific mask More... | |
enum | SpecificBits { veloBits = 21, 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 { channelIDBits = 0, detectorTypeBits = 28 } |
Offsets of bitfield lhcbID. More... | |
enum | lhcbIDMasks { channelIDMask = 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 138 of file LHCbID.h.
|
|
Offsets of bitfield lhcbID.
Definition at line 146 of file LHCbID.h. 00146 {channelIDBits = 0, 00147 detectorTypeBits = 28};
|
|
Bitmasks for bitfield lhcbID.
Definition at line 150 of file LHCbID.h. 00150 {channelIDMask = 0xFFFFFFFL, 00151 detectorTypeMask = 0xF0000000L};
|
|
enumeration of the specific bits
Definition at line 132 of file LHCbID.h.
|
|
enumeration of the specific mask
Definition at line 129 of file LHCbID.h.
|
|
Constructor from VeloChannelID.
Definition at line 164 of file LHCbID.h. References setChannelID(), setDetectorType(), and veloType. 00164 : m_lhcbID(0) 00165 { 00166 00167 setDetectorType( veloType ); 00168 setChannelID( chanID ); 00169 00170 }
|
|
Constructor from ITChannelID.
Definition at line 172 of file LHCbID.h. References setChannelID(), setDetectorType(), and stType. 00172 : m_lhcbID(0) 00173 { 00174 00175 setDetectorType( stType ); 00176 setChannelID( ((chanID.uniqueWafer()-1)>>4) + (chanID.strip()-1) ); 00177 00178 }
|
|
Constructor from OTChannelID.
Definition at line 180 of file LHCbID.h. References otType, setChannelID(), and setDetectorType(). 00180 : m_lhcbID(0) 00181 { 00182 00183 setDetectorType( otType ); 00184 setChannelID( chanID ); 00185 00186 }
|
|
Constructor from RichSmartID.
Definition at line 188 of file LHCbID.h. References richType, setChannelID(), and setDetectorType(). 00188 : m_lhcbID(0) 00189 { 00190 00191 unsigned int richData = chanID.dataBitsOnly(); 00192 if( chanID.pixelDataAreValid() ) richData += 0x8000000; 00193 setDetectorType( richType ); 00194 setChannelID( richData ); 00195 00196 }
|
|
Constructor from CaloCellID.
Definition at line 198 of file LHCbID.h. References caloType, setChannelID(), and setDetectorType(). 00198 : m_lhcbID(0) 00199 { 00200 00201 setDetectorType( caloType ); 00202 setChannelID( chanID.ccid() ); 00203 00204 }
|
|
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 318 of file LHCbID.h. References channelID(), and isCalo().
|
|
return the internal channel ID
Definition at line 325 of file LHCbID.h. References channelIDBits, channelIDMask, isOT(), isVelo(), m_lhcbID, otMask, and veloMask. Referenced by caloID(), TrFitTrack2TrackCnv::execute(), otID(), richID(), stID(), and veloID(). 00326 { 00327 00328 unsigned mask = channelIDMask; 00329 unsigned bits = channelIDBits; 00330 if (isVelo()) mask = veloMask; 00331 if (isOT()) mask = otMask; 00332 unsigned int id = (m_lhcbID & mask) >> bits; 00333 return id; 00334 00335 }
|
|
Retrieve the LHCb detector type bits.
Definition at line 231 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by TrFitTrack2TrackCnv::execute(), isCalo(), isOT(), isRich(), isST(), and isVelo(). 00232 { 00233 return (unsigned int)((m_lhcbID & detectorTypeMask) >> detectorTypeBits); 00234 }
|
|
Fill the ASCII output stream.
Definition at line 212 of file LHCbID.h. References m_lhcbID. 00213 { 00214 s << "{ " << "lhcbID : " << m_lhcbID << std::endl << " }"; 00215 return s; 00216 }
|
|
return true if this is a Calo identifier
Definition at line 311 of file LHCbID.h. References caloType, and detectorType(). Referenced by caloID(). 00312 { 00313 00314 return (caloType == detectorType()) ? true : false; 00315 00316 }
|
|
return true if this is a Outer Tracker identifier
Definition at line 278 of file LHCbID.h. References detectorType(), and otType. Referenced by channelID(), otID(), setSpareBits(), and spareBits(). 00279 { 00280 00281 return (otType == detectorType()) ? true : false; 00282 00283 }
|
|
return true if this is a Rich identifier
Definition at line 292 of file LHCbID.h. References detectorType(), and richType. Referenced by richID(). 00293 { 00294 00295 return (richType == detectorType()) ? true : false; 00296 00297 }
|
|
return true if this is a Silicon Tracker identifier
Definition at line 264 of file LHCbID.h. References detectorType(), and stType. Referenced by stID(). 00265 { 00266 00267 return (stType == detectorType()) ? true : false; 00268 00269 }
|
|
return true if this is a Velo identifier
Definition at line 250 of file LHCbID.h. References detectorType(), and veloType. Referenced by channelID(), setSpareBits(), spareBits(), and veloID(). 00251 { 00252 00253 return (veloType == detectorType()) ? true : false; 00254 00255 }
|
|
Retrieve const the internal representation.
Definition at line 219 of file LHCbID.h. References m_lhcbID. Referenced by TrFitTrack2TrackCnv::execute(). 00220 { 00221 return m_lhcbID; 00222 }
|
|
comparison equality
Definition at line 243 of file LHCbID.h. 00244 { 00245 00246 return (this->lhcbID() == chanID.lhcbID()); 00247 00248 }
|
|
return the OTChannelID
Definition at line 285 of file LHCbID.h. References channelID(), and isOT().
|
|
return the richSmartID
Definition at line 299 of file LHCbID.h. References channelID(), and isRich(). 00300 { 00301 00302 unsigned int rID = 0; 00303 if( isRich() ) { 00304 rID = channelID() & 0x7000000; 00305 if( channelID() && 0x8000000 ) rID += 0x7E000000; 00306 } 00307 return rID; 00308 00309 }
|
|
Update the detector channelID bits.
Definition at line 224 of file LHCbID.h. References channelIDBits, channelIDMask, and m_lhcbID. Referenced by LHCbID(). 00225 { 00226 unsigned int val = (unsigned int)value; 00227 m_lhcbID &= ~channelIDMask; 00228 m_lhcbID |= ((((unsigned int)val) << channelIDBits) & channelIDMask); 00229 }
|
|
Update the LHCb detector type bits.
Definition at line 236 of file LHCbID.h. References detectorTypeBits, detectorTypeMask, and m_lhcbID. Referenced by LHCbID(). 00237 { 00238 unsigned int val = (unsigned int)value; 00239 m_lhcbID &= ~detectorTypeMask; 00240 m_lhcbID |= ((((unsigned int)val) << detectorTypeBits) & detectorTypeMask); 00241 }
|
|
set the spare bits
Definition at line 337 of file LHCbID.h. References channelIDBits, channelIDMask, isOT(), isVelo(), m_lhcbID, otBits, otMask, veloBits, and veloMask. Referenced by TrFitTrack2TrackCnv::execute(). 00338 { 00339 00340 if ( !( isVelo() || isOT() ) ) return; 00341 unsigned int mask = channelIDMask; 00342 unsigned int bits = channelIDBits; 00343 if (isVelo()) { 00344 mask &= (~veloMask); 00345 bits = veloBits; 00346 } else if (isOT()) { 00347 mask &= (~otMask); 00348 bits = otBits; 00349 } 00350 m_lhcbID &= ~mask; 00351 m_lhcbID |= ((((unsigned int)value) << bits) & mask); 00352 00353 }
|
|
retrieve the spare bits
Definition at line 355 of file LHCbID.h. References channelIDBits, channelIDMask, isOT(), isVelo(), m_lhcbID, otBits, otMask, veloBits, and veloMask. Referenced by TrFitTrack2TrackCnv::execute(). 00356 { 00357 00358 if ( !( isVelo() || isOT() ) ) return 0; 00359 unsigned int mask = channelIDMask; 00360 unsigned int bits = channelIDBits; 00361 if (isVelo()) { 00362 mask &= (~veloMask); 00363 bits = veloBits; 00364 } else if (isOT()) { 00365 mask &= (~otMask); 00366 bits = otBits; 00367 } 00368 unsigned int val = ((m_lhcbID & mask) >> bits); 00369 return val; 00370 00371 }
|
|
return the ITChannelID
Definition at line 271 of file LHCbID.h. References channelID(), and isST(). 00272 { 00273 00274 return isST() ? ( ((channelID()&0xFFFF000)<<4)+(channelID()&0xFFF) ) : 0xF0000000; 00275 00276 }
|
|
return the VeloChannelID
Definition at line 257 of file LHCbID.h. References channelID(), and isVelo().
|
|
Operator overloading for stringoutput.
Definition at line 206 of file LHCbID.h. 00208 { 00209 return obj.fillStream(str); 00210 }
|
|
the internal representation
Definition at line 154 of file LHCbID.h. Referenced by channelID(), detectorType(), fillStream(), lhcbID(), LHCbID(), setChannelID(), setDetectorType(), setSpareBits(), and spareBits(). |