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

Definition at line 6 of file ESTBNumberingScheme.cc.

References mps_fire::i, iX, and iY.

6  :
8 
9  int ix[30] = {3, 2, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 1,
10  1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4};
11  int iy[30] = {4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1,
12  2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4};
13 
14  int i;
15  for(i=0; i<30; ++i) {
16  iX[i] = ix[i];
17  iY[i] = iy[i];
18  }
19 
20  edm::LogInfo("EcalGeom") << "Creating ESTBNumberingScheme";
21 }
ESTBNumberingScheme::~ESTBNumberingScheme ( )
override

Definition at line 23 of file ESTBNumberingScheme.cc.

23  {
24  edm::LogInfo("EcalGeom") << "Deleting ESTBNumberingScheme";
25 }

Member Function Documentation

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

Implements EcalNumberingScheme.

Definition at line 27 of file ESTBNumberingScheme.cc.

References TauDecayModes::dec, EcalBaseNumber::getCopyNumber(), EcalBaseNumber::getLevelName(), EcalBaseNumber::getLevels(), iX, iY, hcalDigis_cfi::level, LogDebug, DetId::rawId(), digi_MixPreMix_cfi::strip, x, y, and HcalDigiParam_cfi::zside.

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

Member Data Documentation

int ESTBNumberingScheme::iX[30]
private

Definition at line 16 of file ESTBNumberingScheme.h.

Referenced by ESTBNumberingScheme(), and getUnitID().

int ESTBNumberingScheme::iY[30]
private

Definition at line 17 of file ESTBNumberingScheme.h.

Referenced by ESTBNumberingScheme(), and getUnitID().