CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Static Public Attributes

HodoscopeDetId Class Reference

#include <HodoscopeDetId.h>

Inheritance diagram for HodoscopeDetId:
CaloTowerDetId DetId

List of all members.

Public Member Functions

int fibrId () const
 HodoscopeDetId (int iPlane, int iFibr)
 HodoscopeDetId (uint32_t rawid)
 HodoscopeDetId (const DetId &id)
 HodoscopeDetId ()
int planeId () const

Static Public Member Functions

static bool validDetId (int iPlane, int iFibr)

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.2 2011/06/03 19:17:00 heltsley Exp

Definition at line 21 of file HodoscopeDetId.h.


Constructor & Destructor Documentation

HodoscopeDetId::HodoscopeDetId ( )

Definition at line 5 of file HodoscopeDetId.cc.

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

Definition at line 10 of file HodoscopeDetId.cc.

                                               : 
   CaloTowerDetId( rawid ) 
{
}
HodoscopeDetId::HodoscopeDetId ( int  iPlane,
int  iFibr 
)

Definition at line 27 of file HodoscopeDetId.cc.

References Exception, and validDetId().

   : CaloTowerDetId( iPlane, iFibr )
{
   if( !validDetId( iPlane, iFibr ) )
   {
      throw cms::Exception("InvalidDetId") 
         << "HodoscopeDetId:  Cannot create object.  Indices out of bounds.";
   }
}
HodoscopeDetId::HodoscopeDetId ( const DetId id)

Definition at line 38 of file HodoscopeDetId.cc.

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

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

Member Function Documentation

int HodoscopeDetId::fibrId ( ) const

Definition at line 22 of file HodoscopeDetId.cc.

References CaloTowerDetId::iphi().

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

{ 
   return iphi() ; 
}
int HodoscopeDetId::planeId ( ) const

Definition at line 16 of file HodoscopeDetId.cc.

References CaloTowerDetId::ieta().

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

{
   return ieta() ; 
}
bool HodoscopeDetId::validDetId ( int  iPlane,
int  iFibr 
) [static]

Reimplemented from CaloTowerDetId.

Definition at line 49 of file HodoscopeDetId.cc.

References MAX_FIBR, MAX_PLANE, MIN_FIBR, and MIN_PLANE.

Referenced by HodoscopeDetId().

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

Member Data Documentation

const int HodoscopeDetId::MAX_FIBR = 63 [static]

Definition at line 41 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MAX_PLANE = 3 [static]

Definition at line 39 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MIN_FIBR = 0 [static]

Definition at line 40 of file HodoscopeDetId.h.

Referenced by validDetId().

const int HodoscopeDetId::MIN_PLANE = 0 [static]

range constants

Definition at line 38 of file HodoscopeDetId.h.

Referenced by validDetId().