Creates electronics signals from hits. More...
#include <CaloHitResponse.h>
Public Types | |
enum | { BUNCHSPACE =25 } |
typedef std::map< DetId, CaloSamples > | AnalogSignalMap |
Public Member Functions | |
virtual void | add (const PCaloHit &hit) |
process a single SimHit More... | |
void | add (const CaloSamples &signal) |
add a signal, in units of pe More... | |
void | addHit (const PCaloHit *hit, CaloSamples &frame) const |
adds the amplitude for a single hit to the frame More... | |
double | analogSignalAmplitude (const PCaloHit &hit, const CaloSimParameters ¶meters) const |
CaloHitResponse (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape) | |
CaloHitResponse (const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes) | |
void | clear () |
frees up memory More... | |
CaloSamples * | findSignal (const DetId &detId) |
users can look for the signal for a given cell More... | |
virtual bool | keepBlank () const |
virtual CaloSamples | makeAnalogSignal (const PCaloHit &inputHit) const |
creates the signal corresponding to this hit More... | |
CaloSamples | makeBlankSignal (const DetId &detId) const |
creates an empty signal for this DetId More... | |
int | nSignals () const |
number of signals in the current cache More... | |
virtual void | run (MixCollection< PCaloHit > &hits) |
Complete cell digitization. More... | |
void | setBunchRange (int minBunch, int maxBunch) |
tells it which pileup bunches to do More... | |
void | setGeometry (const CaloGeometry *geometry) |
geometry needed for time-of-flight More... | |
void | setHitCorrection (const CaloVHitCorrection *hitCorrection) |
If you want to correct hits, for attenuation or delay, set this. More... | |
void | setHitFilter (const CaloVHitFilter *filter) |
if you want to reject hits, for example, from a certain subdetector, set this More... | |
void | setPECorrection (const CaloVPECorrection *peCorrection) |
if you want to correct the photoelectrons More... | |
void | setPhaseShift (const double &thePhaseShift) |
setting the phase shift for asynchronous trigger (e.g. test beams) More... | |
virtual void | setRandomEngine (CLHEP::HepRandomEngine &engine) |
double | timeOfFlight (const DetId &detId) const |
virtual | ~CaloHitResponse () |
doesn't delete the pointers passed in More... | |
Protected Attributes | |
AnalogSignalMap | theAnalogSignalMap |
const CaloGeometry * | theGeometry |
const CaloVHitCorrection * | theHitCorrection |
const CaloVHitFilter * | theHitFilter |
int | theMaxBunch |
int | theMinBunch |
const CaloVSimParameterMap * | theParameterMap |
const CaloVPECorrection * | thePECorrection |
double | thePhaseShift_ |
CLHEP::RandPoissonQ * | theRandPoisson |
const CaloVShape * | theShape |
const CaloShapes * | theShapes |
Creates electronics signals from hits.
Definition at line 31 of file CaloHitResponse.h.
typedef std::map<DetId, CaloSamples> CaloHitResponse::AnalogSignalMap |
Definition at line 34 of file CaloHitResponse.h.
anonymous enum |
Enumerator | |
---|---|
BUNCHSPACE |
Definition at line 36 of file CaloHitResponse.h.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloVShape * | shape | ||
) |
Definition at line 23 of file CaloHitResponse.cc.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloShapes * | shapes | ||
) |
Definition at line 41 of file CaloHitResponse.cc.
|
virtual |
doesn't delete the pointers passed in
Definition at line 59 of file CaloHitResponse.cc.
References theRandPoisson.
|
virtual |
process a single SimHit
Definition at line 92 of file CaloHitResponse.cc.
References CaloVHitFilter::accepts(), i, edm::detail::isnan(), keep, keepBlank(), LogDebug, makeAnalogSignal(), CaloSamples::size(), findQualityFiles::size, theHitFilter, and PCaloHit::time().
Referenced by CaloTDigitizer< Traits >::addNoiseHits(), CaloTDigitizer< Traits >::addNoiseSignals(), HcalSiPMHitResponse::run(), and run().
void CaloHitResponse::add | ( | const CaloSamples & | signal | ) |
add a signal, in units of pe
Definition at line 120 of file CaloHitResponse.cc.
References findSignal(), i, CaloSamples::id(), errorMatrix2Lands_multiChannel::id, CaloSamples::presamples(), CaloSamples::size(), and theAnalogSignalMap.
void CaloHitResponse::addHit | ( | const PCaloHit * | hit, |
CaloSamples & | frame | ||
) | const |
adds the amplitude for a single hit to the frame
double CaloHitResponse::analogSignalAmplitude | ( | const PCaloHit & | hit, |
const CaloSimParameters & | parameters | ||
) | const |
finds the amplitude contribution from this hit, applying photostatistics, if needed. Results are in photoelectrons
Definition at line 177 of file CaloHitResponse.cc.
References CaloVPECorrection::correctPE(), CaloSimParameters::doPhotostatistics(), PCaloHit::energy(), edm::hlt::Exception, edm::RandomNumberGenerator::getEngine(), PCaloHit::id(), edm::Service< T >::isAvailable(), CaloSimParameters::simHitToPhotoelectrons(), thePECorrection, and theRandPoisson.
Referenced by makeAnalogSignal(), and HcalSiPMHitResponse::makeSiPMSignal().
|
inline |
frees up memory
Definition at line 81 of file CaloHitResponse.h.
References theAnalogSignalMap.
Referenced by EcalMixingModuleValidation::computeSDBunchDigi(), and CaloTDigitizer< Traits >::run().
CaloSamples * CaloHitResponse::findSignal | ( | const DetId & | detId | ) |
users can look for the signal for a given cell
Definition at line 204 of file CaloHitResponse.cc.
References query::result, and theAnalogSignalMap.
Referenced by add(), EcalMixingModuleValidation::computeSDBunchDigi(), and CaloTDigitizer< Traits >::run().
|
inlinevirtual |
|
virtual |
creates the signal corresponding to this hit
Definition at line 139 of file CaloHitResponse.cc.
References analogSignalAmplitude(), newFWLiteAna::bin, BUNCHSPACE, CaloVHitCorrection::correct(), PCaloHit::id(), makeBlankSignal(), Parameters::parameters, query::result, CaloShapes::shape(), CaloVSimParameterMap::simParameters(), CaloSamples::size(), theHitCorrection, theParameterMap, thePhaseShift_, theShape, theShapes, PCaloHit::time(), timeOfFlight(), CaloVShape::timeToRise(), and tzero.
Referenced by add().
CaloSamples CaloHitResponse::makeBlankSignal | ( | const DetId & | detId | ) | const |
creates an empty signal for this DetId
Definition at line 217 of file CaloHitResponse.cc.
References CaloSimParameters::binOfMaximum(), Parameters::parameters, CaloSimParameters::readoutFrameSize(), query::result, CaloVSimParameterMap::simParameters(), and theParameterMap.
Referenced by makeAnalogSignal(), HcalSiPMHitResponse::makeSiPMSignal(), and CaloTDigitizer< Traits >::run().
|
inline |
number of signals in the current cache
Definition at line 97 of file CaloHitResponse.h.
References theAnalogSignalMap.
Referenced by CaloTDigitizer< Traits >::run().
|
virtual |
Complete cell digitization.
Reimplemented in HcalSiPMHitResponse.
Definition at line 77 of file CaloHitResponse.cc.
References add(), MixCollection< T >::begin(), MixCollection< T >::end(), theMaxBunch, and theMinBunch.
Referenced by EcalMixingModuleValidation::computeSDBunchDigi(), and CaloTDigitizer< Traits >::run().
void CaloHitResponse::setBunchRange | ( | int | minBunch, |
int | maxBunch | ||
) |
tells it which pileup bunches to do
Definition at line 65 of file CaloHitResponse.cc.
References theMaxBunch, and theMinBunch.
Referenced by EcalMixingModuleValidation::computeSDBunchDigi().
|
inline |
geometry needed for time-of-flight
Definition at line 49 of file CaloHitResponse.h.
References geometry, and theGeometry.
Referenced by CastorDigiProducer::checkGeometry(), EcalMixingModuleValidation::computeSDBunchDigi(), HcalTBDigiProducer::updateGeometry(), HcalDigitizer::updateGeometry(), and EcalDigiProducer::updateGeometry().
|
inline |
If you want to correct hits, for attenuation or delay, set this.
Definition at line 69 of file CaloHitResponse.h.
References theHitCorrection.
Referenced by CastorDigiProducer::CastorDigiProducer(), and HcalTBDigiProducer::HcalTBDigiProducer().
|
inline |
if you want to reject hits, for example, from a certain subdetector, set this
Definition at line 64 of file CaloHitResponse.h.
References alcazmumu_cfi::filter, and theHitFilter.
Referenced by CastorDigiProducer::CastorDigiProducer(), HcalDigitizer::HcalDigitizer(), and HcalTBDigiProducer::HcalTBDigiProducer().
|
inline |
if you want to correct the photoelectrons
Definition at line 74 of file CaloHitResponse.h.
References thePECorrection.
Referenced by HcalDigitizer::HcalDigitizer().
|
inline |
setting the phase shift for asynchronous trigger (e.g. test beams)
Definition at line 108 of file CaloHitResponse.h.
References thePhaseShift_.
Referenced by HcalTBDigiProducer::setPhaseShift().
|
virtual |
Reimplemented in HcalSiPMHitResponse.
Definition at line 71 of file CaloHitResponse.cc.
References theRandPoisson.
Referenced by HcalSiPMHitResponse::setRandomEngine(), and CaloTDigitizer< Traits >::setRandomEngine().
double CaloHitResponse::timeOfFlight | ( | const DetId & | detId | ) | const |
time-of-flight, in ns, to get to this cell returns 0 if no geometry has been set
Definition at line 225 of file CaloHitResponse.cc.
References CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), PV3DBase< T, PVType, FrameType >::mag(), DetId::rawId(), query::result, and theGeometry.
Referenced by makeAnalogSignal(), and HcalSiPMHitResponse::makeSiPMSignal().
|
protected |
Definition at line 112 of file CaloHitResponse.h.
Referenced by add(), clear(), findSignal(), and nSignals().
|
protected |
Definition at line 121 of file CaloHitResponse.h.
Referenced by setGeometry(), and timeOfFlight().
|
protected |
Definition at line 117 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), HcalSiPMHitResponse::makeSiPMSignal(), and setHitCorrection().
|
protected |
Definition at line 119 of file CaloHitResponse.h.
Referenced by add(), HcalSiPMHitResponse::run(), and setHitFilter().
|
protected |
Definition at line 126 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::run(), run(), and setBunchRange().
|
protected |
Definition at line 125 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::run(), run(), and setBunchRange().
|
protected |
Definition at line 114 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), makeBlankSignal(), and HcalSiPMHitResponse::makeSiPMSignal().
|
protected |
Definition at line 118 of file CaloHitResponse.h.
Referenced by analogSignalAmplitude(), and setPECorrection().
|
protected |
Definition at line 128 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), HcalSiPMHitResponse::makeSiPMSignal(), and setPhaseShift().
|
mutableprotected |
Definition at line 123 of file CaloHitResponse.h.
Referenced by analogSignalAmplitude(), setRandomEngine(), and ~CaloHitResponse().
|
protected |
Definition at line 116 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().
|
protected |
Definition at line 115 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), and HcalSiPMHitResponse::makeSiPMSignal().