1 #ifndef EcalSimAlgos_EBHitResponse_h 2 #define EcalSimAlgos_EBHitResponse_h 11 class HepRandomEngine;
20 typedef std::vector<double>
VecD ;
22 enum { kNOffsets = 2000 } ;
39 virtual void add(
const PCaloHit&
hit, CLHEP::HepRandomEngine* )
override;
41 virtual void initializeHits()
override;
43 virtual void finalizeHits()
override;
47 virtual unsigned int samplesSize()
const override;
55 virtual unsigned int samplesSizeAll()
const override;
57 virtual EcalSamples* vSamAll(
unsigned int i )
override;
59 virtual const EcalSamples* vSamAll(
unsigned int i )
const override;
61 virtual EcalSamples* vSam(
unsigned int i )
override ;
63 void putAPDSignal(
const DetId& detId,
double npe,
double time ) ;
67 const VecD&
offsets()
const {
return m_timeOffVec ; }
70 return ( pelo > enr ? pext :
71 ( pehi > enr ? nonlFunc1( enr ) :
72 pfac*atan( log10( enr - pehi + 0.00001 ) ) + poff ) ) ; }
75 const double enr ( log10(energy) ) ;
76 const double enr2 ( enr*enr ) ;
77 const double enr3 ( enr2*enr ) ;
78 return ( pcub*enr3 + pqua*enr2 + plin*enr + pcon ) ; }
83 double apdSignalAmplitude(
const PCaloHit& hit, CLHEP::HepRandomEngine* )
const ;
85 void findIntercalibConstant(
const DetId& detId,
86 double& icalconst )
const ;
98 const double pcub,
pqua, plin, pcon, pelo, pehi, pasy, pext, poff, pfac ;
static AlgebraicMatrix initialize()
std::vector< EBSamples > m_vSam
const CaloVShape * m_apdShape
Electronic response of the preamp.
std::vector< double > VecD
const APDSimParameters * m_apdPars
CaloTSamples< float, 10 > EBSamples
const VecD & offsets() const
T operator[](int i) const
const EcalIntercalibConstantsMC * m_intercal
std::vector< double > m_timeOffVec
const double nonlFunc1(double energy) const
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
const double nonlFunc(double enr) const
virtual bool keepBlank() const
std::vector< double > m_apdTimeVec
std::vector< double > m_apdNpeVec