8 #include "CLHEP/Random/RandPoissonQ.h"
9 #include "CLHEP/Random/RandGaussQ.h"
22 m_apdOnly ( apdOnly ) ,
23 m_apdPars ( apdPars ) ,
24 m_apdShape ( apdShape ) ,
25 m_timeOffVec ( kNOffsets, apdParameters()->timeOffset() ) ,
26 pcub ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[0] ) ,
27 pqua ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[1] ) ,
28 plin ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[2] ) ,
29 pcon ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[3] ) ,
30 pelo ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[4] ) ,
31 pehi ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[5] ) ,
32 pasy ( 0 == apdPars ? 0 : apdParameters()->nonlParms()[6] ) ,
33 pext ( 0 == apdPars ? 0 : nonlFunc1( pelo ) ) ,
34 poff ( 0 == apdPars ? 0 : nonlFunc1( pehi ) ) ,
35 pfac ( 0 == apdPars ? 0 : ( pasy - poff )*2./
M_PI )
46 const unsigned int rSize (
parameters.readoutFrameSize() ) ;
47 const unsigned int nPre (
parameters.binOfMaximum() - 1 ) ;
53 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 ;
185 m_apdNpeVec = std::vector<double>( bSize, (double)0.0 ) ;
186 m_apdTimeVec = std::vector<double>( bSize, (double)0.0 ) ;
196 for(
unsigned int i ( 0 ) ;
i != bSize ; ++
i )
216 if( 0 == hit.
depth() )
225 const unsigned int icell (
EBDetId( hit.
id() ).denseIndex() ) ;
242 m_apdNpeVec = std::vector<double>( bSize, (double)0.0 ) ;
243 m_apdTimeVec = std::vector<double>( bSize, (double)0.0 ) ;
247 hitItr != hits.
end() ; ++hitItr )
250 const int bunch ( hitItr.bunch() ) ;
257 if( 0 == hit.
depth() )
266 const unsigned int icell (
EBDetId( hit.
id() ).denseIndex() ) ;
277 for(
unsigned int i ( 0 ) ;
i != bSize ; ++
i )
double simToPEHigh() const
CLHEP::RandGaussQ * ranGauss() const
const self & getMap() const
std::vector< EBSamples > m_vSam
virtual void add(const PCaloHit &hit)
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
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
virtual void finalizeHits()
double simToPELow() const
tuple size
Write out results.
std::vector< double > m_apdTimeVec
std::vector< double > m_apdNpeVec
virtual unsigned int samplesSize() const
virtual void initializeHits()
const CaloVShape * apdShape() const