CMS 3D CMS Logo

ComponentShapeCollection.h
Go to the documentation of this file.
1 #ifndef SimCalorimetry_EcalSimAlgos_ComponentShapeCollection_h
2 #define SimCalorimetry_EcalSimAlgos_ComponentShapeCollection_h
3 
7 
9 public:
11  : m_useDBShape(useDBShape), m_thresh(0.0), espsToken_(iC.esConsumes()) {
12  fillCollection(iC);
13  }
15  ComponentShapeCollection(bool useDBShape) : m_useDBShape(useDBShape), m_thresh(0.0) { fillCollection(useDBShape); }
16 
18 
19  void setEventSetup(const edm::EventSetup& evtSetup);
20 
21  const std::shared_ptr<ComponentShape> at(int depthIndex) const;
22  static int toDepthBin(int index);
23  static int maxDepthBin();
24 
25 protected:
26  void buildMe(const edm::EventSetup* es = nullptr);
27  void fillCollection(bool useDBShape);
29 
31  double m_thresh;
32 
33 private:
34  const static int m_nDepthBins = 23; // dictated by SimG4CMS/Calo/src/ECalSD.cc, 230 mm / 10 mm
36  std::shared_ptr<ComponentShape> m_shapeArr[m_nDepthBins];
37 };
38 
39 #endif
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
ComponentShapeCollection(edm::ConsumesCollector iC)
void fillCollection(bool useDBShape)
void buildMe(const edm::EventSetup *es=nullptr)
void setEventSetup(const edm::EventSetup &evtSetup)
static int toDepthBin(int index)
ComponentShapeCollection(bool useDBShape, edm::ConsumesCollector iC)
ComponentShapeCollection(bool useDBShape)
edm::ESGetToken< EcalSimComponentShape, EcalSimComponentShapeRcd > espsToken_
const std::shared_ptr< ComponentShape > at(int depthIndex) const
std::shared_ptr< ComponentShape > m_shapeArr[m_nDepthBins]