CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
ME0DetId Class Reference

#include <ME0DetId.h>

Inheritance diagram for ME0DetId:
DetId

Public Member Functions

int chamber () const
 Chamber id: it identifies a chamber in a ring it goes from 1 to 36. More...
 
ME0DetId chamberId () const
 Return the corresponding ChamberId (mask layers) More...
 
int layer () const
 Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the outer layer. More...
 
ME0DetId layerId () const
 Return the corresponding LayerId (mask eta partition) More...
 
 ME0DetId ()
 
 ME0DetId (uint32_t id)
 
 ME0DetId (DetId id)
 
 ME0DetId (int region, int layer, int chamber, int roll)
 Construct from fully qualified identifier. More...
 
int nlayers () const
 For future modifications (implement more layers) More...
 
bool operator< (const ME0DetId &r) const
 Sort Operator based on the raw detector id. More...
 
int region () const
 Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap. More...
 
int roll () const
 
int station () const
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Attributes

static const int maxChamberId = 18
 
static const int maxLayerId = 6
 
static const int maxRegionId = 1
 
static const int maxRollId = 10
 
static const int minChamberId = 0
 
static const int minLayerId = 0
 
static const int minRegionId = -1
 
static const int minRollId = 0
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 

Private Member Functions

void init (int region, int layer, int chamber, int roll)
 

Private Attributes

int trind
 

Static Private Attributes

static const uint32_t chamberIdMask_ = ~( (LayerMask_<<LayerStartBit_) | (RollMask_<<RollStartBit_))
 
static const unsigned int ChamberMask_ = 0X3F
 
static const int ChamberNumBits_ = 6
 
static const int ChamberStartBit_ = RegionStartBit_+RegionNumBits_
 
static const uint32_t layerIdMask_ = ~(RollMask_<<RollStartBit_)
 
static const unsigned int LayerMask_ = 0X1F
 
static const int LayerNumBits_ = 5
 
static const int LayerStartBit_ = ChamberStartBit_+ChamberNumBits_
 
static const int RegionMask_ = 0X3
 
static const int RegionNumBits_ = 2
 
static const int RegionStartBit_ = 0
 
static const unsigned int RollMask_ = 0X1F
 
static const int RollNumBits_ = 5
 
static const int RollStartBit_ = LayerStartBit_+LayerNumBits_
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7, HGCalEE =8,
  HGCalHSi =9, HGCalHSc =10, HGCalTrigger =11
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

DetUnit identifier for ME0s

Definition at line 16 of file ME0DetId.h.

Constructor & Destructor Documentation

ME0DetId::ME0DetId ( )

Definition at line 8 of file ME0DetId.cc.

Referenced by chamberId(), and layerId().

static const int ME0
Definition: MuonSubdetId.h:16
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
ME0DetId::ME0DetId ( uint32_t  id)

Construct from a packed id. It is required that the Detector part of id is Muon and the SubDet part is ME0, otherwise an exception is thrown.

Definition at line 11 of file ME0DetId.cc.

References DetId::det(), Exception, MuonSubdetId::ME0, DetId::Muon, and DetId::subdetId().

11  :DetId(id){
13  throw cms::Exception("InvalidDetId") << "ME0DetId ctor:"
14  << " det: " << det()
15  << " subdet: " << subdetId()
16  << " is not a valid ME0 id";
17  }
18 }
static const int ME0
Definition: MuonSubdetId.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
ME0DetId::ME0DetId ( DetId  id)

Definition at line 20 of file ME0DetId.cc.

References DetId::det(), Exception, MuonSubdetId::ME0, DetId::Muon, and DetId::subdetId().

20  :DetId(id) {
22  throw cms::Exception("InvalidDetId") << "ME0DetId ctor:"
23  << " det: " << det()
24  << " subdet: " << subdetId()
25  << " is not a valid ME0 id";
26  }
27 }
static const int ME0
Definition: MuonSubdetId.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
ME0DetId::ME0DetId ( int  region,
int  layer,
int  chamber,
int  roll 
)

Construct from fully qualified identifier.

Definition at line 29 of file ME0DetId.cc.

References init().

29  :
31 {
32  this->init(region,layer,chamber,roll);
33 }
static const int ME0
Definition: MuonSubdetId.h:16
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:51
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: ME0DetId.h:46
void init(int region, int layer, int chamber, int roll)
Definition: ME0DetId.cc:36
int roll() const
Definition: ME0DetId.h:62
int layer() const
Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the oute...
Definition: ME0DetId.h:56
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30

Member Function Documentation

int ME0DetId::chamber ( ) const
inline

Chamber id: it identifies a chamber in a ring it goes from 1 to 36.

Definition at line 51 of file ME0DetId.h.

References ChamberMask_, ChamberStartBit_, DetId::id_, createfilelist::int, and minChamberId.

Referenced by EMTFGEMDetId::chamber(), MuonHitHelper::chamber(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), fireworks::info(), and ME0SegmentsValidation::isMatched().

51  {
53  }
static const int minChamberId
Definition: ME0DetId.h:89
static const int ChamberStartBit_
Definition: ME0DetId.h:104
static const unsigned int ChamberMask_
Definition: ME0DetId.h:105
uint32_t id_
Definition: DetId.h:62
ME0DetId ME0DetId::chamberId ( ) const
inline

Return the corresponding ChamberId (mask layers)

Definition at line 67 of file ME0DetId.h.

References chamberIdMask_, DetId::id_, and ME0DetId().

Referenced by ME0GeometryParsFromDD::buildChamber(), ME0GeometryBuilderFromDDD::buildChamber(), ME0GeometryBuilderFromDDD::buildGeometry(), GlobalMuonRefitter::checkMuonHits(), and GlobalMuonRefitter::selectMuonHits().

67  {
68  return ME0DetId(id_ & chamberIdMask_);
69  }
ME0DetId()
Definition: ME0DetId.cc:8
static const uint32_t chamberIdMask_
Definition: ME0DetId.h:115
uint32_t id_
Definition: DetId.h:62
void ME0DetId::init ( int  region,
int  layer,
int  chamber,
int  roll 
)
private

Definition at line 36 of file ME0DetId.cc.

References ChamberMask_, ChamberStartBit_, Exception, DetId::id_, LayerMask_, LayerStartBit_, maxChamberId, maxLayerId, maxRegionId, maxRollId, minChamberId, minLayerId, minRegionId, minRollId, RegionMask_, RegionStartBit_, RollMask_, and RollStartBit_.

Referenced by ME0DetId().

37 {
38  if ( region < minRegionId || region > maxRegionId ||
39  layer < minLayerId || layer > maxLayerId ||
40  chamber < minChamberId || chamber > maxChamberId ||
41  roll < minRollId || roll > maxRollId) {
42  throw cms::Exception("InvalidDetId") << "ME0DetId ctor:"
43  << " Invalid parameters: "
44  << " region "<<region
45  << " layer "<<layer
46  << " chamber "<<chamber
47  << " etaPartition "<<roll
48  << std::endl;
49  }
50  int regionInBits=region-minRegionId;
51  int layerInBits=layer-minLayerId;
52  int chamberInBits=chamber-minChamberId;
53  int rollInBits=roll-minRollId;
54 
55  id_ |= ( regionInBits & RegionMask_) << RegionStartBit_ |
56  ( layerInBits & LayerMask_) << LayerStartBit_ |
57  ( chamberInBits & ChamberMask_) << ChamberStartBit_ |
58  ( rollInBits & RollMask_) << RollStartBit_ ;
59 
60 }
static const int minChamberId
Definition: ME0DetId.h:89
static const int maxChamberId
Definition: ME0DetId.h:90
static const int maxRollId
Definition: ME0DetId.h:96
static const int minLayerId
Definition: ME0DetId.h:92
static const unsigned int LayerMask_
Definition: ME0DetId.h:109
static const int maxRegionId
Definition: ME0DetId.h:87
static const int minRegionId
Definition: ME0DetId.h:86
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:51
static const int LayerStartBit_
Definition: ME0DetId.h:108
static const int ChamberStartBit_
Definition: ME0DetId.h:104
static const unsigned int ChamberMask_
Definition: ME0DetId.h:105
uint32_t id_
Definition: DetId.h:62
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: ME0DetId.h:46
static const int RegionMask_
Definition: ME0DetId.h:101
int roll() const
Definition: ME0DetId.h:62
static const int RegionStartBit_
Definition: ME0DetId.h:100
static const int maxLayerId
Definition: ME0DetId.h:93
static const unsigned int RollMask_
Definition: ME0DetId.h:113
int layer() const
Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the oute...
Definition: ME0DetId.h:56
static const int minRollId
Definition: ME0DetId.h:95
static const int RollStartBit_
Definition: ME0DetId.h:112
int ME0DetId::layer ( ) const
inline

Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the outer layer.

Definition at line 56 of file ME0DetId.h.

References DetId::id_, createfilelist::int, LayerMask_, LayerStartBit_, and minLayerId.

Referenced by ME0ReDigiProducer::TemporaryGeometry::getCentralTOF(), ME0ReDigiProducer::getStripProperties(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), fireworks::info(), ME0SegmentsValidation::isMatched(), EMTFGEMDetId::layer(), ME0Chamber::layer(), and operator<().

56  {
58  }
static const int minLayerId
Definition: ME0DetId.h:92
static const unsigned int LayerMask_
Definition: ME0DetId.h:109
static const int LayerStartBit_
Definition: ME0DetId.h:108
uint32_t id_
Definition: DetId.h:62
ME0DetId ME0DetId::layerId ( ) const
inline

Return the corresponding LayerId (mask eta partition)

Definition at line 71 of file ME0DetId.h.

References DetId::id_, layerIdMask_, and ME0DetId().

Referenced by ME0GeometryBuilderFromDDD::buildGeometry(), ME0GeometryParsFromDD::buildLayer(), and ME0GeometryBuilderFromDDD::buildLayer().

71  {
72  return ME0DetId(id_ & layerIdMask_);
73  }
static const uint32_t layerIdMask_
Definition: ME0DetId.h:116
ME0DetId()
Definition: ME0DetId.cc:8
uint32_t id_
Definition: DetId.h:62
int ME0DetId::nlayers ( ) const
inline

For future modifications (implement more layers)

Definition at line 82 of file ME0DetId.h.

References createfilelist::int, and maxLayerId.

Referenced by ME0SegmentAlgorithm::isGoodToMerge().

82  {
83  return int(maxLayerId);
84  }
static const int maxLayerId
Definition: ME0DetId.h:93
bool ME0DetId::operator< ( const ME0DetId r) const
inline

Sort Operator based on the raw detector id.

Definition at line 36 of file ME0DetId.h.

References layer(), and DetId::rawId().

36  {
37  if (this->layer() == r.layer() ){
38  return this->rawId()<r.rawId();
39  }
40  else{
41  return (this->layer() > r.layer());
42  }
43  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
int layer() const
Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the oute...
Definition: ME0DetId.h:56
int ME0DetId::region ( ) const
inline

Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.

Definition at line 46 of file ME0DetId.h.

References DetId::id_, createfilelist::int, minRegionId, RegionMask_, and RegionStartBit_.

Referenced by DetIdInfo::info(), fireworks::info(), ME0SegmentsValidation::isMatched(), and EMTFGEMDetId::region().

46  {
48  }
static const int minRegionId
Definition: ME0DetId.h:86
uint32_t id_
Definition: DetId.h:62
static const int RegionMask_
Definition: ME0DetId.h:101
static const int RegionStartBit_
Definition: ME0DetId.h:100
int ME0DetId::roll ( ) const
inline

Roll id (also known as eta partition): each chamber is divided along the strip direction in several parts (rolls) ME0 up to 10

Definition at line 62 of file ME0DetId.h.

References DetId::id_, createfilelist::int, minRollId, RollMask_, and RollStartBit_.

Referenced by reco::HitPattern::encode(), ME0ReDigiProducer::getStripProperties(), ME0SimHitMatcher::hitPartitions(), ME0SegmentsValidation::isMatched(), and EMTFGEMDetId::roll().

62  {
63  return int((id_>>RollStartBit_) & RollMask_) + minRollId; // value 0 is used as wild card
64  }
uint32_t id_
Definition: DetId.h:62
static const unsigned int RollMask_
Definition: ME0DetId.h:113
static const int minRollId
Definition: ME0DetId.h:95
static const int RollStartBit_
Definition: ME0DetId.h:112
int ME0DetId::station ( ) const
inline

Member Data Documentation

const uint32_t ME0DetId::chamberIdMask_ = ~( (LayerMask_<<LayerStartBit_) | (RollMask_<<RollStartBit_))
staticprivate

Definition at line 115 of file ME0DetId.h.

Referenced by chamberId().

const unsigned int ME0DetId::ChamberMask_ = 0X3F
staticprivate

Definition at line 105 of file ME0DetId.h.

Referenced by chamber(), and init().

const int ME0DetId::ChamberNumBits_ = 6
staticprivate

Definition at line 103 of file ME0DetId.h.

const int ME0DetId::ChamberStartBit_ = RegionStartBit_+RegionNumBits_
staticprivate

Definition at line 104 of file ME0DetId.h.

Referenced by chamber(), and init().

const uint32_t ME0DetId::layerIdMask_ = ~(RollMask_<<RollStartBit_)
staticprivate

Definition at line 116 of file ME0DetId.h.

Referenced by layerId().

const unsigned int ME0DetId::LayerMask_ = 0X1F
staticprivate

Definition at line 109 of file ME0DetId.h.

Referenced by init(), and layer().

const int ME0DetId::LayerNumBits_ = 5
staticprivate

Definition at line 107 of file ME0DetId.h.

const int ME0DetId::LayerStartBit_ = ChamberStartBit_+ChamberNumBits_
staticprivate

Definition at line 108 of file ME0DetId.h.

Referenced by init(), and layer().

const int ME0DetId::maxChamberId = 18
static

Definition at line 90 of file ME0DetId.h.

Referenced by MuonME0DetLayerGeometryBuilder::buildEndcapLayers(), and init().

const int ME0DetId::maxLayerId = 6
static

Definition at line 93 of file ME0DetId.h.

Referenced by init(), and nlayers().

const int ME0DetId::maxRegionId = 1
static

Definition at line 87 of file ME0DetId.h.

Referenced by init(), FWRPZViewGeometry::showME0(), and FW3DViewGeometry::showMuonEndcap().

const int ME0DetId::maxRollId = 10
static

Definition at line 96 of file ME0DetId.h.

Referenced by init().

const int ME0DetId::minChamberId = 0
static

Definition at line 89 of file ME0DetId.h.

Referenced by MuonME0DetLayerGeometryBuilder::buildEndcapLayers(), chamber(), and init().

const int ME0DetId::minLayerId = 0
static

Definition at line 92 of file ME0DetId.h.

Referenced by init(), and layer().

const int ME0DetId::minRegionId = -1
static
const int ME0DetId::minRollId = 0
static

Definition at line 95 of file ME0DetId.h.

Referenced by init(), and roll().

const int ME0DetId::RegionMask_ = 0X3
staticprivate

Definition at line 101 of file ME0DetId.h.

Referenced by init(), and region().

const int ME0DetId::RegionNumBits_ = 2
staticprivate

Definition at line 99 of file ME0DetId.h.

const int ME0DetId::RegionStartBit_ = 0
staticprivate

Definition at line 100 of file ME0DetId.h.

Referenced by init(), and region().

const unsigned int ME0DetId::RollMask_ = 0X1F
staticprivate

Definition at line 113 of file ME0DetId.h.

Referenced by init(), and roll().

const int ME0DetId::RollNumBits_ = 5
staticprivate

Definition at line 111 of file ME0DetId.h.

const int ME0DetId::RollStartBit_ = LayerStartBit_+LayerNumBits_
staticprivate

Definition at line 112 of file ME0DetId.h.

Referenced by init(), and roll().

int ME0DetId::trind
private

Definition at line 124 of file ME0DetId.h.