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

Definition at line 11 of file EcalHodoscopeNumberingScheme.cc.

11  :
13 
14  edm::LogInfo("EcalTBGeom") << "Creating EcalHodoscopeNumberingScheme";
15 }
EcalHodoscopeNumberingScheme::~EcalHodoscopeNumberingScheme ( )
override

Definition at line 17 of file EcalHodoscopeNumberingScheme.cc.

17  {
18  edm::LogInfo("EcalTBGeom") << "Deleting EcalHodoscopeNumberingScheme";
19 }

Member Function Documentation

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

Implements EcalNumberingScheme.

Definition at line 22 of file EcalHodoscopeNumberingScheme.cc.

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

Referenced by EcalTBHodoscopeGeometryLoaderFromDDD::getDetIdForDDDNode().

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