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 Attributes
HcalCalibDetId Class Reference

#include <HcalCalibDetId.h>

Inheritance diagram for HcalCalibDetId:
HcalOtherDetId DetId

Public Types

enum  CalibDetType { CalibrationBox = 1, HOCrosstalk = 2, uMNqie = 3, CastorRadFacility = 4 }
 
- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 

Public Member Functions

CalibDetType calibFlavor () const
 get the flavor of this calibration detid More...
 
int cboxChannel () const
 get the calibration box channel (if relevant) More...
 
std::string cboxChannelString () const
 get the calibration box channel as a string (if relevant) More...
 
int channel () const
 get the channel (for uMNio/qie or similar) More...
 
int fiber () const
 get the fiber (where relevant) More...
 
 HcalCalibDetId ()
 
 HcalCalibDetId (uint32_t rawid)
 
 HcalCalibDetId (const DetId &id)
 
 HcalCalibDetId (HcalSubdetector subdet, int ieta, int iphi, int ctype)
 
 HcalCalibDetId (int ieta, int iphi)
 
 HcalCalibDetId (CalibDetType dt, int value)
 
 HcalCalibDetId (CalibDetType dt, int value1, int value2, int value3)
 
HcalSubdetector hcalSubdet () const
 get the HcalSubdetector (if relevant) More...
 
int ieta () const
 get the rbx name (if relevant) More...
 
int iphi () const
 get the low-edge iphi (if relevant) More...
 
HcalCalibDetIdoperator= (const DetId &id)
 
int rm () const
 get the rm (where relevant) More...
 
int zside () const
 get the sign of ieta (+/-1) More...
 
- Public Member Functions inherited from HcalOtherDetId
 HcalOtherDetId (const DetId &id)
 
HcalOtherDetIdoperator= (const DetId &id)
 
HcalOtherSubdetector subdet () const
 get the category 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 Attributes

static const int cbox_HF_ScintillatorPIN = 8
 
static const int cbox_HOCrosstalkPIN = 7
 
static const int cbox_LaserMegatile = 2
 
static const int cbox_MixerHigh = 0
 constants More...
 
static const int cbox_MixerLow = 1
 
static const int cbox_RadDam_Layer0_RM1 = 5
 
static const int cbox_RadDam_Layer0_RM4 = 3
 
static const int cbox_RadDam_Layer7_RM1 = 6
 
static const int cbox_RadDam_Layer7_RM4 = 4
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Additional Inherited Members

- Protected Member Functions inherited from HcalOtherDetId
 HcalOtherDetId ()
 
 HcalOtherDetId (uint32_t rawid)
 
 HcalOtherDetId (HcalOtherSubdetector subdet)
 Constructor from signed ieta, iphi plus composite type and composite data. More...
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Contents of the HcalCalibDetId : [19:17] Calibration Category (1 = CalibUnit, 2 = HX, 3=uMNio/qie, 4=CastorRad)

For CalibUnit: [16:14] Subdetector [13:11] Ieta (-2 -> 2) [10:4] Iphi ("low edge") [3:0] Calibration channel type

For HX (HOCrosstalk) channels: [11] side (true = positive) [10:7] ieta [6:0] iphi

For uMNqie channels: [7:0] channel (typically just 0 or 1, but space for more if needed)

For Castor Radiation Facility: [16:10] RM [9:5] fiber-in-rm [4:0] channel-on-fiber

Author
J. Mans - Minnesota

Definition at line 35 of file HcalCalibDetId.h.

Member Enumeration Documentation

Type identifier within calibration det ids

Enumerator
CalibrationBox 
HOCrosstalk 
uMNqie 
CastorRadFacility 

Definition at line 38 of file HcalCalibDetId.h.

Constructor & Destructor Documentation

HcalCalibDetId::HcalCalibDetId ( )

Create a null det id

Definition at line 7 of file HcalCalibDetId.cc.

7  : HcalOtherDetId() {
8 }
HcalCalibDetId::HcalCalibDetId ( uint32_t  rawid)

Create from a raw id

Definition at line 11 of file HcalCalibDetId.cc.

11  : HcalOtherDetId(rawid) {
12 }
HcalCalibDetId::HcalCalibDetId ( const DetId id)

Create from a generic cell id

Definition at line 48 of file HcalCalibDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalCalibration, HcalOther, DetId::id_, DetId::null(), DetId::rawId(), HcalOtherDetId::subdet(), and DetId::subdetId().

48  {
49  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalOther)) {
50  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalCalibDetId from " << std::hex << gen.rawId() << std::dec;
51  }
52  id_=gen.rawId();
53  if (subdet()!=HcalCalibration) {
54  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalCalibDetId from " << std::hex << gen.rawId() << std::dec;
55  }
56 }
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
HcalOtherSubdetector subdet() const
get the category
uint32_t id_
Definition: DetId.h:55
HcalCalibDetId::HcalCalibDetId ( HcalSubdetector  subdet,
int  ieta,
int  iphi,
int  ctype 
)

Construct a calibration box - channel detid

Definition at line 14 of file HcalCalibDetId.cc.

References CalibrationBox, and DetId::id_.

15 
16  id_|=(CalibrationBox<<17); // Calibration Category, bits [17:19] (= "1" for CalibrationBox)
17  id_|=(ctype&0xF); // calibration channel type, bits [0:3]
18  id_|=(((ieta+2)&0x7)<<11); // eta index, bits [11:13]
19  id_|=((subdet&0x7)<<14); // subdetector, bits [14:16]
20  if (subdet==4) id_|=((((((((iphi-1)&0x7E)+1)/18)*18)+1)&0x7F)<<4); // phi index, bits [4:10] dphi = 18 for HF, values 1,19,37,55 (lower edge)
21  //if (subdet==4) id_|=(((((((((iphi-1)>>1)<<1)+1)/18)*18)+1)&0x7F)<<4); // phi index, bits [4:10] dphi = 18 for HF, values 1,19,37,55 (lower edge)
22  //else if (subdet==1||subdet==2||subdet==3) id_|=((((((iphi+1)&0x7C)+71)%72)&0x7F)<<4); // phi index, bits [4:10] dphi=4 for HBHEHO, values 3,7,...,71, (lower edge)
23  else if (subdet==1||subdet==2) id_|=(((((((iphi+1)>>2)&0x1F)<<2)+71)%72)<<4); // phi index, bits [4:10] dphi=4 for HBHE, values 3,7,...,71, (lower edge)
24  else if (subdet==3&&ieta==0) id_|=( ((((((iphi+1)/6)*6)+71)%72)&0x7F) <<4); // phi index, bits [4:10] dphi=6 for HO0, values 5,11,...,71, (lower edge)
25  else if (subdet==3&&ieta!=0) id_|=( ((((((iphi+1)/12)*12)+71)%72)&0x7F) <<4); // phi index, bits [4:10] dphi=12 for HOP and HOM, values 11,23,,...,71, (lower edge)
26  else id_|=((iphi&0x7F)<<4); // phi index, bits [4:10], simply allow all values from 0-127, shouldn't be any
27 }
int ieta() const
get the rbx name (if relevant)
int iphi() const
get the low-edge iphi (if relevant)
HcalOtherSubdetector subdet() const
get the category
uint32_t id_
Definition: DetId.h:55
HcalCalibDetId::HcalCalibDetId ( int  ieta,
int  iphi 
)

Construct an HO Crosstalk id

Definition at line 29 of file HcalCalibDetId.cc.

References funct::abs(), HOCrosstalk, and DetId::id_.

30  id_|=(HOCrosstalk<<17); // Calibration Category, bits [17:19] (= "2" for HOX)
31  id_|=(iphi&0x7F) // phi index, bits [0:6]
32  |((abs(ieta)&0xF)<<7) // eta index, bits [7:10]
33  |(((ieta > 0)?(1):(0))<<11); // z side, bit [11]
34 }
int ieta() const
get the rbx name (if relevant)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int iphi() const
get the low-edge iphi (if relevant)
uint32_t id_
Definition: DetId.h:55
HcalCalibDetId::HcalCalibDetId ( CalibDetType  dt,
int  value 
)

Construct a uMNqie id or other id which uses a single value plus a DetType

Definition at line 36 of file HcalCalibDetId.cc.

References DetId::id_.

37  id_|=(dt<<17);
38  id_|=value&0xFF;
39 }
float dt
Definition: AMPTWrapper.h:126
uint32_t id_
Definition: DetId.h:55
HcalCalibDetId::HcalCalibDetId ( CalibDetType  dt,
int  value1,
int  value2,
int  value3 
)

Construct a Castor radiation test facility id or other id which uses three values plus a DetType

Definition at line 41 of file HcalCalibDetId.cc.

References DetId::id_.

42  id_|=(dt<<17);
43  id_|=(value1&0x3F)<<10;
44  id_|=(value2&0x1F)<<5;
45  id_|=(value3&0x1F);
46 }
float dt
Definition: AMPTWrapper.h:126
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

CalibDetType HcalCalibDetId::calibFlavor ( ) const
inline
int HcalCalibDetId::cboxChannel ( ) const

get the calibration box channel (if relevant)

Definition at line 69 of file HcalCalibDetId.cc.

References calibFlavor(), CalibrationBox, and DetId::id_.

Referenced by cboxChannelString(), HcalTopology::detId2denseIdCALIB(), HcalText2DetIdConverter::init(), and CALIBLogicalMapEntry::printLMapLine().

69  {
70  return (calibFlavor()==CalibrationBox)?(id_&0xF):(0);
71 }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55
std::string HcalCalibDetId::cboxChannelString ( ) const

get the calibration box channel as a string (if relevant)

Definition at line 89 of file HcalCalibDetId.cc.

References cbox_HF_ScintillatorPIN, cbox_HOCrosstalkPIN, cbox_LaserMegatile, cbox_MixerHigh, cbox_MixerLow, cbox_RadDam_Layer0_RM1, cbox_RadDam_Layer0_RM4, cbox_RadDam_Layer7_RM1, cbox_RadDam_Layer7_RM4, and cboxChannel().

Referenced by HcalLedAnalysis::ProcessCalibEvent().

89  {
90  switch (cboxChannel()) {
91  case(cbox_MixerHigh): return "Mixer-High";
92  case(cbox_MixerLow): return "Mixer-Low";
93  case(cbox_LaserMegatile): return "Megatile";
94  case(cbox_RadDam_Layer0_RM4): return "RadDam-L0-RM4";
95  case(cbox_RadDam_Layer7_RM4): return "RadDam-L7-RM4";
96  case(cbox_RadDam_Layer0_RM1): return "RadDam-L0-RM1";
97  case(cbox_RadDam_Layer7_RM1): return "RadDam-L7-RM1";
98  case(cbox_HOCrosstalkPIN): return "HO-Crosstalk-PIN";
99  case(cbox_HF_ScintillatorPIN): return "HF-Scint-PIN";
100  default : return "";
101  }
102 }
static const int cbox_RadDam_Layer7_RM4
static const int cbox_HF_ScintillatorPIN
static const int cbox_RadDam_Layer7_RM1
static const int cbox_LaserMegatile
int cboxChannel() const
get the calibration box channel (if relevant)
static const int cbox_RadDam_Layer0_RM1
static const int cbox_HOCrosstalkPIN
static const int cbox_MixerLow
static const int cbox_RadDam_Layer0_RM4
static const int cbox_MixerHigh
constants
int HcalCalibDetId::channel ( ) const

get the channel (for uMNio/qie or similar)

Definition at line 104 of file HcalCalibDetId.cc.

References calibFlavor(), DetId::id_, and uMNqie.

Referenced by HcalText2DetIdConverter::init().

104 { return (calibFlavor()==uMNqie)?(id_&0xFF):(id_&0x1F); }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55
int HcalCalibDetId::fiber ( ) const

get the fiber (where relevant)

Definition at line 106 of file HcalCalibDetId.cc.

References calibFlavor(), CastorRadFacility, and DetId::id_.

Referenced by HcalText2DetIdConverter::init().

106 { return (calibFlavor()==CastorRadFacility)?((id_>>5)&0x1F):(0); }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55
HcalSubdetector HcalCalibDetId::hcalSubdet ( ) const
int HcalCalibDetId::ieta ( ) const

get the rbx name (if relevant)

get the "ieta" identifier (if relevant)

Definition at line 77 of file HcalCalibDetId.cc.

References calibFlavor(), CalibrationBox, HOCrosstalk, DetId::id_, and zside().

Referenced by HcalTopology::detId2denseIdCALIB(), HcalText2DetIdConverter::init(), HOHXLogicalMapEntry::printLMapLine(), CALIBLogicalMapEntry::printLMapLine(), and HcalLedAnalysis::ProcessCalibEvent().

77  {
78  return (calibFlavor()==CalibrationBox)?(((id_>>11)&0x7)-2):((calibFlavor()==HOCrosstalk)?(((id_>>7)&0xF)*zside()):(0));
79 }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
int zside() const
get the sign of ieta (+/-1)
uint32_t id_
Definition: DetId.h:55
int HcalCalibDetId::iphi ( ) const

get the low-edge iphi (if relevant)

Definition at line 81 of file HcalCalibDetId.cc.

References calibFlavor(), CalibrationBox, HOCrosstalk, and DetId::id_.

Referenced by HcalTopology::detId2denseIdCALIB(), HcalText2DetIdConverter::init(), HOHXLogicalMapEntry::printLMapLine(), CALIBLogicalMapEntry::printLMapLine(), and HcalLedAnalysis::ProcessCalibEvent().

81  {
82  return (calibFlavor()==CalibrationBox)?((id_>>4)&0x7F):((calibFlavor()==HOCrosstalk)?(id_&0x7F):(0));
83 }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55
HcalCalibDetId & HcalCalibDetId::operator= ( const DetId id)

Definition at line 58 of file HcalCalibDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalCalibration, HcalOther, DetId::id_, DetId::null(), DetId::rawId(), HcalOtherDetId::subdet(), and DetId::subdetId().

58  {
59  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalOther)) {
60  throw cms::Exception("Invalid DetId") << "Cannot assign HcalCalibDetId from " << std::hex << gen.rawId() << std::dec;
61  }
62  id_=gen.rawId();
63  if (subdet()!=HcalCalibration) {
64  throw cms::Exception("Invalid DetId") << "Cannot assign HcalCalibDetId from " << std::hex << gen.rawId() << std::dec;
65  }
66  return *this;
67 }
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
HcalOtherSubdetector subdet() const
get the category
uint32_t id_
Definition: DetId.h:55
int HcalCalibDetId::rm ( ) const

get the rm (where relevant)

Definition at line 108 of file HcalCalibDetId.cc.

References calibFlavor(), CastorRadFacility, and DetId::id_.

Referenced by HcalText2DetIdConverter::init().

108 { return (calibFlavor()==CastorRadFacility)?((id_>>10)&0x3F):(0); }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55
int HcalCalibDetId::zside ( ) const

get the sign of ieta (+/-1)

Definition at line 85 of file HcalCalibDetId.cc.

References calibFlavor(), HOCrosstalk, and DetId::id_.

Referenced by HcalTopology::detId2denseIdCALIB(), ieta(), and HOHXLogicalMapEntry::printLMapLine().

85  {
86  return (calibFlavor()==HOCrosstalk)?(((id_>>11)&0x1)?(1):(-1)):(0);
87 }
CalibDetType calibFlavor() const
get the flavor of this calibration detid
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

const int HcalCalibDetId::cbox_HF_ScintillatorPIN = 8
static

Definition at line 92 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_HOCrosstalkPIN = 7
static

Definition at line 91 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_LaserMegatile = 2
static

Definition at line 86 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_MixerHigh = 0
static

constants

Definition at line 84 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_MixerLow = 1
static

Definition at line 85 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_RadDam_Layer0_RM1 = 5
static

Definition at line 89 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_RadDam_Layer0_RM4 = 3
static

Definition at line 87 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_RadDam_Layer7_RM1 = 6
static

Definition at line 90 of file HcalCalibDetId.h.

Referenced by cboxChannelString().

const int HcalCalibDetId::cbox_RadDam_Layer7_RM4 = 4
static

Definition at line 88 of file HcalCalibDetId.h.

Referenced by cboxChannelString().