#include <SimDataFormats/EcalTestBeam/interface/HodoscopeDetId.h>
Public Member Functions | |
int | fibrId () const |
HodoscopeDetId (const DetId &id) | |
Constructor from a generic cell id. | |
HodoscopeDetId (int indexPlane, int indexFibr) | |
Constructor from crystal ieta and iphi or from SM# and crystal#. | |
HodoscopeDetId (uint32_t rawid) | |
Constructor from a raw value. | |
HodoscopeDetId () | |
Constructor of a null id. | |
HodoscopeDetId & | operator= (const DetId &id) |
Assignment operator from cell 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 |
Definition at line 17 of file HodoscopeDetId.h.
HodoscopeDetId::HodoscopeDetId | ( | ) |
HodoscopeDetId::HodoscopeDetId | ( | uint32_t | rawid | ) |
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.
00014 : DetId(Ecal,EcalLaserPnDiode) 00015 { 00016 int iPlane = indexPlane; 00017 int iFibr = indexFibr; 00018 if (iPlane < MIN_PLANE || iPlane > MAX_PLANE || 00019 iFibr < MIN_FIBR || iFibr > MAX_FIBR) { 00020 throw cms::Exception("InvalidDetId") << "HodoscopeDetId: Cannot create object. Indexes out of bounds."; 00021 } 00022 id_|= (iPlane&0x3 | ((iFibr&0x3F)<<2)) ; 00023 }
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().
00025 { 00026 if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode )) { 00027 throw cms::Exception("InvalidDetId"); 00028 } 00029 id_=gen.rawId(); 00030 }
int HodoscopeDetId::fibrId | ( | ) | const [inline] |
Definition at line 36 of file HodoscopeDetId.h.
References DetId::id_.
Referenced by TBHodoActiveVolumeRawInfoProducer::produce().
00036 { 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().
00032 { 00033 if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode )) { 00034 throw cms::Exception("InvalidDetId"); 00035 } 00036 id_=gen.rawId(); 00037 return *this; 00038 }
int HodoscopeDetId::planeId | ( | ) | const [inline] |
Definition at line 34 of file HodoscopeDetId.h.
References DetId::id_.
Referenced by TBHodoActiveVolumeRawInfoProducer::produce().
00034 { return id_&0x3 ; }
EcalSubdetector HodoscopeDetId::subdet | ( | ) | const [inline] |
get the subdetector
Definition at line 32 of file HodoscopeDetId.h.
References DetId::subdetId().
00032 { return EcalSubdetector(subdetId()); }
const int HodoscopeDetId::MAX_FIBR = 63 [static] |
const int HodoscopeDetId::MAX_PLANE = 3 [static] |
const int HodoscopeDetId::MIN_FIBR = 0 [static] |
Definition at line 41 of file HodoscopeDetId.h.
const int HodoscopeDetId::MIN_PLANE = 0 [static] |