test
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 Public Attributes
HcalTrigTowerDetId Class Reference

#include <HcalTrigTowerDetId.h>

Inheritance diagram for HcalTrigTowerDetId:
DetId

Public Member Functions

int depth () const
 get the depth (zero for LHC Run 1, may be nonzero for later runs) More...
 
 HcalTrigTowerDetId ()
 
 HcalTrigTowerDetId (uint32_t rawid)
 
 HcalTrigTowerDetId (int ieta, int iphi)
 Constructor from signed ieta, iphi. More...
 
 HcalTrigTowerDetId (int ieta, int iphi, int depth)
 Constructor from signed ieta, iphi, depth. More...
 
 HcalTrigTowerDetId (int ieta, int iphi, int depth, int version)
 Constructor from signed ieta, iphi, depth, version. More...
 
 HcalTrigTowerDetId (const DetId &id)
 
int ieta () const
 get the tower ieta More...
 
int ietaAbs () const
 get the absolute value of the tower ieta More...
 
int iphi () const
 get the tower iphi More...
 
HcalTrigTowerDetIdoperator= (const DetId &id)
 
void setVersion (int version)
 
HcalSubdetector subdet () const
 get the subdetector More...
 
int version () const
 get the version code for the trigger tower More...
 
int zside () const
 get the z-side of the tower (1/-1) 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 kHcalDepthMask = 0x7
 
static const int kHcalDepthOffset = 14
 
static const int kHcalEtaMask = 0x3F
 
static const int kHcalEtaOffset = 7
 
static const int kHcalPhiMask = 0x7F
 
static const int kHcalVersMask = 0x7
 
static const int kHcalVersOffset = 17
 
static const int kHcalZsideMask = 0x2000
 
static const HcalTrigTowerDetId Undefined
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Cell id for an Calo Trigger tower

Author
J. Mans - Minnesota

Definition at line 14 of file HcalTrigTowerDetId.h.

Constructor & Destructor Documentation

HcalTrigTowerDetId::HcalTrigTowerDetId ( )

Constructor of a null id

Definition at line 7 of file HcalTrigTowerDetId.cc.

7  {
8 }
HcalTrigTowerDetId::HcalTrigTowerDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 11 of file HcalTrigTowerDetId.cc.

11  : DetId(rawid) {
12 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi 
)

Constructor from signed ieta, iphi.

Definition at line 14 of file HcalTrigTowerDetId.cc.

References DetId::id_, kHcalEtaOffset, kHcalPhiMask, and kHcalZsideMask.

17 // Default to depth = 0 & version = 0
18 }
static const int kHcalEtaOffset
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
static const int kHcalPhiMask
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi,
int  depth 
)

Constructor from signed ieta, iphi, depth.

Definition at line 20 of file HcalTrigTowerDetId.cc.

References DetId::id_, kHcalDepthMask, kHcalDepthOffset, kHcalEtaOffset, kHcalPhiMask, kHcalVersMask, kHcalVersOffset, kHcalZsideMask, and version().

21  const int ones = depth % 10;
22  const int tens = (depth - ones) / 10;
23  // version convension 0 : default for 3x2 TP; 1, 2, 3 : for future & currently version = 1 is for 1x1 TP
24  // Note that in this conversion, depth can take values from 0 to 9 for different purpose
25  // -> so depth should be = ones!
29 
30  const int version = tens;
31  if( version > 9 ){ // do NOT envision to have versions over 9...
32  edm::LogError("HcalTrigTowerDetId")<<"in its ctor using depth, version larger than 9 (too many of it!)?"<<std::endl;
33  }
34 
35  id_|=((version&kHcalVersMask)<<kHcalVersOffset);
36 }
static const int kHcalVersMask
static const int kHcalEtaOffset
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
int depth() const
get the depth (zero for LHC Run 1, may be nonzero for later runs)
static const int kHcalDepthMask
static const int kHcalPhiMask
static const int kHcalDepthOffset
static const int kHcalVersOffset
int version() const
get the version code for the trigger tower
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi,
int  depth,
int  version 
)

Constructor from signed ieta, iphi, depth, version.

Definition at line 38 of file HcalTrigTowerDetId.cc.

References DetId::id_, kHcalDepthMask, kHcalDepthOffset, kHcalEtaOffset, kHcalPhiMask, kHcalVersMask, kHcalVersOffset, and kHcalZsideMask.

43 }
static const int kHcalVersMask
static const int kHcalEtaOffset
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
int depth() const
get the depth (zero for LHC Run 1, may be nonzero for later runs)
static const int kHcalDepthMask
static const int kHcalPhiMask
static const int kHcalDepthOffset
static const int kHcalVersOffset
int version() const
get the version code for the trigger tower
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 45 of file HcalTrigTowerDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

45  {
46  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
47  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
48  }
49  id_=gen.rawId();
50 }
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

int HcalTrigTowerDetId::depth ( ) const
inline

get the depth (zero for LHC Run 1, may be nonzero for later runs)

Definition at line 57 of file HcalTrigTowerDetId.h.

References DetId::id_, kHcalDepthMask, and kHcalDepthOffset.

Referenced by hcaldqm::quantity::getValue_TTdepth(), hcaldqm::hashfunctions::hash_TChannel(), hcaldqm::hashfunctions::hash_TTdepth(), HcalText2DetIdConverter::init(), and hcaldqm::hashfunctions::name_TTdepth().

57 { return (id_>>kHcalDepthOffset)&kHcalDepthMask; }
static const int kHcalDepthMask
static const int kHcalDepthOffset
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::ieta ( ) const
inline
int HcalTrigTowerDetId::ietaAbs ( ) const
inline
int HcalTrigTowerDetId::iphi ( ) const
inline
HcalTrigTowerDetId & HcalTrigTowerDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 56 of file HcalTrigTowerDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

56  {
57  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
58  throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
59  }
60  id_=gen.rawId();
61  return *this;
62 }
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
uint32_t id_
Definition: DetId.h:55
void HcalTrigTowerDetId::setVersion ( int  version)

Definition at line 52 of file HcalTrigTowerDetId.cc.

References DetId::id_, kHcalVersMask, and kHcalVersOffset.

52  {
54 }
static const int kHcalVersMask
static const int kHcalVersOffset
int version() const
get the version code for the trigger tower
uint32_t id_
Definition: DetId.h:55
HcalSubdetector HcalTrigTowerDetId::subdet ( ) const
inline

get the subdetector

Definition at line 47 of file HcalTrigTowerDetId.h.

References DetId::subdetId().

47 { return (HcalSubdetector)(subdetId()); }
HcalSubdetector
Definition: HcalAssistant.h:31
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int HcalTrigTowerDetId::version ( ) const
inline
int HcalTrigTowerDetId::zside ( ) const
inline

get the z-side of the tower (1/-1)

Definition at line 49 of file HcalTrigTowerDetId.h.

References DetId::id_, and kHcalZsideMask.

Referenced by HcalTopology::detId2denseIdHT(), and ieta().

49 { return (id_&kHcalZsideMask)?(1):(-1); }
uint32_t id_
Definition: DetId.h:55
static const int kHcalZsideMask

Member Data Documentation

const int HcalTrigTowerDetId::kHcalDepthMask = 0x7
static

Definition at line 21 of file HcalTrigTowerDetId.h.

Referenced by depth(), and HcalTrigTowerDetId().

const int HcalTrigTowerDetId::kHcalDepthOffset = 14
static

Definition at line 20 of file HcalTrigTowerDetId.h.

Referenced by depth(), and HcalTrigTowerDetId().

const int HcalTrigTowerDetId::kHcalEtaMask = 0x3F
static

Definition at line 18 of file HcalTrigTowerDetId.h.

Referenced by ietaAbs().

const int HcalTrigTowerDetId::kHcalEtaOffset = 7
static

Definition at line 17 of file HcalTrigTowerDetId.h.

Referenced by HcalTrigTowerDetId(), and ietaAbs().

const int HcalTrigTowerDetId::kHcalPhiMask = 0x7F
static

Definition at line 16 of file HcalTrigTowerDetId.h.

Referenced by HcalTrigTowerDetId(), and iphi().

const int HcalTrigTowerDetId::kHcalVersMask = 0x7
static

Definition at line 23 of file HcalTrigTowerDetId.h.

Referenced by HcalTrigTowerDetId(), setVersion(), and version().

const int HcalTrigTowerDetId::kHcalVersOffset = 17
static

Definition at line 22 of file HcalTrigTowerDetId.h.

Referenced by HcalTrigTowerDetId(), setVersion(), and version().

const int HcalTrigTowerDetId::kHcalZsideMask = 0x2000
static

Definition at line 19 of file HcalTrigTowerDetId.h.

Referenced by HcalTrigTowerDetId(), and zside().

const HcalTrigTowerDetId HcalTrigTowerDetId::Undefined
static