8 #include "CLHEP/Random/RandPoissonQ.h"
9 #include "CLHEP/Random/RandGaussQ.h"
21 m_apdOnly ( apdOnly ) ,
22 m_apdPars ( apdPars ) ,
23 m_apdShape ( apdShape ) ,
24 m_timeOffVec ( kNOffsets, apdParameters()->timeOffset() ) ,
25 pcub ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[0] ) ,
26 pqua ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[1] ) ,
27 plin ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[2] ) ,
28 pcon ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[3] ) ,
29 pelo ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[4] ) ,
30 pehi ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[5] ) ,
31 pasy ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[6] ) ,
32 pext ( 0 == apdPars ? 0 : nonlFunc1( pelo ) ) ,
33 poff ( 0 == apdPars ? 0 : nonlFunc1( pehi ) ) ,
34 pfac ( 0 == apdPars ? 0 : ( pasy - poff )*2./
M_PI )
45 const unsigned int rSize (
parameters.readoutFrameSize() ) ;
46 const unsigned int nPre (
parameters.binOfMaximum() - 1 ) ;
52 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
91 const double signal ( npe*
nonlFunc( npe*energyFac ) ) ;
101 double binTime ( tzero ) ;
115 assert( 1 == hit.
depth() ||
149 double& icalconst )
const
156 "No intercal constant defined for EBHitResponse" ;
162 if( icalit != icalMap.end() )
164 thisconst = *icalit ;
165 if ( thisconst == 0. ) thisconst = 1. ;
169 edm::LogError(
"EBHitResponse") <<
"No intercalib const found for xtal "
171 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
174 icalconst = thisconst ;
187 m_apdNpeVec = std::vector<double>( bSize, (double)0.0 ) ;
188 m_apdTimeVec = std::vector<double>( bSize, (double)0.0 ) ;
192 hitItr != hits.
end() ; ++hitItr )
195 const int bunch ( hitItr.bunch() ) ;
202 if( 0 == hit.
depth() )
211 const unsigned int icell (
EBDetId( hit.
id() ).denseIndex() ) ;
222 for(
unsigned int i ( 0 ) ;
i != bSize ; ++
i )
double simToPEHigh() const
CLHEP::RandGaussQ * ranGauss() const
const self & getMap() const
std::vector< EBSamples > m_vSam
const CaloVShape * m_apdShape
void putAPDSignal(const DetId &detId, double npe, double time)
virtual void run(MixCollection< PCaloHit > &hits)
Electronic response of the preamp.
double timeOfFlight(const DetId &detId) const
const APDSimParameters * apdParameters() const
const APDSimParameters * m_apdPars
Main class for Parameters in different subdetectors.
const CaloSimParameters * params(const DetId &detId) const
virtual EcalSamples * vSamAll(unsigned int i)
static EBDetId detIdFromDenseIndex(uint32_t di)
uint32_t rawId() const
get the raw id
void findIntercalibConstant(const DetId &detId, double &icalconst) const
CaloTSamples< float, 10 > EBSamples
double phaseShift() const
void setIntercal(const EcalIntercalibConstantsMC *ical)
const CaloVHitFilter * hitFilter() const
virtual EcalSamples * operator[](unsigned int i)
const VecD & offsets() const
void blankOutUsedSamples()
double simHitToPhotoelectrons() const
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
virtual unsigned int samplesSizeAll() const
virtual bool accepts(const PCaloHit &hit) const =0
virtual void putAnalogSignal(const PCaloHit &inputHit)
const EcalIntercalibConstantsMC * m_intercal
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< double > m_timeOffVec
EBHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape, bool apdOnly, const APDSimParameters *apdPars, const CaloVShape *apdShape)
std::vector< Item >::const_iterator const_iterator
const double nonlFunc(double enr) const
CLHEP::RandPoissonQ * ranPois() const
static const double tzero[3]
EcalSamples * findSignal(const DetId &detId)
float EcalIntercalibConstantMC
virtual EcalSamples * vSam(unsigned int i)
double apdSignalAmplitude(const PCaloHit &hit) const
Detector det() const
get the detector field from this detid
double simToPELow() const
tuple size
Write out results.
std::vector< double > m_apdTimeVec
std::vector< double > m_apdNpeVec
virtual unsigned int samplesSize() const
const CaloVShape * apdShape() const