CMS 3D CMS Logo

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 (const DetId &id)
 
 HodoscopeDetId (int iPlane, int iFibr)
 
 HodoscopeDetId (uint32_t rawid)
 
int planeId () const
 
- Public Member Functions inherited from EBDetId
float approxEta () const
 
uint32_t denseIndex () const
 
 EBDetId ()
 
 EBDetId (const DetId &id)
 
 EBDetId (int crystal_ieta, int crystal_iphi)
 
 EBDetId (int index1, int index2, int mode)
 
 EBDetId (uint32_t rawid)
 
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 (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. 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() [1/4]

HodoscopeDetId::HodoscopeDetId ( )

Definition at line 5 of file HodoscopeDetId.cc.

5 : EBDetId() {}

◆ HodoscopeDetId() [2/4]

HodoscopeDetId::HodoscopeDetId ( uint32_t  rawid)

Definition at line 7 of file HodoscopeDetId.cc.

7 : EBDetId(rawid) {}

◆ HodoscopeDetId() [3/4]

HodoscopeDetId::HodoscopeDetId ( int  iPlane,
int  iFibr 
)

Definition at line 13 of file HodoscopeDetId.cc.

13  : EBDetId(iPlane, iFibr) {
14  if (!validDetId(iPlane, iFibr)) {
15  throw cms::Exception("InvalidDetId") << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
16  }
17 }

References Exception, and validDetId().

◆ HodoscopeDetId() [4/4]

HodoscopeDetId::HodoscopeDetId ( const DetId id)

Definition at line 19 of file HodoscopeDetId.cc.

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

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

Member Function Documentation

◆ fibrId()

int HodoscopeDetId::fibrId ( ) const

Definition at line 11 of file HodoscopeDetId.cc.

11 { return iphi(); }

References EBDetId::iphi().

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

◆ planeId()

int HodoscopeDetId::planeId ( ) const

Definition at line 9 of file HodoscopeDetId.cc.

9 { return ieta(); }

References EBDetId::ieta().

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

◆ validDetId()

bool HodoscopeDetId::validDetId ( int  iPlane,
int  iFibr 
)
static

Definition at line 25 of file HodoscopeDetId.cc.

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

References MAX_FIBR, and MAX_PLANE.

Referenced by HodoscopeDetId().

Member Data Documentation

◆ MAX_FIBR

const int HodoscopeDetId::MAX_FIBR = 63
static

Definition at line 38 of file HodoscopeDetId.h.

Referenced by validDetId().

◆ MAX_PLANE

const int HodoscopeDetId::MAX_PLANE = 3
static

Definition at line 36 of file HodoscopeDetId.h.

Referenced by validDetId().

◆ MIN_FIBR

const int HodoscopeDetId::MIN_FIBR = 0
static

Definition at line 37 of file HodoscopeDetId.h.

◆ MIN_PLANE

const int HodoscopeDetId::MIN_PLANE = 0
static

range constants

Definition at line 35 of file HodoscopeDetId.h.

EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EBDetId::EBDetId
EBDetId()
Definition: EBDetId.h:21
HodoscopeDetId::MAX_FIBR
static const int MAX_FIBR
Definition: HodoscopeDetId.h:38
gen
Definition: PythiaDecays.h:13
HodoscopeDetId::MAX_PLANE
static const int MAX_PLANE
Definition: HodoscopeDetId.h:36
HodoscopeDetId::fibrId
int fibrId() const
Definition: HodoscopeDetId.cc:11
HodoscopeDetId::planeId
int planeId() const
Definition: HodoscopeDetId.cc:9
Exception
Definition: hltDiff.cc:245
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
HodoscopeDetId::validDetId
static bool validDetId(int iPlane, int iFibr)
Definition: HodoscopeDetId.cc:25