CMS 3D CMS Logo

HcalTestNumbering Class Reference

#include <SimDataFormats/CaloTest/interface/HcalTestNumbering.h>

List of all members.

Public Member Functions

 HcalTestNumbering ()
virtual ~HcalTestNumbering ()

Static Public Member Functions

static uint32_t packHcalIndex (int det, int z, int depth, int eta, int phi, int lay)
static void unpackHcalIndex (const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)


Detailed Description

Definition at line 10 of file HcalTestNumbering.h.


Constructor & Destructor Documentation

HcalTestNumbering::HcalTestNumbering (  )  [inline]

Definition at line 13 of file HcalTestNumbering.h.

00013 {}

virtual HcalTestNumbering::~HcalTestNumbering (  )  [inline, virtual]

Definition at line 14 of file HcalTestNumbering.h.

00014 {}


Member Function Documentation

uint32_t HcalTestNumbering::packHcalIndex ( int  det,
int  z,
int  depth,
int  eta,
int  phi,
int  lay 
) [static]

Definition at line 7 of file HcalTestNumbering.cc.

Referenced by HcalTBNumberingScheme::getUnitID(), HcalTestNumberingScheme::getUnitID(), HcalTB04XtalNumberingScheme::getUnitID(), HcalTBNumberingScheme::getUnitIDs(), HcalTB04Analysis::init(), HCalSD::layerWeight(), HcalTestNumberingScheme::packHcalIndex(), and HCalSD::readWeightFromFile().

00008                                                                      {
00009 
00010   uint32_t idx=(det&15)<<28;      //bits 28-31 
00011   idx+=((depth-1)&3)<<26;         //bits 26-27  
00012   idx+=((lay-1)&31)<<21;          //bits 21-25
00013   idx+=(z&1)<<20;                 //bits 20
00014   idx+=(eta&1023)<<10;            //bits 10-19
00015   idx+=(phi&1023);                //bits  0-9
00016 
00017   return idx;
00018 
00019 }

void HcalTestNumbering::unpackHcalIndex ( const uint32_t &  idx,
int det,
int z,
int depth,
int eta,
int phi,
int lay 
) [static]

Definition at line 21 of file HcalTestNumbering.cc.

Referenced by SimG4HcalValidation::fetchHits(), HcalTB04Analysis::fillBuffer(), HcalTB04Analysis::fillEvent(), HcalTestHistoClass::fillHits(), HcalTB04Analysis::finalAnalysis(), HcalTBNumberingScheme::getUnitID(), HcalTB04Analysis::unitID(), and HcalTestNumberingScheme::unpackHcalIndex().

00023                                                   {
00024   det  = (idx>>28)&15;
00025   depth= (idx>>26)&3;  depth+=1;
00026   lay  = (idx>>21)&31; lay+=1;
00027   z    = (idx>>20)&1;
00028   eta  = (idx>>10)&1023;
00029   phi  = (idx&1023);
00030 }


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