11 #include "CLHEP/Random/RandGaussQ.h"
14 : theParameterMap(parameterMap)
22 hitItr != hits.
end(); ++hitItr)
27 LogDebug(
"HcalHitCorrection") <<
"HcalHitCorrection::Hit 0x" << std::hex
30 LogDebug(
"HcalHitCorrection") <<
"HcalHitCorrection::Hit tbin" << tbin;
31 if(tbin >= 0 && tbin < 10)
42 for(std::vector<PCaloHit>::const_iterator hitItr = hits.begin();
43 hitItr != hits.end(); ++hitItr)
48 LogDebug(
"HcalHitCorrection") <<
"HcalHitCorrection::Hit 0x" << std::hex
51 LogDebug(
"HcalHitCorrection") <<
"HcalHitCorrection::Hit tbin" << tbin;
52 if(tbin >= 0 && tbin < 10)
63 for(
int i = 0;
i < 10; ++
i)
74 * parameters.photoelectronsToAnalog(detId);
75 return hit.
energy() * simHitToCharge;
97 if(tbin >= 0 && tbin < 10)
102 throw cms::Exception(
"HcalHitCorrection") <<
"Cannot find HCAL charge sum for hit " << hit;
104 totalCharge = totalChargeItr->second;
107 <<
" totalcharge " << totalCharge
109 <<
" newdelay " <<
delay;
116 double smearns = CLHEP::RandGaussQ::shoot(engine) *
rms;
118 LogDebug(
"HcalHitCorrection") <<
"TimeSmear charge " <<
charge(hit) <<
" rms " << rms <<
" delay " << delay <<
" smearns " << smearns;
130 return static_cast<int> (t / 25) + parameters.
binOfMaximum() - 1;
HcalHitCorrection(const CaloVSimParameterMap *parameterMap)
int timeBin(const PCaloHit &hit) const
which time bin the peak of the signal will fall in
Main class for Parameters in different subdetectors.
double timePhase() const
the adjustment you need to apply to get the signal where you want it
double timeSmearRMS(double ampl) const
void fillChargeSums(MixCollection< PCaloHit > &hits)
ChargeSumsByChannel theChargeSumsForTimeBin[10]
double simHitToPhotoelectrons() const
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static const int SubdetectorId
double timeOfFlight(const DetId &id) const
simple average approximation
double charge(const PCaloHit &hit) const
how much charge we expect from this hit
virtual double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const
how much delay this hit will get
Detector det() const
get the detector field from this detid
static double delay(double fC, BiasSetting bias=Medium)
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
const CaloVSimParameterMap * theParameterMap