CMS 3D CMS Logo

Public Member Functions

CaloGenericDetId Class Reference

#include <CaloGenericDetId.h>

Inheritance diagram for CaloGenericDetId:
DetId

List of all members.

Public Member Functions

 CaloGenericDetId (uint32_t rawid)
 CaloGenericDetId (const DetId &id)
 CaloGenericDetId (DetId::Detector iDet, int iSub, uint32_t iDenseIndex)
uint32_t denseIndex () const
bool isCalo () const
bool isCaloTower () const
bool isCastor () const
bool isEB () const
bool isEcal () const
bool isEE () const
bool isES () const
bool isHB () const
bool isHcal () const
bool isHE () const
bool isHF () const
bool isHO () const
bool isZDC () const
uint32_t sizeForDenseIndexing () const
bool validDetId () const

Detailed Description

Definition at line 13 of file CaloGenericDetId.h.


Constructor & Destructor Documentation

CaloGenericDetId::CaloGenericDetId ( uint32_t  rawid) [inline]

Definition at line 17 of file CaloGenericDetId.h.

: DetId( rawid ) {}
CaloGenericDetId::CaloGenericDetId ( const DetId id) [inline]

Definition at line 19 of file CaloGenericDetId.h.

: DetId ( id ) {}
CaloGenericDetId::CaloGenericDetId ( DetId::Detector  iDet,
int  iSub,
uint32_t  iDenseIndex 
)

Member Function Documentation

uint32_t CaloGenericDetId::denseIndex ( ) const
bool CaloGenericDetId::isCalo ( ) const [inline]

Definition at line 40 of file CaloGenericDetId.h.

References DetId::Calo, and DetId::det().

Referenced by isCaloTower(), isCastor(), and isZDC().

{ return det() == DetId::Calo ; }
bool CaloGenericDetId::isCaloTower ( ) const [inline]
bool CaloGenericDetId::isCastor ( ) const [inline]
bool CaloGenericDetId::isEB ( ) const [inline]
bool CaloGenericDetId::isEcal ( ) const [inline]

Definition at line 31 of file CaloGenericDetId.h.

References DetId::det(), and DetId::Ecal.

Referenced by isEB(), isEE(), and isES().

{ return det() == DetId::Ecal ; }
bool CaloGenericDetId::isEE ( ) const [inline]
bool CaloGenericDetId::isES ( ) const [inline]
bool CaloGenericDetId::isHB ( ) const [inline]
bool CaloGenericDetId::isHcal ( ) const [inline]
bool CaloGenericDetId::isHE ( ) const [inline]
bool CaloGenericDetId::isHF ( ) const [inline]
bool CaloGenericDetId::isHO ( ) const [inline]
bool CaloGenericDetId::isZDC ( ) const [inline]
uint32_t CaloGenericDetId::sizeForDenseIndexing ( ) const
bool CaloGenericDetId::validDetId ( ) const

Definition at line 42 of file CaloGenericDetId.cc.

References HcalZDCDetId::channel(), HcalDetId::depth(), EBDetId::ieta(), CaloTowerDetId::ieta(), HcalDetId::ieta(), HcalDetId::iphi(), EBDetId::iphi(), CaloTowerDetId::iphi(), isCaloTower(), isCastor(), isEB(), isEE(), isES(), isHcal(), isZDC(), EEDetId::ix(), EEDetId::iy(), HcalCastorDetId::module(), ESDetId::plane(), DetId::rawId(), HcalCastorDetId::section(), HcalZDCDetId::section(), HcalCastorDetId::sector(), ESDetId::six(), ESDetId::siy(), ESDetId::strip(), HcalDetId::subdet(), ESDetId::zside(), HcalCastorDetId::zside(), and EEDetId::zside().

{
   bool returnValue ( false ) ;
   if( isEB() )
   {
      const EBDetId ebid ( rawId() ) ;
      returnValue = EBDetId::validDetId( ebid.ieta(),
                                         ebid.iphi() ) ;
   }
   else
   {
      if( isEE() )
      {
         const EEDetId eeid ( rawId() ) ;
         returnValue = EEDetId::validDetId( eeid.ix(), 
                                            eeid.iy(),
                                            eeid.zside() ) ;
      }
      else
      {
         if( isES() )
         {
            const ESDetId esid ( rawId() ) ;
            returnValue = ESDetId::validDetId( esid.strip(),
                                               esid.six(),
                                               esid.siy(), 
                                               esid.plane(),
                                               esid.zside() ) ;
         }
         else
         {
            if( isHcal() )
            {
               const HcalDetId hcid ( rawId() ) ;
               returnValue = HcalDetId::validDetId( hcid.subdet(),
                                                    hcid.ieta()  ,
                                                    hcid.iphi()  ,
                                                    hcid.depth()   ) ;
            }
            else
            {
               if( isZDC() )
               {
                  const HcalZDCDetId zdid ( rawId() ) ;
                  returnValue = HcalZDCDetId::validDetId( zdid.section(),
                                                          zdid.channel()    ) ;
               }
               else
               {
                  if( isCastor() )
                  {
                     const HcalCastorDetId zdid ( rawId() ) ;
                     returnValue = HcalCastorDetId::validDetId( zdid.section(),
                                                                zdid.zside()>0,
                                                                zdid.sector(),
                                                                zdid.module() ) ;
                  }
                  else
                  {
                     if( isCaloTower() )
                     {
                        const CaloTowerDetId ctid ( rawId() ) ;
                        returnValue = CaloTowerDetId::validDetId( ctid.ieta(),
                                                                  ctid.iphi() ) ;
                     }
                  }
               }
            }
         }
      }
   }
   return returnValue ;
}