test
CMS 3D CMS Logo

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

Roman Pot detector ID. More...

#include <TotemRPDetId.h>

Inheritance diagram for TotemRPDetId:
DetId

Public Types

enum  ElementLevel {
  lSystem, lArm, lStation, lRP,
  lPlane, lChip, lStrip
}
 level identifier in the RP hierarchy More...
 
enum  NameFlag { nShort, nFull, nPath }
 type of name returned by *Name functions More...
 
- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 

Public Member Functions

int arm () const
 
int detector () const
 
unsigned int detectorDecId () const
 
bool isStripsCoordinateUDirection () const
 
bool isStripsCoordinateVDirection () const
 
int romanPot () const
 
int rpCopyNumber () const
 
int station () const
 
 TotemRPDetId ()
 
 TotemRPDetId (uint32_t id)
 
 TotemRPDetId (unsigned int Arm, unsigned int Station, unsigned int RomanPot, unsigned int Detector)
 Construct from fully qualified identifier. More...
 
- 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 Public Member Functions

static std::string armName (unsigned int id, NameFlag flag=nFull)
 returns official name of an arm characterized by ''id''; if ''full'' is true, prefix rp_ added More...
 
static unsigned int armOfDet (unsigned int i)
 returns ID of arm for given detector ID ''i'' More...
 
static unsigned int armOfRP (unsigned int i)
 returns ID of arm for given RP ID ''i'' More...
 
static unsigned int armOfSt (unsigned int i)
 returns ID of arm for given station ID ''i'' More...
 
static bool check (unsigned int raw)
 returs true it the raw ID is a TOTEM RP one More...
 
static std::string chipName (unsigned int id, NameFlag flag=nFull)
 returns official name of a chip characterized by ''id''; if ''full'' is true, name of plane is prefixed More...
 
static unsigned int decToRawId (unsigned int dec)
 fast conversion Decimal to Raw ID More...
 
static bool isStripsCoordinateUDirection (int Detector)
 
static std::string officialName (ElementLevel level, unsigned int id, NameFlag flag=nFull, unsigned char strip=0)
 shortcut to use any of the *Name methods, given the ElementLevel More...
 
static std::string planeName (unsigned int id, NameFlag flag=nFull)
 returns official name of a plane characterized by ''id''; if ''full'' is true, name of RP is prefixed More...
 
static unsigned int rawToDecId (unsigned int raw)
 fast conversion Raw to Decimal ID More...
 
static std::string rpName (unsigned int id, NameFlag flag=nFull)
 returns official name of a RP characterized by ''id''; if ''full'' is true, name of station is prefixed More...
 
static unsigned int rpOfDet (unsigned int i)
 returns ID of RP for given detector ID ''i'' More...
 
static std::string stationName (unsigned int id, NameFlag flag=nFull)
 returns official name of a station characterized by ''id''; if ''full'' is true, name of arm is prefixed More...
 
static unsigned int stOfDet (unsigned int i)
 returns ID of station for given detector ID ''i'' More...
 
static unsigned int stOfRP (unsigned int i)
 returns ID of station for given RP ID ''i'' More...
 
static std::string stripName (unsigned int id, unsigned char strip, NameFlag flag=nFull)
 returns official name of a strip characterized by ''id'' (of chip) and strip number; if ''full'' is true, name of chip is prefixed More...
 
static std::string systemName (NameFlag flag=nFull)
 returns the name of the RP system More...
 

Static Public Attributes

static const unsigned int maskArm = 0x1
 
static const unsigned int maskDet = 0xF
 
static const unsigned int maskRP = 0x7
 
static const unsigned int maskStation = 0x3
 
static const unsigned int maxArm = 1
 
static const unsigned int maxDet = 9
 
static const unsigned int maxRP = 5
 
static const unsigned int maxStation = 2
 
static const unsigned int startArmBit = 24
 
static const unsigned int startDetBit = 15
 
static const unsigned int startRPBit = 19
 
static const unsigned int startStationBit = 22
 
static const unsigned int totem_rp_subdet_id = 3
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Private Member Functions

void init (unsigned int Arm, unsigned int Station, unsigned int RomanPot, unsigned int Detector)
 

Additional Inherited Members

- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Roman Pot detector ID.

There are 3 types of IDs used in CMSSW in the context of RP.

The structure of the raw ID is the following (based on the concept of the DetId) Bit 24 = Arm: 1=z>0 0=z<0 Bits [22:23] Station Bits [19:21] Roman Pot number Bits [15:18] Si det. number

The advantage of the symbolic ID is that it is easily readable and that it can address most of the elements int the RP subdetector system: chip ID = |arm|station|RP|det|VFAT|, ie. 5-digit decimal number (possibly with leading zeros)
detector ID = |arm|station|RP|det|
Roman Pot ID = |arm|station|RP|
station ID = |arm|station|
arm ID = |arm|
where

Moreover there is an official naming scheme (EDMS 906715). It is supported by the ...Name() methods.

Definition at line 51 of file TotemRPDetId.h.

Member Enumeration Documentation

level identifier in the RP hierarchy

Enumerator
lSystem 
lArm 
lStation 
lRP 
lPlane 
lChip 
lStrip 

Definition at line 171 of file TotemRPDetId.h.

type of name returned by *Name functions

Enumerator
nShort 
nFull 
nPath 

Definition at line 168 of file TotemRPDetId.h.

Constructor & Destructor Documentation

TotemRPDetId::TotemRPDetId ( )

Definition at line 18 of file TotemRPDetId.cc.

19 {
20 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const unsigned int totem_rp_subdet_id
Definition: TotemRPDetId.h:63
TotemRPDetId::TotemRPDetId ( uint32_t  id)
explicit

Construct from a raw id. It is required that the Detector part of id is Totem and the SubDet part is RP, otherwise an exception is thrown.

Definition at line 24 of file TotemRPDetId.cc.

References check(), DetId::det(), Exception, and DetId::subdetId().

24  : DetId(id)
25 {
26  if (! check(id))
27  {
28  throw cms::Exception("InvalidDetId") << "TotemRPDetId ctor:"
29  << " det: " << det()
30  << " subdet: " << subdetId()
31  << " is not a valid Totem RP id";
32  }
33 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
static bool check(unsigned int raw)
returs true it the raw ID is a TOTEM RP one
Definition: TotemRPDetId.h:113
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
TotemRPDetId::TotemRPDetId ( unsigned int  Arm,
unsigned int  Station,
unsigned int  RomanPot,
unsigned int  Detector 
)

Construct from fully qualified identifier.

Definition at line 61 of file TotemRPDetId.cc.

References init().

61  :
63 {
64  this->init(Arm, Station, RomanPot, Detector);
65 }
void init(unsigned int Arm, unsigned int Station, unsigned int RomanPot, unsigned int Detector)
Definition: TotemRPDetId.cc:37
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const unsigned int totem_rp_subdet_id
Definition: TotemRPDetId.h:63
Detector
Definition: DetId.h:24

Member Function Documentation

int TotemRPDetId::arm ( ) const
inline

Definition at line 70 of file TotemRPDetId.h.

References DetId::id_, maskArm, and startArmBit.

Referenced by detectorDecId(), and rpCopyNumber().

71  {
72  return int ((id_>>startArmBit) & maskArm);
73  }
static const unsigned int startArmBit
Definition: TotemRPDetId.h:65
uint32_t id_
Definition: DetId.h:55
static const unsigned int maskArm
Definition: TotemRPDetId.h:65
string TotemRPDetId::armName ( unsigned int  id,
NameFlag  flag = nFull 
)
static

returns official name of an arm characterized by ''id''; if ''full'' is true, prefix rp_ added

Definition at line 92 of file TotemRPDetId.cc.

References mergeVDriftHistosByStation::name, nFull, nPath, and systemName().

Referenced by TotemRPDQMSource::ArmPlots::ArmPlots(), officialName(), and stationName().

93 {
94  string name;
95  if (flag == nFull) name = systemName(flag) + "_";
96  if (flag == nPath) name = systemName(flag) + "/sector ";
97 
98  if (id == 0) name += "45";
99  if (id == 1) name += "56";
100 
101  return name;
102 }
static std::string systemName(NameFlag flag=nFull)
returns the name of the RP system
Definition: TotemRPDetId.cc:81
static unsigned int TotemRPDetId::armOfDet ( unsigned int  i)
inlinestatic

returns ID of arm for given detector ID ''i''

Definition at line 147 of file TotemRPDetId.h.

Referenced by TotemRPGeometry::BuildSets().

147 { return i / 1000; }
int i
Definition: DBlmapReader.cc:9
static unsigned int TotemRPDetId::armOfRP ( unsigned int  i)
inlinestatic

returns ID of arm for given RP ID ''i''

Definition at line 153 of file TotemRPDetId.h.

153 { return i / 100; }
int i
Definition: DBlmapReader.cc:9
static unsigned int TotemRPDetId::armOfSt ( unsigned int  i)
inlinestatic

returns ID of arm for given station ID ''i''

Definition at line 156 of file TotemRPDetId.h.

156 { return i / 10; }
int i
Definition: DBlmapReader.cc:9
static bool TotemRPDetId::check ( unsigned int  raw)
inlinestatic

returs true it the raw ID is a TOTEM RP one

Definition at line 113 of file TotemRPDetId.h.

References DetId::kDetOffset, DetId::kSubdetOffset, totem_rp_subdet_id, and DetId::VeryForward.

Referenced by TotemRPDetId().

114  {
115  return ((raw >> DetId::kDetOffset) & 0xF) == DetId::VeryForward &&
116  ((raw >> DetId::kSubdetOffset) & 0x7) == totem_rp_subdet_id;
117  }
static const int kSubdetOffset
Definition: DetId.h:21
static const unsigned int totem_rp_subdet_id
Definition: TotemRPDetId.h:63
static const int kDetOffset
Definition: DetId.h:20
string TotemRPDetId::chipName ( unsigned int  id,
NameFlag  flag = nFull 
)
static

returns official name of a chip characterized by ''id''; if ''full'' is true, name of plane is prefixed

Definition at line 151 of file TotemRPDetId.cc.

References mergeVDriftHistosByStation::name, nFull, nPath, and planeName().

Referenced by officialName(), and stripName().

152 {
153  string name;
154  if (flag == nFull) name = planeName(id / 10, flag) + "_";
155  if (flag == nPath) name = planeName(id / 10, flag) + "/chip ";
156 
157  char buf[10];
158  sprintf(buf, "%u", (id % 10) + 1);
159 
160  return name + buf;
161 }
static std::string planeName(unsigned int id, NameFlag flag=nFull)
returns official name of a plane characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of RP is prefixed...
static unsigned int TotemRPDetId::decToRawId ( unsigned int  dec)
inlinestatic

fast conversion Decimal to Raw ID

Definition at line 129 of file TotemRPDetId.h.

References i, DetId::kDetOffset, DetId::kSubdetOffset, maskArm, maskDet, maskRP, maskStation, startArmBit, startDetBit, startRPBit, startStationBit, totem_rp_subdet_id, and DetId::VeryForward.

Referenced by TotemRPDQMSource::analyze(), BuildElasticCorrectionsFile::beginRun(), BuildElasticCorrectionsFile::ProcessOnePot(), and RawToDigiConverter::Run().

130  {
132  i &= 0xFE000000;
133  i |= ((dec % 10) & maskDet) << startDetBit; dec /= 10;
134  i |= ((dec % 10) & maskRP) << startRPBit; dec /= 10;
135  i |= ((dec % 10) & maskStation) << startStationBit; dec /= 10;
136  i |= ((dec % 10) & maskArm) << startArmBit;
137  return i;
138  }
static const unsigned int startRPBit
Definition: TotemRPDetId.h:67
int i
Definition: DBlmapReader.cc:9
static const int kSubdetOffset
Definition: DetId.h:21
static const unsigned int maskDet
Definition: TotemRPDetId.h:68
static const unsigned int startStationBit
Definition: TotemRPDetId.h:66
static const unsigned int maskRP
Definition: TotemRPDetId.h:67
static const unsigned int totem_rp_subdet_id
Definition: TotemRPDetId.h:63
static const unsigned int startDetBit
Definition: TotemRPDetId.h:68
static const unsigned int startArmBit
Definition: TotemRPDetId.h:65
static const int kDetOffset
Definition: DetId.h:20
static const unsigned int maskArm
Definition: TotemRPDetId.h:65
static const unsigned int maskStation
Definition: TotemRPDetId.h:66
int TotemRPDetId::detector ( ) const
inline

Definition at line 85 of file TotemRPDetId.h.

References DetId::id_, maskDet, and startDetBit.

Referenced by detectorDecId(), and isStripsCoordinateUDirection().

86  {
87  return int ((id_>>startDetBit) & maskDet);
88  }
static const unsigned int maskDet
Definition: TotemRPDetId.h:68
static const unsigned int startDetBit
Definition: TotemRPDetId.h:68
uint32_t id_
Definition: DetId.h:55
unsigned int TotemRPDetId::detectorDecId ( ) const
inline

Definition at line 105 of file TotemRPDetId.h.

References arm(), detector(), romanPot(), and station().

106  {
107  return detector() + romanPot()*10 + station()*100 + arm()*1000;
108  }
int station() const
Definition: TotemRPDetId.h:75
int detector() const
Definition: TotemRPDetId.h:85
int romanPot() const
Definition: TotemRPDetId.h:80
int arm() const
Definition: TotemRPDetId.h:70
void TotemRPDetId::init ( unsigned int  Arm,
unsigned int  Station,
unsigned int  RomanPot,
unsigned int  Detector 
)
inlineprivate

Definition at line 37 of file TotemRPDetId.cc.

References Exception, DetId::id_, maskArm, maskDet, maskRP, maskStation, maxArm, maxDet, maxRP, maxStation, convertSQLiteXML::ok, startArmBit, startDetBit, startRPBit, and startStationBit.

Referenced by TotemRPDetId().

38 {
39  if (Arm > maxArm || Station > maxStation || RomanPot > maxRP || Detector > maxDet)
40  {
41  throw cms::Exception("InvalidDetId") << "TotemRPDetId ctor:"
42  << " Invalid parameters: "
43  << " Arm "<<Arm
44  << " Station "<<Station
45  << " RomanPot "<<RomanPot
46  << " Detector "<<Detector
47  << std::endl;
48  }
49 
50  uint32_t ok=0xfe000000;
51  id_ &= ok;
52 
53  id_ |= ((Arm & maskArm) << startArmBit);
54  id_ |= ((Station & maskStation) << startStationBit);
55  id_ |= ((RomanPot & maskRP) << startRPBit);
56  id_ |= ((Detector & maskDet) << startDetBit);
57 }
static const unsigned int startRPBit
Definition: TotemRPDetId.h:67
static const unsigned int maskDet
Definition: TotemRPDetId.h:68
static const unsigned int startStationBit
Definition: TotemRPDetId.h:66
static const unsigned int maskRP
Definition: TotemRPDetId.h:67
static const unsigned int maxRP
Definition: TotemRPDetId.h:67
static const unsigned int startDetBit
Definition: TotemRPDetId.h:68
static const unsigned int startArmBit
Definition: TotemRPDetId.h:65
static const unsigned int maxStation
Definition: TotemRPDetId.h:66
static const unsigned int maxDet
Definition: TotemRPDetId.h:68
Detector
Definition: DetId.h:24
uint32_t id_
Definition: DetId.h:55
static const unsigned int maxArm
Definition: TotemRPDetId.h:65
static const unsigned int maskArm
Definition: TotemRPDetId.h:65
static const unsigned int maskStation
Definition: TotemRPDetId.h:66
bool TotemRPDetId::isStripsCoordinateUDirection ( ) const
inline

Definition at line 95 of file TotemRPDetId.h.

References detector().

Referenced by TotemRPDQMSource::analyze(), isStripsCoordinateVDirection(), GeometryInfoModule::PrintGeometry(), and TotemRPUVPatternFinder::produce().

96  {
97  return detector()%2;
98  }
int detector() const
Definition: TotemRPDetId.h:85
static bool TotemRPDetId::isStripsCoordinateUDirection ( int  Detector)
inlinestatic

is Detector u-detector? expect symbolic/decimal ID

Definition at line 161 of file TotemRPDetId.h.

162  {
163  return Detector%2;
164  }
Detector
Definition: DetId.h:24
bool TotemRPDetId::isStripsCoordinateVDirection ( ) const
inline

Definition at line 100 of file TotemRPDetId.h.

References isStripsCoordinateUDirection().

101  {
103  }
bool isStripsCoordinateUDirection() const
Definition: TotemRPDetId.h:95
string TotemRPDetId::officialName ( ElementLevel  level,
unsigned int  id,
NameFlag  flag = nFull,
unsigned char  strip = 0 
)
static

shortcut to use any of the *Name methods, given the ElementLevel

Definition at line 179 of file TotemRPDetId.cc.

References armName(), chipName(), lArm, lChip, lPlane, lRP, lStation, lStrip, lSystem, planeName(), rpName(), stationName(), stripName(), and systemName().

180 {
181  switch (level)
182  {
183  case lSystem: return systemName(flag);
184  case lArm: return armName(id, flag);
185  case lStation: return stationName(id, flag);
186  case lRP: return rpName(id, flag);
187  case lPlane: return planeName(id, flag);
188  case lChip: return chipName(id, flag);
189  case lStrip: return stripName(id, flag);
190  default: return "";
191  }
192 }
static std::string rpName(unsigned int id, NameFlag flag=nFull)
returns official name of a RP characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of station is prefix...
static std::string planeName(unsigned int id, NameFlag flag=nFull)
returns official name of a plane characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of RP is prefixed...
static std::string chipName(unsigned int id, NameFlag flag=nFull)
returns official name of a chip characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of plane is prefix...
static std::string stationName(unsigned int id, NameFlag flag=nFull)
returns official name of a station characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of arm is prefi...
static std::string stripName(unsigned int id, unsigned char strip, NameFlag flag=nFull)
returns official name of a strip characterized by &#39;&#39;id&#39;&#39; (of chip) and strip number; if &#39;&#39;full&#39;&#39; is t...
static std::string armName(unsigned int id, NameFlag flag=nFull)
returns official name of an arm characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, prefix rp_ added ...
Definition: TotemRPDetId.cc:92
static std::string systemName(NameFlag flag=nFull)
returns the name of the RP system
Definition: TotemRPDetId.cc:81
tuple level
Definition: testEve_cfg.py:34
string TotemRPDetId::planeName ( unsigned int  id,
NameFlag  flag = nFull 
)
static

returns official name of a plane characterized by ''id''; if ''full'' is true, name of RP is prefixed

Definition at line 137 of file TotemRPDetId.cc.

References mergeVDriftHistosByStation::name, nFull, nPath, and rpName().

Referenced by chipName(), TotemRPDQMHarvester::MakePlaneEfficiencyHistograms(), officialName(), and TotemRPDQMSource::PlanePlots::PlanePlots().

138 {
139  string name;
140  if (flag == nFull) name = rpName(id / 10, flag) + "_";
141  if (flag == nPath) name = rpName(id / 10, flag) + "/plane ";
142 
143  char buf[10];
144  sprintf(buf, "%02u", (id % 10) + 1);
145 
146  return name + buf;
147 }
static std::string rpName(unsigned int id, NameFlag flag=nFull)
returns official name of a RP characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of station is prefix...
static unsigned int TotemRPDetId::rawToDecId ( unsigned int  raw)
inlinestatic

fast conversion Raw to Decimal ID

Definition at line 120 of file TotemRPDetId.h.

References maskArm, maskDet, maskRP, maskStation, startArmBit, startDetBit, startRPBit, and startStationBit.

Referenced by TotemRPDQMSource::analyze(), TotemRPGeometryESModule::ApplyAlignments(), TotemRPGeometry::BuildSets(), GeometryInfoModule::PrintGeometry(), TotemRPUVPatternFinder::produce(), and TotemRPUVPatternFinder::recognizeAndSelect().

121  {
122  return ((raw >> startArmBit) & maskArm) * 1000
123  + ((raw >> startStationBit) & maskStation) * 100
124  + ((raw >> startRPBit) & maskRP) * 10
125  + ((raw >> startDetBit) & maskDet);
126  }
static const unsigned int startRPBit
Definition: TotemRPDetId.h:67
static const unsigned int maskDet
Definition: TotemRPDetId.h:68
static const unsigned int startStationBit
Definition: TotemRPDetId.h:66
static const unsigned int maskRP
Definition: TotemRPDetId.h:67
static const unsigned int startDetBit
Definition: TotemRPDetId.h:68
static const unsigned int startArmBit
Definition: TotemRPDetId.h:65
static const unsigned int maskArm
Definition: TotemRPDetId.h:65
static const unsigned int maskStation
Definition: TotemRPDetId.h:66
int TotemRPDetId::romanPot ( ) const
inline

Definition at line 80 of file TotemRPDetId.h.

References DetId::id_, maskRP, and startRPBit.

Referenced by detectorDecId(), and rpCopyNumber().

81  {
82  return int ((id_>>startRPBit) & maskRP);
83  }
static const unsigned int startRPBit
Definition: TotemRPDetId.h:67
static const unsigned int maskRP
Definition: TotemRPDetId.h:67
uint32_t id_
Definition: DetId.h:55
int TotemRPDetId::rpCopyNumber ( ) const
inline

Definition at line 90 of file TotemRPDetId.h.

References arm(), romanPot(), and station().

91  {
92  return romanPot() + 10*station() + 100*arm();
93  }
int station() const
Definition: TotemRPDetId.h:75
int romanPot() const
Definition: TotemRPDetId.h:80
int arm() const
Definition: TotemRPDetId.h:70
string TotemRPDetId::rpName ( unsigned int  id,
NameFlag  flag = nFull 
)
static

returns official name of a RP characterized by ''id''; if ''full'' is true, name of station is prefixed

Definition at line 120 of file TotemRPDetId.cc.

References mergeVDriftHistosByStation::name, nFull, nPath, and stationName().

Referenced by TotemRPDQMHarvester::MakeHitNumberRatios(), TotemRPDQMHarvester::MakePlaneEfficiencyHistograms(), officialName(), planeName(), and TotemRPDQMSource::PotPlots::PotPlots().

121 {
122  string name;
123  if (flag == nFull) name = stationName(id / 10, flag) + "_";
124  if (flag == nPath) name = stationName(id / 10, flag) + "/";
125 
126  if ((id % 10) == 0) name += "nr_tp";
127  if ((id % 10) == 1) name += "nr_bt";
128  if ((id % 10) == 2) name += "nr_hr";
129  if ((id % 10) == 3) name += "fr_hr";
130  if ((id % 10) == 4) name += "fr_tp";
131  if ((id % 10) == 5) name += "fr_bt";
132  return name;
133 }
static std::string stationName(unsigned int id, NameFlag flag=nFull)
returns official name of a station characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of arm is prefi...
static unsigned int TotemRPDetId::rpOfDet ( unsigned int  i)
inlinestatic

returns ID of RP for given detector ID ''i''

Definition at line 141 of file TotemRPDetId.h.

Referenced by TotemRPDQMSource::analyze(), TotemRPGeometry::BuildSets(), and TotemRPUVPatternFinder::produce().

141 { return i / 10; }
int i
Definition: DBlmapReader.cc:9
int TotemRPDetId::station ( ) const
inline

Definition at line 75 of file TotemRPDetId.h.

References DetId::id_, maskStation, and startStationBit.

Referenced by detectorDecId(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), and rpCopyNumber().

76  {
77  return int ((id_>>startStationBit) & maskStation);
78  }
static const unsigned int startStationBit
Definition: TotemRPDetId.h:66
uint32_t id_
Definition: DetId.h:55
static const unsigned int maskStation
Definition: TotemRPDetId.h:66
string TotemRPDetId::stationName ( unsigned int  id,
NameFlag  flag = nFull 
)
static

returns official name of a station characterized by ''id''; if ''full'' is true, name of arm is prefixed

Definition at line 106 of file TotemRPDetId.cc.

References armName(), mergeVDriftHistosByStation::name, nFull, and nPath.

Referenced by officialName(), rpName(), and TotemRPDQMSource::StationPlots::StationPlots().

107 {
108  string name;
109  if (flag == nFull) name = armName(id / 10, flag) + "_";
110  if (flag == nPath) name = armName(id / 10, flag) + "/station ";
111 
112  if ((id % 10) == 0) name += "210";
113  if ((id % 10) == 2) name += "220";
114 
115  return name;
116 }
static std::string armName(unsigned int id, NameFlag flag=nFull)
returns official name of an arm characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, prefix rp_ added ...
Definition: TotemRPDetId.cc:92
static unsigned int TotemRPDetId::stOfDet ( unsigned int  i)
inlinestatic

returns ID of station for given detector ID ''i''

Definition at line 144 of file TotemRPDetId.h.

Referenced by TotemRPGeometry::BuildSets().

144 { return i / 100; }
int i
Definition: DBlmapReader.cc:9
static unsigned int TotemRPDetId::stOfRP ( unsigned int  i)
inlinestatic

returns ID of station for given RP ID ''i''

Definition at line 150 of file TotemRPDetId.h.

150 { return i / 10; }
int i
Definition: DBlmapReader.cc:9
string TotemRPDetId::stripName ( unsigned int  id,
unsigned char  strip,
NameFlag  flag = nFull 
)
static

returns official name of a strip characterized by ''id'' (of chip) and strip number; if ''full'' is true, name of chip is prefixed

Definition at line 165 of file TotemRPDetId.cc.

References chipName(), mergeVDriftHistosByStation::name, nFull, and nPath.

Referenced by officialName().

166 {
167  string name;
168  if (flag == nFull) name = chipName(id, flag) + "_";
169  if (flag == nPath) name = chipName(id, flag) + "/strip";
170 
171  char buf[10];
172  sprintf(buf, "%u", strip);
173 
174  return name + buf;
175 }
static std::string chipName(unsigned int id, NameFlag flag=nFull)
returns official name of a chip characterized by &#39;&#39;id&#39;&#39;; if &#39;&#39;full&#39;&#39; is true, name of plane is prefix...
string TotemRPDetId::systemName ( NameFlag  flag = nFull)
static

returns the name of the RP system

Definition at line 81 of file TotemRPDetId.cc.

References mergeVDriftHistosByStation::name, nFull, and nPath.

Referenced by armName(), and officialName().

82 {
83  string name;
84  if (flag == nFull) name = "rp";
85  if (flag == nPath) name = "RP";
86 
87  return name;
88 }

Member Data Documentation

const unsigned int TotemRPDetId::maskArm = 0x1
static

Definition at line 65 of file TotemRPDetId.h.

Referenced by arm(), decToRawId(), init(), and rawToDecId().

const unsigned int TotemRPDetId::maskDet = 0xF
static

Definition at line 68 of file TotemRPDetId.h.

Referenced by decToRawId(), detector(), init(), and rawToDecId().

const unsigned int TotemRPDetId::maskRP = 0x7
static

Definition at line 67 of file TotemRPDetId.h.

Referenced by decToRawId(), init(), rawToDecId(), and romanPot().

const unsigned int TotemRPDetId::maskStation = 0x3
static

Definition at line 66 of file TotemRPDetId.h.

Referenced by decToRawId(), init(), rawToDecId(), and station().

const unsigned int TotemRPDetId::maxArm = 1
static

Definition at line 65 of file TotemRPDetId.h.

Referenced by init().

const unsigned int TotemRPDetId::maxDet = 9
static

Definition at line 68 of file TotemRPDetId.h.

Referenced by init().

const unsigned int TotemRPDetId::maxRP = 5
static

Definition at line 67 of file TotemRPDetId.h.

Referenced by init().

const unsigned int TotemRPDetId::maxStation = 2
static

Definition at line 66 of file TotemRPDetId.h.

Referenced by init().

const unsigned int TotemRPDetId::startArmBit = 24
static

Definition at line 65 of file TotemRPDetId.h.

Referenced by arm(), decToRawId(), init(), and rawToDecId().

const unsigned int TotemRPDetId::startDetBit = 15
static

Definition at line 68 of file TotemRPDetId.h.

Referenced by decToRawId(), detector(), init(), and rawToDecId().

const unsigned int TotemRPDetId::startRPBit = 19
static

Definition at line 67 of file TotemRPDetId.h.

Referenced by decToRawId(), init(), rawToDecId(), and romanPot().

const unsigned int TotemRPDetId::startStationBit = 22
static

Definition at line 66 of file TotemRPDetId.h.

Referenced by decToRawId(), init(), rawToDecId(), and station().

const unsigned int TotemRPDetId::totem_rp_subdet_id = 3
static

Definition at line 63 of file TotemRPDetId.h.

Referenced by check(), and decToRawId().