CMS 3D CMS Logo

EcalPnDiodeDetId Class Reference

DetId for an Calo Trigger tower Packing:. More...

#include <DataFormats/EcalDetId/interface/EcalPnDiodeDetId.h>

Inheritance diagram for EcalPnDiodeDetId:

DetId

List of all members.

Public Member Functions

 EcalPnDiodeDetId (const DetId &id)
 Constructor from a generic cell id.
 EcalPnDiodeDetId (int EcalSubDetectorId, int DCCId, int PnId)
 Constructor from signed EcalSubDetectorId, DCCId, PnId.
 EcalPnDiodeDetId (uint32_t rawid)
 Constructor from a raw value.
 EcalPnDiodeDetId ()
 Constructor of a null id.
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)
 Assignment from a generic cell 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.

00004                                    {
00005 }

EcalPnDiodeDetId::EcalPnDiodeDetId ( uint32_t  rawid  ) 

Constructor from a raw value.

Definition at line 8 of file EcalPnDiodeDetId.cc.

00008                                                  : DetId(rawid) {
00009 }

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.

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

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().

00021                                                    {
00022   if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) {
00023     throw cms::Exception("InvalidDetId");
00024   }
00025   id_=gen.rawId();
00026 }


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.

00037 {
00038   throw cms::Exception("MethodNotImplemented");
00039 }    

int EcalPnDiodeDetId::iDCCId (  )  const [inline]

get the DCCId

Definition at line 47 of file EcalPnDiodeDetId.h.

References DetId::id_.

Referenced by EcalDigiDisplay::readPNDigis().

00047 { return (id_>>4) & 0x7F; }

int EcalPnDiodeDetId::iEcalSubDetectorId (  )  const [inline]

get EcalSubDetectorId

Definition at line 45 of file EcalPnDiodeDetId.h.

References EcalBarrel, EcalEndcap, and DetId::id_.

00045 { return (id_ & 0x800 ) ? (EcalEndcap):(EcalBarrel); }

int EcalPnDiodeDetId::iPnId (  )  const [inline]

get the PnId

Definition at line 49 of file EcalPnDiodeDetId.h.

References DetId::id_.

00049 { 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().

00028                                                               {
00029   if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalLaserPnDiode)) {
00030     throw cms::Exception("InvalidDetId");
00031   }
00032   id_=gen.rawId();
00033   return *this;
00034 }


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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:47 2009 for CMSSW by  doxygen 1.5.4