CMS 3D CMS Logo

Public Member Functions | Static Public Attributes

HodoscopeDetId Class Reference

#include <HodoscopeDetId.h>

Inheritance diagram for HodoscopeDetId:
DetId

List of all members.

Public Member Functions

int fibrId () const
 HodoscopeDetId (const DetId &id)
 HodoscopeDetId ()
 HodoscopeDetId (uint32_t rawid)
 HodoscopeDetId (int indexPlane, int indexFibr)
HodoscopeDetIdoperator= (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

Detailed Description

Hodoscope fiber identifier class for the ECAL TBH4 setup

Id:
HodoscopeDetId.h,v 1.1 2007/03/16 19:33:23 fabiocos Exp

Definition at line 17 of file HodoscopeDetId.h.


Constructor & Destructor Documentation

HodoscopeDetId::HodoscopeDetId ( )

Constructor of a null id

Definition at line 5 of file HodoscopeDetId.cc.

                               : DetId() {
}
HodoscopeDetId::HodoscopeDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 8 of file HodoscopeDetId.cc.

                                             : DetId(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();
}

Member Function Documentation

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()); }

Member Data Documentation

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.