CMS 3D CMS Logo

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

HcalTestNumberingScheme Class Reference

#include <HcalTestNumberingScheme.h>

Inheritance diagram for HcalTestNumberingScheme:
HcalNumberingScheme CaloNumberingScheme

List of all members.

Public Member Functions

virtual uint32_t getUnitID (const HcalNumberingFromDDD::HcalID id)
 HcalTestNumberingScheme (bool forTB)
virtual ~HcalTestNumberingScheme ()

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)

Private Member Functions

 HcalTestNumberingScheme ()

Private Attributes

bool forTBH2

Detailed Description

Definition at line 11 of file HcalTestNumberingScheme.h.


Constructor & Destructor Documentation

HcalTestNumberingScheme::HcalTestNumberingScheme ( bool  forTB)

Definition at line 11 of file HcalTestNumberingScheme.cc.

References forTBH2.

                                                           : 
  HcalNumberingScheme(), forTBH2(forTB) {
  edm::LogInfo("HcalSim") << "Creating HcalTestNumberingScheme with TB Flag "
                          << forTBH2;
}
HcalTestNumberingScheme::~HcalTestNumberingScheme ( ) [virtual]

Definition at line 17 of file HcalTestNumberingScheme.cc.

                                                  {
  edm::LogInfo("HcalSim") << "Deleting HcalTestNumberingScheme";
}
HcalTestNumberingScheme::HcalTestNumberingScheme ( ) [private]

Member Function Documentation

uint32_t HcalTestNumberingScheme::getUnitID ( const HcalNumberingFromDDD::HcalID  id) [virtual]

Reimplemented from HcalNumberingScheme.

Definition at line 21 of file HcalTestNumberingScheme.cc.

References forTBH2, HcalBarrel, getHLTprescales::index, LogDebug, packHcalIndex(), phi, and DetId::rawId().

Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and HcalTestAnalysis::qieAnalysis().

                                                {

  //pack it into an integer
  uint32_t index = 0;
  if (forTBH2) {
    // TB H2 Case
    int etaR  = id.etaR;
    int phi   = id.phis;
    HcalSubdetector subdet =  (HcalSubdetector)(id.subdet);
    if (subdet == HcalBarrel && phi > 4) { // HB2 
      if (etaR > 4 && etaR < 10)
        index = HcalDetId(subdet,id.lay,id.phis,1).rawId();
    } else { // HB1
      index = HcalDetId(subdet,etaR,id.phis,id.depth).rawId();
    }
  } else {
    // Test case
    index = HcalTestNumbering::packHcalIndex(id.subdet, id.zside, id.depth, 
                                             id.etaR, id.phis, id.lay);
  }

  LogDebug("HcalSim") << "HcalTestNumberingScheme det = " << id.subdet 
                      << " depth/lay = " << id.depth << "/" << id.lay 
                      << " zside = " << id.zside << " eta/R = " << id.etaR 
                      << " phi = " << id.phis << " packed index = 0x" 
                      << std::hex << index << std::dec;

  return index;

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

Definition at line 53 of file HcalTestNumberingScheme.cc.

Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and getUnitID().

                                                                           {

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

Member Data Documentation

Definition at line 25 of file HcalTestNumberingScheme.h.

Referenced by getUnitID(), and HcalTestNumberingScheme().