CMS 3D CMS Logo

EcalShapeBase.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_EcalShapeBase_h
2 #define EcalSimAlgos_EcalShapeBase_h
3 
4 #include <vector>
5 //#include<stdexcept>
7 
12 
13 #include <iostream>
14 #include <fstream>
24 class EcalShapeBase : public CaloVShape {
25 public:
26  typedef std::vector<double> DVec;
27 
28  EcalShapeBase(bool);
29 
30  ~EcalShapeBase() override;
31 
32  double operator()(double aTime) const override;
33 
34  double timeOfThr() const;
35  double timeOfMax() const;
36  double timeToRise() const override;
37 
38  double threshold() const;
39 
40  double derivative(double time) const; // appears to not be used anywhere
41 
42  void m_shape_print(const char* fileName) const;
43  void setEventSetup(const edm::EventSetup& evtSetup, bool normalize = true);
44 
45 protected:
46  unsigned int timeIndex(double aTime) const;
47 
48  void buildMe(const edm::EventSetup* = nullptr, bool normalize = true);
49 
50  virtual void fillShape(float& time_interval,
51  double& m_thresh,
52  EcalShapeBase::DVec& aVec,
53  const edm::EventSetup* es) const = 0;
55 
56 private:
59  unsigned int m_indexOfMax;
60  double m_timeOfMax;
61  double m_thresh;
62  unsigned int m_kNBinsPerNSec;
65 
66  unsigned int m_arraySize;
67  unsigned int m_denseArraySize;
68  double m_qNSecPerBin;
69 };
70 
71 #endif
double derivative(double time) const
virtual void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const =0
Electronic response of the preamp.
Definition: CaloVShape.h:11
double threshold() const
double timeToRise() const override
unsigned int m_denseArraySize
Definition: EcalShapeBase.h:67
~EcalShapeBase() override
Definition: EcalShapeBase.cc:9
std::vector< double > DVec
Definition: EcalShapeBase.h:26
double m_firstTimeOverThreshold
Definition: EcalShapeBase.h:58
double m_qNSecPerBin
Definition: EcalShapeBase.h:68
void setEventSetup(const edm::EventSetup &evtSetup, bool normalize=true)
unsigned int m_arraySize
Definition: EcalShapeBase.h:66
unsigned int m_indexOfMax
Definition: EcalShapeBase.h:59
double m_timeOfMax
Definition: EcalShapeBase.h:60
double timeOfThr() const
float normalize(float in)
Definition: MLPFModel.cc:207
unsigned int m_firstIndexOverThreshold
Definition: EcalShapeBase.h:57
void m_shape_print(const char *fileName) const
unsigned int timeIndex(double aTime) const
void buildMe(const edm::EventSetup *=nullptr, bool normalize=true)
unsigned int m_kNBinsPerNSec
Definition: EcalShapeBase.h:62
double timeOfMax() const
double operator()(double aTime) const override