CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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:
EBDetId 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 EBDetId
float approxEta () const
 
uint32_t denseIndex () const
 
 EBDetId ()
 
 EBDetId (uint32_t rawid)
 
 EBDetId (int crystal_ieta, int crystal_iphi)
 
 EBDetId (int index1, int index2, int mode)
 
 EBDetId (const DetId &id)
 
int hashedIndex () const
 get a compact index for arrays More...
 
int ic () const
 get ECAL/crystal number inside SM More...
 
int ieta () const
 get the crystal ieta More...
 
int ietaAbs () const
 get the absolute value of the crystal ieta More...
 
int ietaSM () const
 get the crystal ieta in the SM convention (1-85) More...
 
int im () const
 get the number of module inside the SM (1-4) More...
 
int iphi () const
 get the crystal iphi More...
 
int iphiSM () const
 get the crystal iphi (1-20) More...
 
int ism () const
 get the ECAL/SM id More...
 
int numberByEtaPhi () const
 
int numberBySM () const
 
EBDetId offsetBy (int nrStepsEta, int nrStepsPhi) const
 
EBDetIdoperator= (const DetId &id)
 
bool positiveZ () const
 
EBDetId switchZSide () const
 
EcalTrigTowerDetId tower () const
 get the HCAL/trigger iphi of this crystal More...
 
int tower_ieta () const
 get the HCAL/trigger ieta of this crystal More...
 
int tower_iphi () const
 get the HCAL/trigger iphi of this crystal More...
 
int zside () const
 get the z-side of the crystal (1/-1) More...
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr 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 EBDetId
static float approxEta (const DetId id)
 
static EBDetId detIdFromDenseIndex (uint32_t di)
 
static int distanceEta (const EBDetId &a, const EBDetId &b)
 
static int distancePhi (const EBDetId &a, const EBDetId &b)
 
static bool isNextToBoundary (EBDetId id)
 
static bool isNextToEtaBoundary (EBDetId id)
 
static bool isNextToPhiBoundary (EBDetId id)
 
static DetId offsetBy (const DetId startId, int nrStepsEta, int nrStepsPhi)
 
static EcalSubdetector subdet ()
 get the subdetector .i.e EcalBarrel (what else?) More...
 
static DetId switchZSide (const DetId startId)
 
static EBDetId unhashIndex (int hi)
 get a DetId from a compact index for arrays More...
 
static bool validDenseIndex (uint32_t din)
 
static bool validDetId (int i, int j)
 check if a valid index combination More...
 
static bool validHashIndex (int i)
 

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 EBDetId
static const float crystalUnitToEta = 0.017453292519943295
 
static const int ETAPHIMODE = 0
 
static const int kChannelsPerCard = 5
 
static const int kCrystalsInEta = 85
 
static const int kCrystalsInPhi = 20
 
static const int kCrystalsPerSM = 1700
 
static const int kModuleBoundaries [4] = {25, 45, 65, 85}
 
static const int kModulesPerSM = 4
 
static const int kTowersInPhi = 4
 
static const int MAX_C = kCrystalsPerSM
 
static const int MAX_HASH = 2 * MAX_IPHI * MAX_IETA - 1
 
static const int MAX_IETA = 85
 
static const int MAX_IPHI = 360
 
static const int MAX_SM = 36
 
static const int MIN_C = 1
 
static const int MIN_HASH = 0
 
static const int MIN_IETA = 1
 range constants More...
 
static const int MIN_IPHI = 1
 
static const int MIN_SM = 1
 
static const int SMCRYSTALMODE = 1
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 

Additional Inherited Members

- Public Types inherited from EBDetId
enum  { Subdet = EcalBarrel }
 
enum  { kSizeForDenseIndexing = MAX_HASH + 1 }
 
- Public Types inherited from DetId
enum  Detector {
  Tracker = 1, Muon = 2, Ecal = 3, Hcal = 4,
  Calo = 5, Forward = 6, VeryForward = 7, HGCalEE = 8,
  HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11
}
 
- 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 : EBDetId() {}
EBDetId()
Definition: EBDetId.h:21
HodoscopeDetId::HodoscopeDetId ( uint32_t  rawid)

Definition at line 7 of file HodoscopeDetId.cc.

7 : EBDetId(rawid) {}
EBDetId()
Definition: EBDetId.h:21
HodoscopeDetId::HodoscopeDetId ( int  iPlane,
int  iFibr 
)

Definition at line 13 of file HodoscopeDetId.cc.

References Exception, and validDetId().

13  : EBDetId(iPlane, iFibr) {
14  if (!validDetId(iPlane, iFibr)) {
15  throw cms::Exception("InvalidDetId") << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
16  }
17 }
static bool validDetId(int iPlane, int iFibr)
EBDetId()
Definition: EBDetId.h:21
HodoscopeDetId::HodoscopeDetId ( const DetId id)

Definition at line 19 of file HodoscopeDetId.cc.

References Exception, fibrId(), planeId(), and validDetId().

19  : EBDetId(gen) {
20  if (!validDetId(planeId(), fibrId())) {
21  throw cms::Exception("InvalidDetId") << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
22  }
23 }
static bool validDetId(int iPlane, int iFibr)
EBDetId()
Definition: EBDetId.h:21
int fibrId() const
int planeId() const

Member Function Documentation

int HodoscopeDetId::fibrId ( ) const

Definition at line 11 of file HodoscopeDetId.cc.

References EBDetId::iphi().

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

11 { return iphi(); }
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
int HodoscopeDetId::planeId ( ) const

Definition at line 9 of file HodoscopeDetId.cc.

References EBDetId::ieta().

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

9 { return ieta(); }
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
bool HodoscopeDetId::validDetId ( int  iPlane,
int  iFibr 
)
static

Definition at line 25 of file HodoscopeDetId.cc.

References MAX_FIBR, and MAX_PLANE.

Referenced by HodoscopeDetId().

25  {
26  return !(iPlane < MIN_PLANE || iPlane > MAX_PLANE || iFibr < MIN_FIBR || iFibr > MAX_FIBR);
27 }
static const int MAX_FIBR
static const int MAX_PLANE

Member Data Documentation

const int HodoscopeDetId::MAX_FIBR = 63
static

Definition at line 38 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MAX_PLANE = 3
static

Definition at line 36 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MIN_FIBR = 0
static

Definition at line 37 of file HodoscopeDetId.h.

const int HodoscopeDetId::MIN_PLANE = 0
static

range constants

Definition at line 35 of file HodoscopeDetId.h.