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 Member Functions | Static Public Attributes
HodoscopeDetId Class Reference

#include <HodoscopeDetId.h>

Inheritance diagram for HodoscopeDetId:
CaloTowerDetId DetId

Public Member Functions

int fibrId () const
 
 HodoscopeDetId ()
 
 HodoscopeDetId (uint32_t rawid)
 
 HodoscopeDetId (int iPlane, int iFibr)
 
 HodoscopeDetId (const DetId &id)
 
int planeId () const
 
- Public Member Functions inherited from CaloTowerDetId
 CaloTowerDetId ()
 
 CaloTowerDetId (uint32_t rawid)
 
 CaloTowerDetId (int tower_ieta, int tower_iphi)
 
 CaloTowerDetId (const DetId &id)
 
uint32_t denseIndex () const
 
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...
 
CaloTowerDetIdoperator= (const DetId &id)
 
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 Member Functions

static bool validDetId (int iPlane, int iFibr)
 
- Static Public Member Functions inherited from CaloTowerDetId
static CaloTowerDetId detIdFromDenseIndex (uint32_t din)
 
static bool validDenseIndex (uint32_t din)
 
static bool validDetId (int ie, int ip)
 

Static Public Attributes

static const int MAX_FIBR = 63
 
static const int MAX_PLANE = 3
 
static const int MIN_FIBR = 0
 
static const int MIN_PLANE = 0
 range constants More...
 
- Static Public Attributes inherited from CaloTowerDetId
static const int SubdetId = 1
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Additional Inherited Members

- Public Types inherited from CaloTowerDetId
enum  {
  kMaxIEta = 41, kMaxIPhi = 72, kBarNPhi = kMaxIPhi, kEndNPhi = kMaxIPhi/2,
  kForNPhi = kMaxIPhi/4, kBarIEta = 20, kEndIEta = 39, kForIEta = kMaxIEta,
  kBarNEta = kBarIEta, kEndNEta = kEndIEta - kBarNEta, kForNEta = kForIEta - kEndIEta, kBarNTot = kBarNPhi*kBarNEta,
  kEndNTot = kEndNPhi*kEndNEta, kForNTot = kForNPhi*kForNEta, kAllNTot = kBarNTot + kEndNTot + kForNTot, kNIndex = 2*kAllNTot
}
 
enum  { kSizeForDenseIndexing = kNIndex }
 
- 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

Hodoscope fiber identifier class for the ECAL TBH4 setup

Definition at line 20 of file HodoscopeDetId.h.

Constructor & Destructor Documentation

HodoscopeDetId::HodoscopeDetId ( )

Definition at line 5 of file HodoscopeDetId.cc.

5  :
7 {
8 }
HodoscopeDetId::HodoscopeDetId ( uint32_t  rawid)

Definition at line 10 of file HodoscopeDetId.cc.

10  :
11  CaloTowerDetId( rawid )
12 {
13 }
HodoscopeDetId::HodoscopeDetId ( int  iPlane,
int  iFibr 
)

Definition at line 27 of file HodoscopeDetId.cc.

References edm::hlt::Exception, and validDetId().

29  : CaloTowerDetId( iPlane, iFibr )
30 {
31  if( !validDetId( iPlane, iFibr ) )
32  {
33  throw cms::Exception("InvalidDetId")
34  << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
35  }
36 }
static bool validDetId(int iPlane, int iFibr)
HodoscopeDetId::HodoscopeDetId ( const DetId id)

Definition at line 38 of file HodoscopeDetId.cc.

References edm::hlt::Exception, fibrId(), planeId(), and validDetId().

38  :
40 {
41  if( !validDetId( planeId(), fibrId() ) )
42  {
43  throw cms::Exception("InvalidDetId")
44  << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
45  }
46 }
static bool validDetId(int iPlane, int iFibr)
int fibrId() const
int planeId() const

Member Function Documentation

int HodoscopeDetId::fibrId ( ) const

Definition at line 22 of file HodoscopeDetId.cc.

References CaloTowerDetId::iphi().

Referenced by HodoscopeDetId(), and TBHodoActiveVolumeRawInfoProducer::produce().

23 {
24  return iphi() ;
25 }
int iphi() const
get the tower iphi
int HodoscopeDetId::planeId ( ) const

Definition at line 16 of file HodoscopeDetId.cc.

References CaloTowerDetId::ieta().

Referenced by HodoscopeDetId(), and TBHodoActiveVolumeRawInfoProducer::produce().

17 {
18  return ieta() ;
19 }
int ieta() const
get the tower ieta
bool HodoscopeDetId::validDetId ( int  iPlane,
int  iFibr 
)
static

Definition at line 49 of file HodoscopeDetId.cc.

References MAX_FIBR, MAX_PLANE, MIN_FIBR, and MIN_PLANE.

Referenced by HodoscopeDetId().

51 {
52  return !( iPlane < MIN_PLANE ||
53  iPlane > MAX_PLANE ||
54  iFibr < MIN_FIBR ||
55  iFibr > MAX_FIBR ) ;
56 }
static const int MIN_FIBR
static const int MAX_FIBR
static const int MAX_PLANE
static const int MIN_PLANE
range constants

Member Data Documentation

const int HodoscopeDetId::MAX_FIBR = 63
static

Definition at line 40 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MAX_PLANE = 3
static

Definition at line 38 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MIN_FIBR = 0
static

Definition at line 39 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MIN_PLANE = 0
static

range constants

Definition at line 37 of file HodoscopeDetId.h.

Referenced by validDetId().