-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEcalShapeBase.h
More file actions
61 lines (42 loc) · 1.34 KB
/
EcalShapeBase.h
File metadata and controls
61 lines (42 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef EcalSimAlgos_EcalShapeBase_h
#define EcalSimAlgos_EcalShapeBase_h
#include<vector>
//#include<stdexcept>
//#include "SimCalorimetry/CaloSimAlgos/interface/CaloVShape.h"
#include "CaloVShape.h"
/**
\class EcalShape
\brief shaper for Ecal
*/
class EcalShapeBase : public CaloVShape
{
public:
typedef std::vector<double> DVec ;
EcalShapeBase( bool aSaveDerivative ) ;
virtual ~EcalShapeBase() ;
double operator() ( double aTime ) const ;
double timeOfThr() const ;
double timeOfMax() const ;
virtual double timeToRise() const ;
virtual double threshold() const = 0 ;
double derivative ( double time ) const ; // appears to not be used anywhere
enum { kReadoutTimeInterval = 25 , // in nsec
kNBinsPerNSec = 10 , // granularity of internal array
k1NSecBins = kReadoutTimeInterval*kNBinsPerNSec ,
k1NSecBinsTotal = 2*k1NSecBins ,
kNBinsStored = k1NSecBinsTotal*kNBinsPerNSec
} ;
static const double qNSecPerBin ;
protected:
unsigned int timeIndex( double aTime ) const ;
void buildMe() ;
virtual void fillShape( DVec& aVec ) const = 0 ;
private:
unsigned int m_firstIndexOverThreshold ;
double m_firstTimeOverThreshold ;
unsigned int m_indexOfMax ;
double m_timeOfMax ;
DVec m_shape ;
DVec* m_derivPtr ;
};
#endif