CMS 3D CMS Logo

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::EcalHodoscopeNumberingScheme ( )

Definition at line 11 of file EcalHodoscopeNumberingScheme.cc.

12  edm::LogInfo("EcalTBGeom") << "Creating EcalHodoscopeNumberingScheme";
13 }

◆ ~EcalHodoscopeNumberingScheme()

EcalHodoscopeNumberingScheme::~EcalHodoscopeNumberingScheme ( )
override

Definition at line 15 of file EcalHodoscopeNumberingScheme.cc.

15  {
16  edm::LogInfo("EcalTBGeom") << "Deleting EcalHodoscopeNumberingScheme";
17 }

Member Function Documentation

◆ getUnitID()

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

Implements EcalNumberingScheme.

Definition at line 19 of file EcalHodoscopeNumberingScheme.cc.

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 }

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

Referenced by EcalTBHodoscopeGeometryLoaderFromDDD::getDetIdForDDDNode().

personalPlayback.level
level
Definition: personalPlayback.py:22
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition: EcalBaseNumber.cc:23
EcalBaseNumber::getLevelName
std::string const & getLevelName(int level) const
Definition: EcalBaseNumber.cc:34
edm::LogInfo
Definition: MessageLogger.h:254
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
EcalBaseNumber::getLevels
int getLevels() const
Definition: EcalBaseNumber.cc:21
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HodoscopeDetId
Definition: HodoscopeDetId.h:20
EcalNumberingScheme::EcalNumberingScheme
EcalNumberingScheme()
Definition: EcalNumberingScheme.cc:9