CMS 3D CMS Logo

EcalRegionCabling.h
Go to the documentation of this file.
1 #ifndef EcalRegionCabling_H
2 #define EcalRegionCabling_H
3 
6 
10 
12 
14 public:
16  const edm::ParameterSet esMap = conf.getParameter<edm::ParameterSet>("esMapping");
17  es_mapping_ = new ESElectronicsMapper(esMap);
18  }
19 
21  // this pointer is own by this object.
22  delete es_mapping_;
23  }
24  const EcalElectronicsMapping* mapping() const { return mapping_; }
25  const ESElectronicsMapper* es_mapping() const { return es_mapping_; }
26 
28  static uint32_t maxESElementIndex() {
30  }
31 
32  static uint32_t elementIndex(const int FEDindex) {
33  //do a test for the time being
34  if (FEDindex > FEDNumbering::MAXECALFEDID || FEDindex < FEDNumbering::MINECALFEDID) {
35  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
36  << " is not between: " << (int)FEDNumbering::MINECALFEDID << " and "
38  return 0;
39  }
40  uint32_t eI = FEDindex - FEDNumbering::MINECALFEDID;
41  return eI;
42  }
43 
44  static uint32_t esElementIndex(const int FEDindex) {
45  //do a test for the time being
47  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
48  << " is not between: " << (int)FEDNumbering::MINPreShowerFEDID << " and "
50  return 0;
51  }
52  uint32_t eI = FEDindex - FEDNumbering::MINPreShowerFEDID;
53  return eI;
54  }
55 
56  static int fedIndex(const uint32_t index) {
58  return fI;
59  }
60 
61  static int esFedIndex(const uint32_t index) {
63  return fI;
64  }
65 
66  uint32_t elementIndex(const double eta, const double phi) const {
67  int FEDindex = mapping()->GetFED(eta, phi);
68  return elementIndex(FEDindex);
69  }
70 
71 private:
74 };
75 
76 #endif
EcalRegionCabling::es_mapping_
const ESElectronicsMapper * es_mapping_
Definition: EcalRegionCabling.h:73
ESElectronicsMapper.h
FEDNumbering.h
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
MessageLogger.h
EcalRegionCabling
Definition: EcalRegionCabling.h:13
FEDNumbering::MINPreShowerFEDID
Definition: FEDNumbering.h:31
EcalRegionCabling::esElementIndex
static uint32_t esElementIndex(const int FEDindex)
Definition: EcalRegionCabling.h:44
EcalRegionCabling::EcalRegionCabling
EcalRegionCabling(edm::ParameterSet &conf, const EcalElectronicsMapping *m)
Definition: EcalRegionCabling.h:15
EcalRegionCabling::~EcalRegionCabling
~EcalRegionCabling()
Definition: EcalRegionCabling.h:20
EcalRegionCabling::fedIndex
static int fedIndex(const uint32_t index)
Definition: EcalRegionCabling.h:56
ESElectronicsMapper
Definition: ESElectronicsMapper.h:14
PVValHelper::eta
Definition: PVValidationHelpers.h:69
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
EcalRegionCabling::elementIndex
static uint32_t elementIndex(const int FEDindex)
Definition: EcalRegionCabling.h:32
EcalElectronicsMapping::GetFED
int GetFED(double eta, double phi) const
Definition: EcalElectronicsMapping.cc:1087
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
EcalElectronicsMapping.h
EcalRegionCabling::mapping_
const EcalElectronicsMapping * mapping_
Definition: EcalRegionCabling.h:72
createfilelist.int
int
Definition: createfilelist.py:10
FEDNumbering::MAXPreShowerFEDID
Definition: FEDNumbering.h:32
EcalRecHit.h
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalRegionCabling::mapping
const EcalElectronicsMapping * mapping() const
Definition: EcalRegionCabling.h:24
EcalRegionCabling::es_mapping
const ESElectronicsMapper * es_mapping() const
Definition: EcalRegionCabling.h:25
EcalRegionCabling::elementIndex
uint32_t elementIndex(const double eta, const double phi) const
Definition: EcalRegionCabling.h:66
EcalRegionCabling::esFedIndex
static int esFedIndex(const uint32_t index)
Definition: EcalRegionCabling.h:61
EcalRegionCabling::maxESElementIndex
static uint32_t maxESElementIndex()
Definition: EcalRegionCabling.h:28
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalRegionCabling::maxElementIndex
static uint32_t maxElementIndex()
Definition: EcalRegionCabling.h:27
ParameterSet.h
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44