CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
EcalHodoscopeNumberingScheme Class Reference

#include <EcalHodoscopeNumberingScheme.h>

Inheritance diagram for EcalHodoscopeNumberingScheme:
EcalNumberingScheme CaloNumberingScheme

Public Member Functions

 EcalHodoscopeNumberingScheme ()
 
uint32_t getUnitID (const EcalBaseNumber &baseNumber) const override
 
 ~EcalHodoscopeNumberingScheme () override
 
- Public Member Functions inherited from EcalNumberingScheme
 EcalNumberingScheme ()
 
 ~EcalNumberingScheme () override
 
- Public Member Functions inherited from CaloNumberingScheme
 CaloNumberingScheme (int iv=0)
 Constructor with optional verbosity control. More...
 
void setVerbosity (int)
 Verbosity setting. More...
 
virtual ~CaloNumberingScheme ()
 

Additional Inherited Members

- Protected Attributes inherited from CaloNumberingScheme
int verbosity
 Verbosity field: Zero = quiet, increasing integers mean more output. More...
 

Detailed Description

Definition at line 10 of file EcalHodoscopeNumberingScheme.h.

Constructor & Destructor Documentation

EcalHodoscopeNumberingScheme::EcalHodoscopeNumberingScheme ( )

Definition at line 11 of file EcalHodoscopeNumberingScheme.cc.

12  edm::LogInfo("EcalTBGeom") << "Creating EcalHodoscopeNumberingScheme";
13 }
Log< level::Info, false > LogInfo
EcalHodoscopeNumberingScheme::~EcalHodoscopeNumberingScheme ( )
override

Definition at line 15 of file EcalHodoscopeNumberingScheme.cc.

15  {
16  edm::LogInfo("EcalTBGeom") << "Deleting EcalHodoscopeNumberingScheme";
17 }
Log< level::Info, false > LogInfo

Member Function Documentation

uint32_t EcalHodoscopeNumberingScheme::getUnitID ( const EcalBaseNumber baseNumber) const
overridevirtual

Implements EcalNumberingScheme.

Definition at line 19 of file EcalHodoscopeNumberingScheme.cc.

References EcalBaseNumber::getCopyNumber(), EcalBaseNumber::getLevelName(), EcalBaseNumber::getLevels(), testEve_cfg::level, LogDebug, and DetId::rawId().

Referenced by EcalTBHodoscopeGeometryLoaderFromDDD::getDetIdForDDDNode().

19  {
20  int level = baseNumber.getLevels();
21  uint32_t intIndex = 0;
22  if (level > 0) {
23  // depth index - plans and fibers
24  if (baseNumber.getLevelName(0) == "FIBR") {
25  uint32_t iFibr;
26 
27  if (baseNumber.getCopyNumber(0) > 32)
28  iFibr = 2 * (baseNumber.getCopyNumber(0) - 33);
29  else
30  iFibr = 2 * baseNumber.getCopyNumber(0) - 1;
31 
32  const uint32_t iPlane = baseNumber.getCopyNumber(1) - 1;
33 
34  LogDebug("EcalTBGeom") << "Fibr/plane " << iFibr << " " << iPlane;
35 
36  intIndex = HodoscopeDetId(iPlane, iFibr).rawId();
37 
38  LogDebug("EcalTBGeom") << "Index for fiber volume " << baseNumber.getLevelName(0) << " in plane "
39  << baseNumber.getLevelName(1) << " = " << intIndex;
40  }
41  }
42  return intIndex;
43 }
std::string const & getLevelName(int level) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int getCopyNumber(int level) const
tuple level
Definition: testEve_cfg.py:47
int getLevels() const
#define LogDebug(id)