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 {
26  public:
27 
28  typedef std::vector<double> DVec ;
29 
30  EcalShapeBase(bool) ;
31 
32  ~EcalShapeBase() override ;
33 
34  double operator() ( double aTime ) const override ;
35 
36  double timeOfThr() const ;
37  double timeOfMax() const ;
38  double timeToRise() const override ;
39 
40  double threshold() const;
41 
42  double derivative ( double time ) const ; // appears to not be used anywhere
43 
44  void m_shape_print(const char *fileName);
45  void setEventSetup(const edm::EventSetup & evtSetup);
46 
47  protected:
48 
49  unsigned int timeIndex( double aTime ) const ;
50 
51  void buildMe() ;
52 
53  virtual void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec& aVec, const edm::EventSetup* es) const = 0 ;
55 
56  private:
57 
60  unsigned int m_indexOfMax ;
61  double m_timeOfMax ;
62  double m_thresh;
63  unsigned int m_kNBinsPerNSec;
64  DVec m_shape ;
65  DVec m_deriv ;
66 
67  unsigned int m_arraySize;
68  unsigned int m_denseArraySize;
69  double m_qNSecPerBin;
71 };
72 
73 
74 
75 #endif
76 
virtual void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const =0
double derivative(double time) const
double threshold() const
Electronic response of the preamp.
Definition: CaloVShape.h:11
unsigned int m_denseArraySize
Definition: EcalShapeBase.h:68
~EcalShapeBase() override
Definition: EcalShapeBase.cc:9
std::vector< double > DVec
Definition: EcalShapeBase.h:28
unsigned int timeIndex(double aTime) const
double m_firstTimeOverThreshold
Definition: EcalShapeBase.h:59
double m_qNSecPerBin
Definition: EcalShapeBase.h:69
void m_shape_print(const char *fileName)
double operator()(double aTime) const override
unsigned int m_arraySize
Definition: EcalShapeBase.h:67
unsigned int m_indexOfMax
Definition: EcalShapeBase.h:60
double timeOfThr() const
double m_timeOfMax
Definition: EcalShapeBase.h:61
unsigned int m_firstIndexOverThreshold
Definition: EcalShapeBase.h:58
void setEventSetup(const edm::EventSetup &evtSetup)
const edm::EventSetup * m_es
Definition: EcalShapeBase.h:70
unsigned int m_kNBinsPerNSec
Definition: EcalShapeBase.h:63
double timeToRise() const override
double timeOfMax() const