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, CLHEP::HepRandomEngine *) |
process a single SimHit More... | |
virtual 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 DetId &id, float energy, const CaloSimParameters ¶meters, CLHEP::HepRandomEngine *) const |
CaloHitResponse (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape) | |
CaloHitResponse (const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes) | |
void | clear () |
frees up memory More... | |
virtual void | finalizeHits (CLHEP::HepRandomEngine *) |
Finalize hits. More... | |
CaloSamples * | findSignal (const DetId &detId) |
users can look for the signal for a given cell More... | |
virtual void | initializeHits () |
Initialize hits. More... | |
virtual bool | keepBlank () const |
virtual CaloSamples | makeAnalogSignal (const PCaloHit &inputHit, CLHEP::HepRandomEngine *) 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 (const MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *) |
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 | setIgnoreGeantTime (bool gt) |
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... | |
void | setStorePrecise (bool sp) |
double | timeOfFlight (const DetId &detId) const |
bool | withinBunchRange (int bunchCrossing) const |
check if crossing is within bunch range: More... | |
virtual | ~CaloHitResponse () |
doesn't delete the pointers passed in More... | |
Protected Attributes | |
bool | ignoreTime |
bool | storePrecise |
AnalogSignalMap | theAnalogSignalMap |
const CaloGeometry * | theGeometry |
const CaloVHitCorrection * | theHitCorrection |
const CaloVHitFilter * | theHitFilter |
int | theMaxBunch |
int | theMinBunch |
const CaloVSimParameterMap * | theParameterMap |
const CaloVPECorrection * | thePECorrection |
double | thePhaseShift_ |
const CaloVShape * | theShape |
const CaloShapes * | theShapes |
Creates electronics signals from hits.
Definition at line 33 of file CaloHitResponse.h.
typedef std::map<DetId, CaloSamples> CaloHitResponse::AnalogSignalMap |
Definition at line 36 of file CaloHitResponse.h.
anonymous enum |
Enumerator | |
---|---|
BUNCHSPACE |
Definition at line 38 of file CaloHitResponse.h.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloVShape * | shape | ||
) |
Definition at line 21 of file CaloHitResponse.cc.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloShapes * | shapes | ||
) |
Definition at line 37 of file CaloHitResponse.cc.
|
virtual |
|
virtual |
process a single SimHit
Reimplemented in HcalSiPMHitResponse.
Definition at line 71 of file CaloHitResponse.cc.
References CaloVHitFilter::accepts(), mps_fire::i, edm::isNotFinite(), keep, keepBlank(), LogDebug, makeAnalogSignal(), CaloSamples::size(), findQualityFiles::size, theHitFilter, and PCaloHit::time().
Referenced by HcalSiPMHitResponse::add(), HcalSiPMHitResponse::finalizeHits(), counter.Counter::register(), and run().
|
virtual |
add a signal, in units of pe
Reimplemented in HcalSiPMHitResponse.
Definition at line 97 of file CaloHitResponse.cc.
References findSignal(), hcalTTPDigis_cfi::id, CaloSamples::id(), and theAnalogSignalMap.
Referenced by counter.Counter::register().
void CaloHitResponse::addHit | ( | const PCaloHit * | hit, |
CaloSamples & | frame | ||
) | const |
adds the amplitude for a single hit to the frame
double CaloHitResponse::analogSignalAmplitude | ( | const DetId & | id, |
float | energy, | ||
const CaloSimParameters & | parameters, | ||
CLHEP::HepRandomEngine * | engine | ||
) | const |
finds the amplitude contribution from this hit, applying photostatistics, if needed. Results are in photoelectrons
Definition at line 159 of file CaloHitResponse.cc.
References CaloVPECorrection::correctPE(), CaloSimParameters::doPhotostatistics(), CaloSimParameters::simHitToPhotoelectrons(), and thePECorrection.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
inline |
frees up memory
Definition at line 85 of file CaloHitResponse.h.
References metProducer_cfi::parameters.
Referenced by EcalMixingModuleValidation::computeSDBunchDigi().
|
inlinevirtual |
Finalize hits.
Reimplemented in HcalSiPMHitResponse.
Definition at line 58 of file CaloHitResponse.h.
References PVValHelper::add(), hfClusterShapes_cfi::hits, and findQualityFiles::run.
CaloSamples * CaloHitResponse::findSignal | ( | const DetId & | detId | ) |
users can look for the signal for a given cell
Definition at line 174 of file CaloHitResponse.cc.
References mps_fire::result, and theAnalogSignalMap.
Referenced by add(), and EcalMixingModuleValidation::computeSDBunchDigi().
|
inlinevirtual |
Initialize hits.
Reimplemented in HcalSiPMHitResponse.
Definition at line 55 of file CaloHitResponse.h.
|
inlinevirtual |
Definition at line 52 of file CaloHitResponse.h.
References funct::true.
Referenced by add(), and HcalSiPMHitResponse::finalizeHits().
|
virtual |
creates the signal corresponding to this hit
Definition at line 110 of file CaloHitResponse.cc.
References analogSignalAmplitude(), stringResolutionProvider_cfi::bin, BUNCHSPACE, CaloVHitCorrection::delay(), PCaloHit::energy(), PCaloHit::id(), ignoreTime, makeBlankSignal(), metProducer_cfi::parameters, CaloSamples::preciseAtMod(), CaloSamples::resetPrecise(), mps_fire::result, CaloShapes::shape(), CaloVSimParameterMap::simParameters(), CaloSamples::size(), storePrecise, theHitCorrection, theParameterMap, thePhaseShift_, theShape, theShapes, PCaloHit::time(), ntuplemaker::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 186 of file CaloHitResponse.cc.
References CaloSimParameters::binOfMaximum(), BUNCHSPACE, metProducer_cfi::parameters, CaloSimParameters::readoutFrameSize(), mps_fire::result, CaloVSimParameterMap::simParameters(), storePrecise, and theParameterMap.
Referenced by makeAnalogSignal().
|
inline |
number of signals in the current cache
Definition at line 101 of file CaloHitResponse.h.
References spr::timeOfFlight().
|
virtual |
Complete cell digitization.
Definition at line 61 of file CaloHitResponse.cc.
References add(), MixCollection< T >::begin(), MixCollection< T >::end(), and withinBunchRange().
Referenced by EcalMixingModuleValidation::computeSDBunchDigi().
void CaloHitResponse::setBunchRange | ( | int | minBunch, |
int | maxBunch | ||
) |
tells it which pileup bunches to do
Definition at line 56 of file CaloHitResponse.cc.
References DigiHGCalTB160_cff::maxBunch, DigiHGCalTB160_cff::minBunch, theMaxBunch, and theMinBunch.
Referenced by EcalMixingModuleValidation::computeSDBunchDigi().
|
inline |
geometry needed for time-of-flight
Definition at line 50 of file CaloHitResponse.h.
References geometry.
Referenced by CastorDigiProducer::checkGeometry(), EcalMixingModuleValidation::computeSDBunchDigi(), HcalTBDigiProducer::updateGeometry(), and HcalDigitizer::updateGeometry().
|
inline |
If you want to correct hits, for attenuation or delay, set this.
Definition at line 75 of file CaloHitResponse.h.
Referenced by CastorDigiProducer::CastorDigiProducer().
|
inline |
if you want to reject hits, for example, from a certain subdetector, set this
Definition at line 70 of file CaloHitResponse.h.
References ALCARECOTkAlBeamHalo_cff::filter.
Referenced by CastorDigiProducer::CastorDigiProducer(), HcalDigitizer::HcalDigitizer(), and HcalTBDigiProducer::HcalTBDigiProducer().
|
inline |
|
inline |
if you want to correct the photoelectrons
Definition at line 80 of file CaloHitResponse.h.
Referenced by HcalDigitizer::HcalDigitizer().
|
inline |
setting the phase shift for asynchronous trigger (e.g. test beams)
Definition at line 112 of file CaloHitResponse.h.
Referenced by HcalTBDigiProducer::setPhaseShift().
|
inline |
Definition at line 120 of file CaloHitResponse.h.
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 196 of file CaloHitResponse.cc.
References SoftLeptonByDistance_cfi::distance, CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), PV3DBase< T, PVType, FrameType >::mag(), DetId::rawId(), mps_fire::result, and theGeometry.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
inline |
check if crossing is within bunch range:
Definition at line 116 of file CaloHitResponse.h.
Referenced by run().
|
protected |
Definition at line 146 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
protected |
Definition at line 145 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), and makeBlankSignal().
|
protected |
Definition at line 130 of file CaloHitResponse.h.
Referenced by add(), and findSignal().
|
protected |
Definition at line 139 of file CaloHitResponse.h.
Referenced by timeOfFlight().
|
protected |
Definition at line 135 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().
|
protected |
Definition at line 137 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), and add().
|
protected |
Definition at line 142 of file CaloHitResponse.h.
Referenced by setBunchRange().
|
protected |
Definition at line 141 of file CaloHitResponse.h.
Referenced by setBunchRange().
|
protected |
Definition at line 132 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), HcalSiPMHitResponse::addPEnoise(), HcalSiPMHitResponse::getReadoutFrameSize(), makeAnalogSignal(), HcalSiPMHitResponse::makeBlankSignal(), makeBlankSignal(), and HcalSiPMHitResponse::makeSiPMSignal().
|
protected |
Definition at line 136 of file CaloHitResponse.h.
Referenced by analogSignalAmplitude().
|
protected |
Definition at line 144 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
protected |
Definition at line 134 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().
|
protected |
Definition at line 133 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().