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 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
}
 
- 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 6 of file HcalTrigTowerDetId.cc.

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

Constructor from a raw value

Definition at line 10 of file HcalTrigTowerDetId.cc.

10  : DetId(rawid) {
11 }
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 13 of file HcalTrigTowerDetId.cc.

References DetId::id_.

14  id_|=((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
15  (iphi&0x7F);
16 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
uint32_t id_
Definition: DetId.h:55
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi,
int  depth 
)

Constructor from signed ieta, iphi, depth.

Definition at line 18 of file HcalTrigTowerDetId.cc.

References DetId::id_.

19  id_|=((depth&0x7)<<14) |
20  ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
21  (iphi&0x7F);
22 }
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)
uint32_t id_
Definition: DetId.h:55
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 24 of file HcalTrigTowerDetId.cc.

References DetId::id_.

25  id_|=((depth&0x7)<<14) |
26  ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
27  (iphi&0x7F);
28  id_|=((version&0x7)<<17);
29 }
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)
int version() const
get the version code for the trigger tower
uint32_t id_
Definition: DetId.h:55
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 31 of file HcalTrigTowerDetId.cc.

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

31  {
32  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
33  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
34  }
35  id_=gen.rawId();
36 }
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 48 of file HcalTrigTowerDetId.h.

References DetId::id_.

48 { return (id_>>14)&0x7; }
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::ieta ( ) const
inline

get the tower ieta

Definition at line 44 of file HcalTrigTowerDetId.h.

References ietaAbs(), and zside().

Referenced by HcalTrigTowerGeometry::detIds(), CaloTPGTranscoderULUT::hcaletValue(), HcalText2DetIdConverter::init(), and HTLogicalMapEntry::printLMapLine().

44 { return zside()*ietaAbs(); }
int zside() const
get the z-side of the tower (1/-1)
int ietaAbs() const
get the absolute value of the tower ieta
int HcalTrigTowerDetId::ietaAbs ( ) const
inline

get the absolute value of the tower ieta

Definition at line 42 of file HcalTrigTowerDetId.h.

References DetId::id_.

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

42 { return (id_>>7)&0x3f; }
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::iphi ( ) const
inline
HcalTrigTowerDetId & HcalTrigTowerDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 42 of file HcalTrigTowerDetId.cc.

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

42  {
43  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
44  throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
45  }
46  id_=gen.rawId();
47  return *this;
48 }
uint32_t id_
Definition: DetId.h:55
void HcalTrigTowerDetId::setVersion ( int  version)

Definition at line 38 of file HcalTrigTowerDetId.cc.

References DetId::id_.

38  {
39  id_|=((version&0x7)<<17);
40 }
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 38 of file HcalTrigTowerDetId.h.

References DetId::subdetId().

38 { 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

get the version code for the trigger tower

Definition at line 50 of file HcalTrigTowerDetId.h.

References DetId::id_.

Referenced by validation.Sample::datasetpattern(), validation.Sample::filename(), and HcalText2DetIdConverter::init().

50 { return (id_>>17)&0x7; }
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::zside ( ) const
inline

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

Definition at line 40 of file HcalTrigTowerDetId.h.

References DetId::id_.

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

40 { return (id_&0x2000)?(1):(-1); }
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

const HcalTrigTowerDetId HcalTrigTowerDetId::Undefined
static