test
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:
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
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 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 kDetOffset = 28
 
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
}
 
- 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  :
6  EBDetId()
7 {
8 }
EBDetId()
Definition: EBDetId.h:23
HodoscopeDetId::HodoscopeDetId ( uint32_t  rawid)

Definition at line 10 of file HodoscopeDetId.cc.

10  :
11  EBDetId( rawid )
12 {
13 }
EBDetId()
Definition: EBDetId.h:23
HodoscopeDetId::HodoscopeDetId ( int  iPlane,
int  iFibr 
)

Definition at line 27 of file HodoscopeDetId.cc.

References Exception, and validDetId().

29  : EBDetId( 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)
EBDetId()
Definition: EBDetId.h:23
HodoscopeDetId::HodoscopeDetId ( const DetId id)

Definition at line 38 of file HodoscopeDetId.cc.

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

38  :
39  EBDetId( gen )
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)
EBDetId()
Definition: EBDetId.h:23
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
int fibrId() const
int planeId() const

Member Function Documentation

int HodoscopeDetId::fibrId ( ) const

Definition at line 22 of file HodoscopeDetId.cc.

References EBDetId::iphi().

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

23 {
24  return iphi() ;
25 }
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
int HodoscopeDetId::planeId ( ) const

Definition at line 16 of file HodoscopeDetId.cc.

References EBDetId::ieta().

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

17 {
18  return ieta() ;
19 }
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
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().