1 #ifndef EcalSimAlgos_EBHitResponse_h 2 #define EcalSimAlgos_EBHitResponse_h 11 class HepRandomEngine;
18 typedef std::vector<double>
VecD;
20 enum { kNOffsets = 2000 };
38 void initializeHits()
override;
40 void finalizeHits()
override;
44 unsigned int samplesSize()
const override;
51 unsigned int samplesSizeAll()
const override;
55 const EcalSamples* vSamAll(
unsigned int i)
const override;
59 void putAPDSignal(
const DetId& detId,
double npe,
double time);
62 const VecD&
offsets()
const {
return m_timeOffVec; }
65 return (pelo > enr ? pext : (pehi > enr ? nonlFunc1(enr) : pfac * atan(log10(enr - pehi + 0.00001)) + poff));
69 const double enr(log10(energy));
70 const double enr2(enr * enr);
71 const double enr3(enr2 * enr);
72 return (pcub * enr3 + pqua * enr2 + plin * enr + pcon);
78 double apdSignalAmplitude(
const PCaloHit& hit, CLHEP::HepRandomEngine*)
const;
80 void findIntercalibConstant(
const DetId& detId,
double& icalconst)
const;
92 const double pcub,
pqua, plin, pcon, pelo, pehi, pasy, pext, poff, pfac;
static AlgebraicMatrix initialize()
CaloTSamples< float, 10 > EBSamples
std::vector< EBSamples > m_vSam
const CaloVShape * m_apdShape
Electronic response of the preamp.
std::vector< double > VecD
const APDSimParameters * m_apdPars
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