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, bool PreMix1=false, bool HighFidelity=false) | |
CaloHitResponse (const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes, bool PreMix1=false, bool HighFidelity=false) | |
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... | |
int | getReadoutFrameSize (const DetId &id) const |
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) |
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... | |
Static Public Attributes | |
static constexpr double | dt = 0.5 |
static constexpr int | invdt = 2 |
Protected Attributes | |
bool | highFidelityPreMix |
bool | ignoreTime |
bool | preMixDigis |
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 35 of file CaloHitResponse.h.
anonymous enum |
Enumerator | |
---|---|
BUNCHSPACE |
Definition at line 37 of file CaloHitResponse.h.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloVShape * | shape, | ||
bool | PreMix1 = false , |
||
bool | HighFidelity = false |
||
) |
Definition at line 21 of file CaloHitResponse.cc.
CaloHitResponse::CaloHitResponse | ( | const CaloVSimParameterMap * | parameterMap, |
const CaloShapes * | shapes, | ||
bool | PreMix1 = false , |
||
bool | HighFidelity = false |
||
) |
Definition at line 41 of file CaloHitResponse.cc.
|
virtual |
|
virtual |
process a single SimHit
Reimplemented in HcalSiPMHitResponse.
Definition at line 87 of file CaloHitResponse.cc.
References CaloVHitFilter::accepts(), mps_fire::i, edm::isNotFinite(), runTheMatrix::keep, keepBlank(), LogDebug, makeAnalogSignal(), CaloSamples::size(), findQualityFiles::size, and theHitFilter.
Referenced by HcalSiPMHitResponse::add(), CaloTDigitizer< Traits, runHelper >::add(), CaloTDigitizer< Traits, runHelper >::addNoiseSignals(), HcalSiPMHitResponse::finalizeHits(), counter.Counter::register(), and run().
|
virtual |
add a signal, in units of pe
Reimplemented in HcalSiPMHitResponse.
Definition at line 112 of file CaloHitResponse.cc.
References findSignal(), CaloSamples::id(), triggerObjects_cff::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 168 of file CaloHitResponse.cc.
References CaloVPECorrection::correctPE(), HCALHighEnergyHPDFilter_cfi::energy, and thePECorrection.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
inline |
frees up memory
Definition at line 87 of file CaloHitResponse.h.
References theAnalogSignalMap.
Referenced by CaloTDigitizer< Traits, runHelper >::run().
|
virtual |
Finalize hits.
Reimplemented in HcalSiPMHitResponse.
Definition at line 68 of file CaloHitResponse.cc.
References highFidelityPreMix, makeBlankSignal(), preMixDigis, mps_fire::result, and theAnalogSignalMap.
Referenced by CaloTDigitizer< Traits, runHelper >::run().
CaloSamples * CaloHitResponse::findSignal | ( | const DetId & | detId | ) |
users can look for the signal for a given cell
Definition at line 185 of file CaloHitResponse.cc.
References mps_fire::result, and theAnalogSignalMap.
Referenced by add(), and CaloTDigitizer< Traits, runHelper >::run().
int CaloHitResponse::getReadoutFrameSize | ( | const DetId & | id | ) | const |
Definition at line 196 of file CaloHitResponse.cc.
References BUNCHSPACE, highFidelityPreMix, invdt, preMixDigis, hcalSimParameters_cfi::readoutFrameSize, CaloVSimParameterMap::simParameters(), and theParameterMap.
Referenced by makeBlankSignal().
|
inlinevirtual |
Initialize hits.
Reimplemented in HcalSiPMHitResponse.
Definition at line 62 of file CaloHitResponse.h.
Referenced by CaloTDigitizer< Traits, runHelper >::initializeHits().
|
inlinevirtual |
Definition at line 59 of file CaloHitResponse.h.
Referenced by add(), and HcalSiPMHitResponse::finalizeHits().
|
virtual |
creates the signal corresponding to this hit
Definition at line 123 of file CaloHitResponse.cc.
References analogSignalAmplitude(), newFWLiteAna::bin, BUNCHSPACE, CaloVHitCorrection::delay(), dt, highFidelityPreMix, hit::id, ignoreTime, invdt, makeBlankSignal(), preMixDigis, mps_fire::result, CaloShapes::shape(), CaloVSimParameterMap::simParameters(), storePrecise, theHitCorrection, theParameterMap, thePhaseShift_, theShape, theShapes, protons_cff::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 206 of file CaloHitResponse.cc.
References BUNCHSPACE, dt, getReadoutFrameSize(), invdt, hcalSimParameters_cfi::readoutFrameSize, mps_fire::result, CaloVSimParameterMap::simParameters(), storePrecise, and theParameterMap.
Referenced by finalizeHits(), makeAnalogSignal(), and CaloTDigitizer< Traits, runHelper >::run().
|
inline |
number of signals in the current cache
Definition at line 106 of file CaloHitResponse.h.
References theAnalogSignalMap.
Referenced by CaloTDigitizer< Traits, runHelper >::run().
|
virtual |
Complete cell digitization.
Definition at line 79 of file CaloHitResponse.cc.
References add(), hfClusterShapes_cfi::hits, and withinBunchRange().
void CaloHitResponse::setBunchRange | ( | int | minBunch, |
int | maxBunch | ||
) |
tells it which pileup bunches to do
Definition at line 63 of file CaloHitResponse.cc.
References MixingModule_cfi::maxBunch, MixingModule_cfi::minBunch, theMaxBunch, and theMinBunch.
|
inline |
geometry needed for time-of-flight
Definition at line 57 of file CaloHitResponse.h.
References relativeConstraints::geometry, and theGeometry.
Referenced by CastorDigiProducer::checkGeometry(), and HcalTBDigiProducer::updateGeometry().
|
inline |
If you want to correct hits, for attenuation or delay, set this.
Definition at line 81 of file CaloHitResponse.h.
References theHitCorrection.
Referenced by CastorDigiProducer::CastorDigiProducer().
|
inline |
if you want to reject hits, for example, from a certain subdetector, set this
Definition at line 78 of file CaloHitResponse.h.
References ALCARECOTkAlBeamHalo_cff::filter, and theHitFilter.
Referenced by CastorDigiProducer::CastorDigiProducer(), and HcalTBDigiProducer::HcalTBDigiProducer().
|
inline |
Definition at line 128 of file CaloHitResponse.h.
References submitPVValidationJobs::gt, and ignoreTime.
|
inline |
if you want to correct the photoelectrons
Definition at line 84 of file CaloHitResponse.h.
References thePECorrection.
|
inline |
setting the phase shift for asynchronous trigger (e.g. test beams)
Definition at line 118 of file CaloHitResponse.h.
References thePhaseShift_.
Referenced by HcalTBDigiProducer::setPhaseShift().
|
inline |
Definition at line 126 of file CaloHitResponse.h.
References storePrecise.
Referenced by CaloTDigitizer< Traits, runHelper >::run().
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 219 of file CaloHitResponse.cc.
References HLT_2022v11_cff::distance, CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), DetId::rawId(), mps_fire::result, and theGeometry.
Referenced by HcalSiPMHitResponse::add(), and makeAnalogSignal().
|
inline |
check if crossing is within bunch range:
Definition at line 122 of file CaloHitResponse.h.
References theMaxBunch, and theMinBunch.
Referenced by CaloTDigitizer< Traits, runHelper >::add(), and run().
|
static |
Definition at line 38 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), and makeBlankSignal().
|
protected |
Definition at line 148 of file CaloHitResponse.h.
Referenced by finalizeHits(), getReadoutFrameSize(), and makeAnalogSignal().
|
protected |
Definition at line 149 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), makeAnalogSignal(), and setIgnoreGeantTime().
|
static |
Definition at line 39 of file CaloHitResponse.h.
Referenced by getReadoutFrameSize(), makeAnalogSignal(), and makeBlankSignal().
|
protected |
Definition at line 147 of file CaloHitResponse.h.
Referenced by finalizeHits(), getReadoutFrameSize(), and makeAnalogSignal().
|
protected |
Definition at line 146 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), makeBlankSignal(), and setStorePrecise().
|
protected |
Definition at line 131 of file CaloHitResponse.h.
Referenced by add(), clear(), finalizeHits(), findSignal(), and nSignals().
|
protected |
Definition at line 140 of file CaloHitResponse.h.
Referenced by setGeometry(), and timeOfFlight().
|
protected |
Definition at line 136 of file CaloHitResponse.h.
Referenced by makeAnalogSignal(), and setHitCorrection().
|
protected |
Definition at line 138 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), add(), and setHitFilter().
|
protected |
Definition at line 143 of file CaloHitResponse.h.
Referenced by setBunchRange(), and withinBunchRange().
|
protected |
Definition at line 142 of file CaloHitResponse.h.
Referenced by setBunchRange(), and withinBunchRange().
|
protected |
Definition at line 133 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), HcalSiPMHitResponse::addPEnoise(), HcalSiPMHitResponse::getReadoutFrameSize(), getReadoutFrameSize(), makeAnalogSignal(), HcalSiPMHitResponse::makeBlankSignal(), makeBlankSignal(), and HcalSiPMHitResponse::makeSiPMSignal().
|
protected |
Definition at line 137 of file CaloHitResponse.h.
Referenced by analogSignalAmplitude(), and setPECorrection().
|
protected |
Definition at line 145 of file CaloHitResponse.h.
Referenced by HcalSiPMHitResponse::add(), makeAnalogSignal(), and setPhaseShift().
|
protected |
Definition at line 135 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().
|
protected |
Definition at line 134 of file CaloHitResponse.h.
Referenced by makeAnalogSignal().