CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Private Attributes
TOBDetId Class Reference

#include <TOBDetId.h>

Inheritance diagram for TOBDetId:
SiStripDetId DetId

Public Member Functions

bool isDoubleSide () const
 
bool isRPhi ()
 
bool isStereo ()
 
bool isZMinusSide () const
 
bool isZPlusSide () const
 
unsigned int layer () const
 layer id More...
 
unsigned int layerNumber () const
 
unsigned int module () const
 detector id More...
 
unsigned int moduleNumber () const
 
std::vector< unsigned int > rod () const
 rod id More...
 
unsigned int rodNumber () const
 
unsigned int side () const
 
 TOBDetId ()
 
 TOBDetId (uint32_t rawid)
 
 TOBDetId (const DetId &id)
 
 TOBDetId (uint32_t layer, uint32_t rod_fw_bw, uint32_t rod, uint32_t module, uint32_t ster)
 
- Public Member Functions inherited from SiStripDetId
uint32_t glued () const
 
ModuleGeometry moduleGeometry () const
 
uint32_t partnerDetId () const
 
uint16_t reserved () const
 
 SiStripDetId ()
 
 SiStripDetId (const uint32_t &raw_id)
 
 SiStripDetId (const DetId &det_id)
 
 SiStripDetId (Detector det, int subdet)
 
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 
uint32_t stereo () const
 
double stripLength () const
 
SubDetector subDetector () const
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Private Attributes

static const unsigned int layerMask_ = 0x7
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int layerStartBit_ = 14
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int moduleMask_ = 0x7
 
static const unsigned int moduleStartBit_ = 2
 
static const unsigned int rod_fw_bwMask_ = 0x3
 
static const unsigned int rod_fw_bwStartBit_ = 12
 
static const unsigned int rodMask_ = 0x7F
 
static const unsigned int rodStartBit_ = 5
 
static const unsigned int sterMask_ = 0x3
 
static const unsigned int sterStartBit_ = 0
 

Additional Inherited Members

- Public Types inherited from SiStripDetId
enum  ModuleGeometry {
  UNKNOWNGEOMETRY, IB1, IB2, OB1,
  OB2, W1A, W2A, W3A,
  W1B, W2B, W3B, W4,
  W5, W6, W7
}
 
enum  SubDetector {
  UNKNOWN =0, TIB =3, TID =4, TOB =5,
  TEC =6
}
 
- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6
}
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Definition at line 16 of file TOBDetId.h.

Constructor & Destructor Documentation

TOBDetId::TOBDetId ( )
inline

Constructor of a null id

Definition at line 110 of file TOBDetId.h.

110  : SiStripDetId() {
111 }
TOBDetId::TOBDetId ( uint32_t  rawid)
inline

Constructor from a raw value

Definition at line 113 of file TOBDetId.h.

113  : SiStripDetId(rawid) {
114 }
TOBDetId::TOBDetId ( const DetId id)
inline

Construct from generic DetId

Definition at line 116 of file TOBDetId.h.

116  : SiStripDetId(id.rawId()) {
117 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
TOBDetId::TOBDetId ( uint32_t  layer,
uint32_t  rod_fw_bw,
uint32_t  rod,
uint32_t  module,
uint32_t  ster 
)
inline

Definition at line 25 of file TOBDetId.h.

References DetId::id_, layerMask_, layerStartBit_, moduleMask_, moduleStartBit_, rod_fw_bwMask_, rod_fw_bwStartBit_, rodMask_, rodStartBit_, sterMask_, and sterStartBit_.

31  (rod_fw_bw& rod_fw_bwMask_) << rod_fw_bwStartBit_ |
32  (rod& rodMask_) << rodStartBit_ |
34  (ster& sterMask_) << sterStartBit_ ;
35  }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
static const unsigned int rod_fw_bwStartBit_
Definition: TOBDetId.h:95
static const unsigned int layerMask_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: TOBDetId.h:101
static const unsigned int layerStartBit_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: TOBDetId.h:94
std::vector< unsigned int > rod() const
rod id
Definition: TOBDetId.h:49
static const unsigned int rod_fw_bwMask_
Definition: TOBDetId.h:102
static const unsigned int moduleStartBit_
Definition: TOBDetId.h:97
static const unsigned int moduleMask_
Definition: TOBDetId.h:104
static const unsigned int sterStartBit_
Definition: TOBDetId.h:98
static const unsigned int rodMask_
Definition: TOBDetId.h:103
uint32_t id_
Definition: DetId.h:55
static const unsigned int sterMask_
Definition: TOBDetId.h:105
static const unsigned int rodStartBit_
Definition: TOBDetId.h:96
Definition: vlib.h:208

Member Function Documentation

bool TOBDetId::isDoubleSide ( ) const
inline

Returns true if the module is a double side = rphi + stereo

Definition at line 119 of file TOBDetId.h.

References SiStripDetId::glued(), and layer().

Referenced by TrackerTreeGenerator::analyze(), isRPhi(), and isStereo().

119  {
120  // Double Side: only layers 1 and 2
121  return this->glued() == 0 && ( this->layer() == 1 || this->layer() == 2 );
122 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
uint32_t glued() const
Definition: SiStripDetId.h:154
bool TOBDetId::isRPhi ( )
inline

Returns true if the module is rphi

Definition at line 85 of file TOBDetId.h.

References isDoubleSide(), and SiStripDetId::stereo().

Referenced by TrackerTreeGenerator::analyze().

86  { return (stereo() == 0 && !isDoubleSide());}
uint32_t stereo() const
Definition: SiStripDetId.h:162
bool isDoubleSide() const
Definition: TOBDetId.h:119
bool TOBDetId::isStereo ( )
inline

Returns true if the module is stereo

Definition at line 89 of file TOBDetId.h.

References isDoubleSide(), and SiStripDetId::stereo().

Referenced by TkLayerMap::getXY_TOB().

90  { return (stereo() != 0 && !isDoubleSide());}
uint32_t stereo() const
Definition: SiStripDetId.h:162
bool isDoubleSide() const
Definition: TOBDetId.h:119
bool TOBDetId::isZMinusSide ( ) const
inline

Returns true if the module is in TOB- (z<0 side)

Definition at line 69 of file TOBDetId.h.

References side().

Referenced by SiStripFolderOrganizer::getFolderName(), TkLayerMap::getXY_TOB(), and isZPlusSide().

70  { return (side() == 1);}
unsigned int side() const
Definition: TOBDetId.h:55
bool TOBDetId::isZPlusSide ( ) const
inline

Returns true if the module is in TOB+ (z>0 side)

Definition at line 65 of file TOBDetId.h.

References isZMinusSide().

66  { return (!isZMinusSide());}
bool isZMinusSide() const
Definition: TOBDetId.h:69
unsigned int TOBDetId::layer ( ) const
inline

layer id

Definition at line 39 of file TOBDetId.h.

References DetId::id_, layerMask_, and layerStartBit_.

Referenced by SiStripDetSummary::add(), TrackerTreeGenerator::analyze(), sistrip::MeasureLA::calibration_key(), SimpleDAFHitCollector::Debug(), reco::HitPattern::encode(), KFTrajectoryFitter::fitOne(), SiStripSubStructure::getTOBDetectors(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), fireworks::info(), PFCheckHitPattern::interpretDetId(), isDoubleSide(), LA_Filler_Fitter::layerLabel(), layerNumber(), trackerHierarchy(), and KFTrajectorySmoother::trajectory().

39  {
40  return int((id_>>layerStartBit_) & layerMask_);
41  }
static const unsigned int layerMask_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: TOBDetId.h:101
static const unsigned int layerStartBit_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: TOBDetId.h:94
uint32_t id_
Definition: DetId.h:55
unsigned int TOBDetId::layerNumber ( ) const
inline

Returns the layer number

Definition at line 73 of file TOBDetId.h.

References layer().

Referenced by SiStripFolderOrganizer::getFolderName(), TkLayerMap::getXY_TOB(), and TkLayerMap::layerSearch().

74  { return layer();}
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int TOBDetId::module ( ) const
inline

detector id

Definition at line 58 of file TOBDetId.h.

References DetId::id_, moduleMask_, and moduleStartBit_.

Referenced by TrackerTreeGenerator::analyze(), moduleNumber(), and trackerHierarchy().

59  { return ((id_>>moduleStartBit_)& moduleMask_) ;}
static const unsigned int moduleStartBit_
Definition: TOBDetId.h:97
static const unsigned int moduleMask_
Definition: TOBDetId.h:104
uint32_t id_
Definition: DetId.h:55
unsigned int TOBDetId::moduleNumber ( ) const
inline

Returns the module number

Definition at line 81 of file TOBDetId.h.

References module().

Referenced by TkLayerMap::getXY_TOB().

82  { return module();}
unsigned int module() const
detector id
Definition: TOBDetId.h:58
std::vector<unsigned int> TOBDetId::rod ( ) const
inline

rod id

vector[0] = 1 -> bw rod (TOB-) vector[0] = 2 -> fw rod (TOB+) vector[1] -> rod

Definition at line 49 of file TOBDetId.h.

References pileupDistInMC::num, rodNumber(), and side().

Referenced by TrackerTreeGenerator::analyze(), SiStripSubStructure::getTOBDetectors(), and trackerHierarchy().

50  { std::vector<unsigned int> num;
51  num.push_back( side() );
52  num.push_back( rodNumber() );
53  return num ;}
unsigned int rodNumber() const
Definition: TOBDetId.h:77
unsigned int side() const
Definition: TOBDetId.h:55
unsigned int TOBDetId::rodNumber ( ) const
inline

Returns the rod number

Definition at line 77 of file TOBDetId.h.

References DetId::id_, rodMask_, and rodStartBit_.

Referenced by SiStripFolderOrganizer::getFolderName(), TkLayerMap::getXY_TOB(), and rod().

78  { return ((id_>>rodStartBit_) & rodMask_);}
static const unsigned int rodMask_
Definition: TOBDetId.h:103
uint32_t id_
Definition: DetId.h:55
static const unsigned int rodStartBit_
Definition: TOBDetId.h:96
unsigned int TOBDetId::side ( ) const
inline

Definition at line 55 of file TOBDetId.h.

References DetId::id_, rod_fw_bwMask_, and rod_fw_bwStartBit_.

Referenced by isZMinusSide(), and rod().

56  { return ((id_>>rod_fw_bwStartBit_) & rod_fw_bwMask_);}
static const unsigned int rod_fw_bwStartBit_
Definition: TOBDetId.h:95
static const unsigned int rod_fw_bwMask_
Definition: TOBDetId.h:102
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

const unsigned int TOBDetId::layerMask_ = 0x7
staticprivate

two bits would be enough, but we could use the number "0" as a wildcard

Definition at line 101 of file TOBDetId.h.

Referenced by layer(), and TOBDetId().

const unsigned int TOBDetId::layerStartBit_ = 14
staticprivate

two bits would be enough, but we could use the number "0" as a wildcard

Definition at line 94 of file TOBDetId.h.

Referenced by layer(), and TOBDetId().

const unsigned int TOBDetId::moduleMask_ = 0x7
staticprivate

Definition at line 104 of file TOBDetId.h.

Referenced by module(), and TOBDetId().

const unsigned int TOBDetId::moduleStartBit_ = 2
staticprivate

Definition at line 97 of file TOBDetId.h.

Referenced by module(), and TOBDetId().

const unsigned int TOBDetId::rod_fw_bwMask_ = 0x3
staticprivate

Definition at line 102 of file TOBDetId.h.

Referenced by side(), and TOBDetId().

const unsigned int TOBDetId::rod_fw_bwStartBit_ = 12
staticprivate

Definition at line 95 of file TOBDetId.h.

Referenced by side(), and TOBDetId().

const unsigned int TOBDetId::rodMask_ = 0x7F
staticprivate

Definition at line 103 of file TOBDetId.h.

Referenced by rodNumber(), and TOBDetId().

const unsigned int TOBDetId::rodStartBit_ = 5
staticprivate

Definition at line 96 of file TOBDetId.h.

Referenced by rodNumber(), and TOBDetId().

const unsigned int TOBDetId::sterMask_ = 0x3
staticprivate

Definition at line 105 of file TOBDetId.h.

Referenced by TOBDetId().

const unsigned int TOBDetId::sterStartBit_ = 0
staticprivate

Definition at line 98 of file TOBDetId.h.

Referenced by TOBDetId().