CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ESTBNumberingScheme Class Reference

#include <ESTBNumberingScheme.h>

Inheritance diagram for ESTBNumberingScheme:
EcalNumberingScheme CaloNumberingScheme

Public Member Functions

 ESTBNumberingScheme ()
 
uint32_t getUnitID (const EcalBaseNumber &baseNumber) const override
 
 ~ESTBNumberingScheme () 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 ()
 

Private Attributes

int iX [30]
 
int iY [30]
 

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 6 of file ESTBNumberingScheme.h.

Constructor & Destructor Documentation

◆ ESTBNumberingScheme()

ESTBNumberingScheme::ESTBNumberingScheme ( )

Definition at line 6 of file ESTBNumberingScheme.cc.

References mps_fire::i, iX, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), iY, and ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy().

7  int ix[30] = {3, 2, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4};
8  int iy[30] = {4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4};
9 
10  int i;
11  for (i = 0; i < 30; ++i) {
12  iX[i] = ix[i];
13  iY[i] = iy[i];
14  }
15 
16  edm::LogInfo("EcalGeom") << "Creating ESTBNumberingScheme";
17 }
Log< level::Info, false > LogInfo
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ ~ESTBNumberingScheme()

ESTBNumberingScheme::~ESTBNumberingScheme ( )
override

Definition at line 19 of file ESTBNumberingScheme.cc.

19 { edm::LogInfo("EcalGeom") << "Deleting ESTBNumberingScheme"; }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ getUnitID()

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

Implements EcalNumberingScheme.

Definition at line 21 of file ESTBNumberingScheme.cc.

References TauDecayModes::dec, EcalBaseNumber::getCopyNumber(), EcalBaseNumber::getLevelName(), EcalBaseNumber::getLevels(), iX, iY, nano_mu_digi_cff::layer, gammaJetAnalysis_CHSJECs_cff::level, LogDebug, DetId::rawId(), nano_mu_digi_cff::strip, x, y, and ecaldqm::zside().

21  {
22  int level = baseNumber.getLevels();
23  uint32_t intIndex = 0;
24  if (level > 0) {
25  // depth index - silicon layer 1-st or 2-nd
26  int layer = 0;
27  if (baseNumber.getLevelName(0) == "SFSX") {
28  layer = 1;
29  } else if (baseNumber.getLevelName(0) == "SFSY") {
30  layer = 2;
31  } else {
32  edm::LogWarning("EcalGeom") << "ESTBNumberingScheme: Wrong name"
33  << " of Presh. Si. Strip : " << baseNumber.getLevelName(0);
34  }
35 
36  // Z index +Z = 1 ; -Z = 2
37  int zside = baseNumber.getCopyNumber("EREG");
38  zside = 2 * (1 - zside) + 1;
39  // wafer number
40  int wafer = baseNumber.getCopyNumber(3);
41  int x = 0, y = 0;
42  // strip number inside wafer
43  int strip = baseNumber.getCopyNumber(0);
44 
45  x = iX[wafer];
46  y = iY[wafer];
47 
48  intIndex = ESDetId(strip, x, y, layer, zside).rawId();
49 
50  LogDebug("EcalGeom") << "ESTBNumberingScheme : zside " << zside << " layer " << layer << " wafer " << wafer << " X "
51  << x << " Y " << y << " strip " << strip << " UnitID 0x" << std::hex << intIndex << std::dec;
52  for (int ich = 0; ich < level; ich++) {
53  LogDebug("EcalGeom") << "Name = " << baseNumber.getLevelName(ich) << " copy = " << baseNumber.getCopyNumber(ich);
54  }
55  }
56 
57  return intIndex;
58 }
std::string const & getLevelName(int level) const
int getCopyNumber(int level) const
int zside(DetId const &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int getLevels() const
Log< level::Warning, false > LogWarning
#define LogDebug(id)

Member Data Documentation

◆ iX

int ESTBNumberingScheme::iX[30]
private

Definition at line 13 of file ESTBNumberingScheme.h.

Referenced by ESTBNumberingScheme(), and getUnitID().

◆ iY

int ESTBNumberingScheme::iY[30]
private

Definition at line 14 of file ESTBNumberingScheme.h.

Referenced by ESTBNumberingScheme(), and getUnitID().