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);
43  void setEventSetup(const edm::EventSetup& evtSetup);
44 
45 protected:
46  unsigned int timeIndex(double aTime) const;
47 
48  void buildMe(const edm::EventSetup* = nullptr);
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
EcalShapeBase::m_firstIndexOverThreshold
unsigned int m_firstIndexOverThreshold
Definition: EcalShapeBase.h:57
EcalShapeBase::m_deriv
DVec m_deriv
Definition: EcalShapeBase.h:64
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
EcalShapeBase::m_thresh
double m_thresh
Definition: EcalShapeBase.h:61
ESHandle.h
EcalShapeBase::derivative
double derivative(double time) const
Definition: EcalShapeBase.cc:117
EcalShapeBase::DVec
std::vector< double > DVec
Definition: EcalShapeBase.h:26
EcalSimPulseShapeRcd.h
EcalShapeBase::timeOfThr
double timeOfThr() const
Definition: EcalShapeBase.cc:21
EcalShapeBase::fillShape
virtual void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const =0
EcalShapeBase::timeOfMax
double timeOfMax() const
Definition: EcalShapeBase.cc:23
EcalShapeBase::operator()
double operator()(double aTime) const override
Definition: EcalShapeBase.cc:110
EcalShapeBase::m_arraySize
unsigned int m_arraySize
Definition: EcalShapeBase.h:66
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
EcalShapeBase::timeToRise
double timeToRise() const override
Definition: EcalShapeBase.cc:25
EcalShapeBase::m_shape
DVec m_shape
Definition: EcalShapeBase.h:63
EcalSimPulseShape.h
EcalShapeBase::m_firstTimeOverThreshold
double m_firstTimeOverThreshold
Definition: EcalShapeBase.h:58
EcalShapeBase::threshold
double threshold() const
Definition: EcalShapeBase.cc:27
EcalShapeBase
Definition: EcalShapeBase.h:24
EcalShapeBase::m_denseArraySize
unsigned int m_denseArraySize
Definition: EcalShapeBase.h:67
EcalShapeBase::timeIndex
unsigned int timeIndex(double aTime) const
Definition: EcalShapeBase.cc:99
EcalShapeBase::m_indexOfMax
unsigned int m_indexOfMax
Definition: EcalShapeBase.h:59
EcalShapeBase::m_timeOfMax
double m_timeOfMax
Definition: EcalShapeBase.h:60
EcalShapeBase::m_useDBShape
bool m_useDBShape
Definition: EcalShapeBase.h:54
edm::EventSetup
Definition: EventSetup.h:57
EcalShapeBase::m_qNSecPerBin
double m_qNSecPerBin
Definition: EcalShapeBase.h:68
CaloVShape
Electronic response of the preamp.
Definition: CaloVShape.h:11
EcalShapeBase::EcalShapeBase
EcalShapeBase(bool)
Definition: EcalShapeBase.cc:11
EcalShapeBase::~EcalShapeBase
~EcalShapeBase() override
Definition: EcalShapeBase.cc:9
CaloVShape.h
EcalShapeBase::buildMe
void buildMe(const edm::EventSetup *=nullptr)
Definition: EcalShapeBase.cc:29
EventSetup.h
ntuplemaker.time
time
Definition: ntuplemaker.py:310
EcalShapeBase::m_shape_print
void m_shape_print(const char *fileName)
Definition: EcalShapeBase.cc:122
EcalShapeBase::m_kNBinsPerNSec
unsigned int m_kNBinsPerNSec
Definition: EcalShapeBase.h:62