#include <HodoscopeDetId.h>
Public Member Functions | |
int | fibrId () const |
HodoscopeDetId (const DetId &id) | |
HodoscopeDetId () | |
HodoscopeDetId (uint32_t rawid) | |
HodoscopeDetId (int indexPlane, int indexFibr) | |
HodoscopeDetId & | operator= (const DetId &id) |
int | planeId () const |
EcalSubdetector | subdet () const |
get the subdetector | |
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 |
Hodoscope fiber identifier class for the ECAL TBH4 setup
Definition at line 17 of file HodoscopeDetId.h.
HodoscopeDetId::HodoscopeDetId | ( | ) |
HodoscopeDetId::HodoscopeDetId | ( | uint32_t | rawid | ) |
HodoscopeDetId::HodoscopeDetId | ( | int | indexPlane, |
int | indexFibr | ||
) |
Constructor from crystal ieta and iphi or from SM# and crystal#
Definition at line 13 of file HodoscopeDetId.cc.
References Exception, DetId::id_, MAX_FIBR, and MAX_PLANE.
: DetId(Ecal,EcalLaserPnDiode) { int iPlane = indexPlane; int iFibr = indexFibr; if (iPlane < MIN_PLANE || iPlane > MAX_PLANE || iFibr < MIN_FIBR || iFibr > MAX_FIBR) { throw cms::Exception("InvalidDetId") << "HodoscopeDetId: Cannot create object. Indexes out of bounds."; } id_ |= ((iPlane&0x3) | ((iFibr&0x3F)<<2)) ; }
HodoscopeDetId::HodoscopeDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id
Definition at line 25 of file HodoscopeDetId.cc.
References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode )) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); }
int HodoscopeDetId::fibrId | ( | ) | const [inline] |
Definition at line 36 of file HodoscopeDetId.h.
References DetId::id_.
Referenced by TBHodoActiveVolumeRawInfoProducer::produce().
{ return (id_>>2)&0x3F ; }
HodoscopeDetId & HodoscopeDetId::operator= | ( | const DetId & | id | ) |
Assignment operator from cell id
Definition at line 32 of file HodoscopeDetId.cc.
References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode )) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); return *this; }
int HodoscopeDetId::planeId | ( | ) | const [inline] |
Definition at line 34 of file HodoscopeDetId.h.
References DetId::id_.
Referenced by TBHodoActiveVolumeRawInfoProducer::produce().
{ return id_&0x3 ; }
EcalSubdetector HodoscopeDetId::subdet | ( | ) | const [inline] |
get the subdetector
Definition at line 32 of file HodoscopeDetId.h.
References DetId::subdetId().
{ return EcalSubdetector(subdetId()); }
const int HodoscopeDetId::MAX_FIBR = 63 [static] |
Definition at line 42 of file HodoscopeDetId.h.
Referenced by HodoscopeDetId().
const int HodoscopeDetId::MAX_PLANE = 3 [static] |
Definition at line 40 of file HodoscopeDetId.h.
Referenced by HodoscopeDetId().
const int HodoscopeDetId::MIN_FIBR = 0 [static] |
Definition at line 41 of file HodoscopeDetId.h.
const int HodoscopeDetId::MIN_PLANE = 0 [static] |
range constants
Definition at line 39 of file HodoscopeDetId.h.