CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EBHitResponse.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_EBHitResponse_h
2 #define EcalSimAlgos_EBHitResponse_h
3 
7 
8 class APDSimParameters ;
9 
11 {
12  public:
13 
15 
16  typedef std::vector<double> VecD ;
17 
18  enum { kNOffsets = 2000 } ;
19 
20  EBHitResponse( const CaloVSimParameterMap* parameterMap ,
21  const CaloVShape* shape ,
22  bool apdOnly ,
23  const APDSimParameters* apdPars ,
24  const CaloVShape* apdShape ) ;
25 
26  virtual ~EBHitResponse() ;
27 
28  virtual bool keepBlank() const { return false ; }
29 
30  void setIntercal( const EcalIntercalibConstantsMC* ical ) ;
31 
32  const VecD& offsets() const { return m_timeOffVec ; }
33 
34  virtual void run( MixCollection<PCaloHit>& hits ) ;
35 
36  virtual unsigned int samplesSize() const ;
37 
38  virtual EcalSamples* operator[]( unsigned int i ) ;
39 
40  virtual const EcalSamples* operator[]( unsigned int i ) const ;
41 
42  protected:
43 
44  virtual unsigned int samplesSizeAll() const ;
45 
46  virtual EcalSamples* vSamAll( unsigned int i ) ;
47 
48  virtual const EcalSamples* vSamAll( unsigned int i ) const ;
49 
50  virtual EcalSamples* vSam( unsigned int i ) ;
51 
52  void putAPDSignal( const DetId& detId, double npe, double time ) ;
53 
54  private:
55 
56  const double nonlFunc( double enr ) const {
57  return ( pelo > enr ? pext :
58  ( pehi > enr ? nonlFunc1( enr ) :
59  pfac*atan( log10( enr - pehi + 0.00001 ) ) + poff ) ) ; }
60 
61  const double nonlFunc1( double energy ) const {
62  const double enr ( log10(energy) ) ;
63  const double enr2 ( enr*enr ) ;
64  const double enr3 ( enr2*enr ) ;
65  return ( pcub*enr3 + pqua*enr2 + plin*enr + pcon ) ; }
66 
67  const APDSimParameters* apdParameters() const ;
68  const CaloVShape* apdShape() const ;
69 
70  double apdSignalAmplitude( const PCaloHit& hit ) const ;
71 
72  void findIntercalibConstant( const DetId& detId,
73  double& icalconst ) const ;
74 
75  const bool m_apdOnly ;
79 
80  std::vector<double> m_timeOffVec ;
81 
82  std::vector<double> m_apdNpeVec ;
83  std::vector<double> m_apdTimeVec ;
84 
85  const double pcub, pqua, plin, pcon, pelo, pehi, pasy, pext, poff, pfac ;
86 
87  std::vector<EBSamples> m_vSam ;
88 };
89 #endif
90 
91 
int i
Definition: DBlmapReader.cc:9
const double pfac
Definition: EBHitResponse.h:85
const CaloVShape * shape() const
std::vector< EBSamples > m_vSam
Definition: EBHitResponse.h:87
const CaloVShape * m_apdShape
Definition: EBHitResponse.h:77
void putAPDSignal(const DetId &detId, double npe, double time)
virtual void run(MixCollection< PCaloHit > &hits)
Electronic response of the preamp.
Definition: CaloVShape.h:11
std::vector< double > VecD
Definition: EBHitResponse.h:16
const APDSimParameters * apdParameters() const
const APDSimParameters * m_apdPars
Definition: EBHitResponse.h:76
virtual EcalSamples * vSamAll(unsigned int i)
void findIntercalibConstant(const DetId &detId, double &icalconst) const
CaloTSamples< float, 10 > EBSamples
Definition: EBHitResponse.h:14
void setIntercal(const EcalIntercalibConstantsMC *ical)
virtual EcalSamples * operator[](unsigned int i)
const VecD & offsets() const
Definition: EBHitResponse.h:32
const double pelo
Definition: EBHitResponse.h:85
const double plin
Definition: EBHitResponse.h:85
virtual unsigned int samplesSizeAll() const
const EcalIntercalibConstantsMC * m_intercal
Definition: EBHitResponse.h:78
std::vector< double > m_timeOffVec
Definition: EBHitResponse.h:80
const double nonlFunc1(double energy) const
Definition: EBHitResponse.h:61
const double pasy
Definition: EBHitResponse.h:85
CaloTSamplesBase< float > EcalSamples
EBHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape, bool apdOnly, const APDSimParameters *apdPars, const CaloVShape *apdShape)
Definition: DetId.h:20
virtual ~EBHitResponse()
const double pehi
Definition: EBHitResponse.h:85
const double poff
Definition: EBHitResponse.h:85
const double pcub
Definition: EBHitResponse.h:85
const double nonlFunc(double enr) const
Definition: EBHitResponse.h:56
const double pcon
Definition: EBHitResponse.h:85
virtual EcalSamples * vSam(unsigned int i)
virtual bool keepBlank() const
Definition: EBHitResponse.h:28
double apdSignalAmplitude(const PCaloHit &hit) const
const bool m_apdOnly
Definition: EBHitResponse.h:75
std::vector< double > m_apdTimeVec
Definition: EBHitResponse.h:83
std::vector< double > m_apdNpeVec
Definition: EBHitResponse.h:82
const double pext
Definition: EBHitResponse.h:85
const double pqua
Definition: EBHitResponse.h:85
virtual unsigned int samplesSize() const
const CaloVShape * apdShape() const