CMS 3D CMS Logo

ComponentShape.h
Go to the documentation of this file.
1 #ifndef SimCalorimetry_EcalSimAlgos_ComponentShape_h
2 #define SimCalorimetry_EcalSimAlgos_ComponentShape_h
3 
8 
9 class ComponentShape : public EcalShapeBase {
10 public:
11  // useDB = false
12  ComponentShape(int shapeIndex) : EcalShapeBase(false), shapeIndex_(shapeIndex) { buildMe(nullptr, false); }
13  // useDB = true, buildMe is executed when setEventSetup and DB conditions are available
15  : EcalShapeBase(true), espsToken_(espsToken), shapeIndex_(shapeIndex) {}
16 
17  // override EcalShapeBase timeToRise, so that it does not align component shapes to same peaking time
18  double timeToRise() const override;
19 
20 protected:
21  void fillShape(float& time_interval,
22  double& m_thresh,
23  EcalShapeBase::DVec& aVec,
24  const edm::EventSetup* es) const override;
25 
26 private:
29  static constexpr double kTimeToRise = 16.; //used for timeToRise
30  // 16 nanoseconds ~aligns the phase II component
31  // sim to the default with the current setup
32 };
33 
34 #endif
ComponentShape(int shapeIndex, edm::ESGetToken< EcalSimComponentShape, EcalSimComponentShapeRcd > espsToken)
ComponentShape(int shapeIndex)
static constexpr double kTimeToRise
std::vector< double > DVec
Definition: EcalShapeBase.h:26
void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const override
edm::ESGetToken< EcalSimComponentShape, EcalSimComponentShapeRcd > espsToken_
double timeToRise() const override
void buildMe(const edm::EventSetup *=nullptr, bool normalize=true)