CMS 3D CMS Logo

Public Member Functions | Static Public Attributes

EcalPnDiodeDetId Class Reference

#include <EcalPnDiodeDetId.h>

Inheritance diagram for EcalPnDiodeDetId:
DetId

List of all members.

Public Member Functions

 EcalPnDiodeDetId ()
 EcalPnDiodeDetId (uint32_t rawid)
 EcalPnDiodeDetId (const DetId &id)
 EcalPnDiodeDetId (int EcalSubDetectorId, int DCCId, int PnId)
 Constructor from signed EcalSubDetectorId, DCCId, PnId.
int hashedIndex () const
 get a compact index for arrays [TODO: NEEDS WORK]
int iDCCId () const
 get the DCCId
int iEcalSubDetectorId () const
 get EcalSubDetectorId
int iPnId () const
 get the PnId
EcalPnDiodeDetIdoperator= (const DetId &id)

Static Public Attributes

static const int MAX_DCCID = 54
static const int MAX_PNID = 15
static const int MIN_DCCID = 1
static const int MIN_PNID = 1

Detailed Description

DetId for an Calo Trigger tower Packing:

[31:28] Global det == ECAL [27:25] ECAL det == EcalLaserPnDiode [24:12] Not Used [10] SubDetectorId: EB (1) ,EE (2) [9:4] DCCId (relative to SubDetector. In barrel it is the SupermoduleId from 1-36) [3:0] PnId (In barrel from 1-10 according CMS IN-2005/021)

Id:
EcalPnDiodeDetId.h,v 1.4 2007/10/24 20:18:36 ferriff Exp

Definition at line 25 of file EcalPnDiodeDetId.h.


Constructor & Destructor Documentation

EcalPnDiodeDetId::EcalPnDiodeDetId ( )

Constructor of a null id

Definition at line 4 of file EcalPnDiodeDetId.cc.

                                   {
}
EcalPnDiodeDetId::EcalPnDiodeDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 8 of file EcalPnDiodeDetId.cc.

                                                 : DetId(rawid) {
}
EcalPnDiodeDetId::EcalPnDiodeDetId ( int  EcalSubDetectorId,
int  DCCId,
int  PnId 
)

Constructor from signed EcalSubDetectorId, DCCId, PnId.

Definition at line 11 of file EcalPnDiodeDetId.cc.

References EcalBarrel, EcalEndcap, Exception, DetId::id_, MAX_DCCID, MAX_PNID, MIN_DCCID, and MIN_PNID.

                                                                             : DetId(Ecal,EcalLaserPnDiode) {
  if ( (DCCId < MIN_DCCID) || (DCCId > MAX_DCCID) ||  
       (PnId < MIN_PNID) || (PnId > MAX_PNID) ||  
       (EcalSubDetectorId != EcalBarrel && EcalSubDetectorId != EcalEndcap))
    throw cms::Exception("InvalidDetId") << "EcalPnDiodeDetId:  Cannot create object.  Indexes out of bounds.";
  id_|= ((((EcalSubDetectorId==EcalBarrel)?(0):(1))<<11) | 
        ((DCCId&0x7F)<<4) |
        (PnId&0xF));
}
EcalPnDiodeDetId::EcalPnDiodeDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 21 of file EcalPnDiodeDetId.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 EcalPnDiodeDetId::hashedIndex ( ) const

get a compact index for arrays [TODO: NEEDS WORK]

Definition at line 36 of file EcalPnDiodeDetId.cc.

References Exception.

{
  throw cms::Exception("MethodNotImplemented");
}    
int EcalPnDiodeDetId::iDCCId ( ) const [inline]
int EcalPnDiodeDetId::iEcalSubDetectorId ( ) const [inline]

get EcalSubDetectorId

Definition at line 45 of file EcalPnDiodeDetId.h.

References EcalBarrel, EcalEndcap, and DetId::id_.

{ return (id_ & 0x800 ) ? (EcalEndcap):(EcalBarrel); }
int EcalPnDiodeDetId::iPnId ( ) const [inline]

get the PnId

Definition at line 49 of file EcalPnDiodeDetId.h.

References DetId::id_.

Referenced by EcalLaserAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), and EcalDQMBinningService::findBinsCrystal_().

{ return id_&0xF; }
EcalPnDiodeDetId & EcalPnDiodeDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 28 of file EcalPnDiodeDetId.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;
}

Member Data Documentation

const int EcalPnDiodeDetId::MAX_DCCID = 54 [static]

Definition at line 39 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MAX_PNID = 15 [static]

Definition at line 41 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MIN_DCCID = 1 [static]

Definition at line 40 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MIN_PNID = 1 [static]

Definition at line 42 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().