File indexing completed on 2024-04-06 12:29:25
0001 #ifndef SimCalorimetry_EcalSimAlgos_ComponentShape_h
0002 #define SimCalorimetry_EcalSimAlgos_ComponentShape_h
0003
0004 #include "FWCore/Framework/interface/ConsumesCollector.h"
0005 #include "SimCalorimetry/EcalSimAlgos/interface/EcalShapeBase.h"
0006 #include "CondFormats/EcalObjects/interface/EcalSimComponentShape.h"
0007 #include "CondFormats/DataRecord/interface/EcalSimComponentShapeRcd.h"
0008
0009 class ComponentShape : public EcalShapeBase {
0010 public:
0011
0012 ComponentShape(int shapeIndex) : EcalShapeBase(false), shapeIndex_(shapeIndex) { buildMe(nullptr, false); }
0013
0014 ComponentShape(int shapeIndex, edm::ESGetToken<EcalSimComponentShape, EcalSimComponentShapeRcd> espsToken)
0015 : EcalShapeBase(true), espsToken_(espsToken), shapeIndex_(shapeIndex) {}
0016
0017
0018 double timeToRise() const override;
0019
0020 protected:
0021 void fillShape(float& time_interval,
0022 double& m_thresh,
0023 EcalShapeBase::DVec& aVec,
0024 const edm::EventSetup* es) const override;
0025
0026 private:
0027 edm::ESGetToken<EcalSimComponentShape, EcalSimComponentShapeRcd> espsToken_;
0028 int shapeIndex_;
0029 static constexpr double kTimeToRise = 16.;
0030
0031
0032 };
0033
0034 #endif