#include <CSCBaseElectronicsSim.h>
Public Types | |
typedef std::map< int, CSCAnalogSignal, std::less < int > > | CSCSignalMap |
typedef edm::DetSet < StripDigiSimLink > | DigiSimLinks |
Public Member Functions | |
const DigiSimLinks & | digiSimLinks () const |
void | setLayerId (const CSCDetId &id) |
for standalone apps who don't calculate it from the geometry More... | |
void | setRandomEngine (CLHEP::HepRandomEngine &engine) |
void | simulate (const CSCLayer *layer, const std::vector< CSCDetectorHit > &inputHits) |
virtual | ~CSCBaseElectronicsSim () |
Protected Types | |
enum | { NONE, CONSERVATIVE, RADICAL } |
typedef std::multimap< int, CSCDetectorHit, std::less< int > > | DetectorHitMap |
Protected Member Functions | |
CSCAnalogSignal & | add (const CSCAnalogSignal &) |
virtual void | addLinks (int channelIndex) |
void | addNoise () |
CSCAnalogSignal | amplifySignal (const CSCDetectorHit &) |
double | averageTimeOfFlight (const DetId &detId) const |
the average time-of-flight from the interaction point to the given detector More... | |
virtual float | calculateAmpResponse (float t) const =0 |
virtual int | channelIndex (int channel) const |
lets users map channels to different indices for links More... | |
void | combineAnalogSignals (const std::vector< CSCAnalogSignal > &) |
CSCBaseElectronicsSim (const edm::ParameterSet &p) | |
void | fillAmpResponse () |
CSCAnalogSignal & | find (int element) |
virtual void | initParameters ()=0 |
CSCDetId | layerId () const |
the CSCDetId corresponding to the current layer More... | |
virtual CSCAnalogSignal | makeNoiseSignal (int element) |
virtual int | readoutElement (int element) const =0 |
void | setLayer (const CSCLayer *layer) |
void | setNoise (float rmsNoise, float noiseSigmaThreshold) |
void | setSignalTimeRange (double startTime, double stopTime) |
virtual float | signalDelay (int element, float pos) const |
Protected Attributes | |
bool | doNoise_ |
int | nElements |
CSCAnalogSignal | theAmpResponse |
float | theBunchSpacing |
std::vector< double > | theBunchTimingOffsets |
DetectorHitMap | theDetectorHitMap |
DigiSimLinks | theDigiSimLinks |
const CSCLayer * | theLayer |
const CSCLayerGeometry * | theLayerGeometry |
CSCDetId | theLayerId |
bool | theNoiseWasAdded |
int | theNumberOfSamples |
int | theOffsetOfBxZero |
float | thePeakTimeSigma |
CLHEP::RandGaussQ * | theRandGaussQ |
float | theSamplingTime |
int | theShapingTime |
CSCSignalMap | theSignalMap |
std::vector< double > | theSignalPropagationSpeed |
float | theSignalStartTime |
float | theSignalStopTime |
const CSCChamberSpecs * | theSpecs |
std::vector< double > | theTimingCalibrationError |
Commonalities between CSCStripElectronicsSim and CSCWireElectronicsSim.
It has three non-virtual functions, so that's enough to deserve a new class. And since it has virtual functions it needs a virtual dtor.
Definition at line 34 of file CSCBaseElectronicsSim.h.
typedef std::map<int, CSCAnalogSignal, std::less<int> > CSCBaseElectronicsSim::CSCSignalMap |
Definition at line 38 of file CSCBaseElectronicsSim.h.
|
protected |
Definition at line 159 of file CSCBaseElectronicsSim.h.
Definition at line 39 of file CSCBaseElectronicsSim.h.
|
protected |
|
virtual |
Definition at line 40 of file CSCBaseElectronicsSim.cc.
References theRandGaussQ.
|
protected |
Definition at line 13 of file CSCBaseElectronicsSim.cc.
References theBunchTimingOffsets.
|
protected |
Definition at line 176 of file CSCBaseElectronicsSim.cc.
References find(), CSCAnalogSignal::getElement(), and CSCAnalogSignal::superimpose().
Referenced by simulate().
|
protectedvirtual |
creates links from Digi to SimTrack disabled for now
Definition at line 194 of file CSCBaseElectronicsSim.cc.
References DeDxDiscriminatorTools::charge(), PSimHit::eventId(), edm::DetSet< T >::push_back(), theDetectorHitMap, and theDigiSimLinks.
Referenced by CSCStripElectronicsSim::createDigi(), and CSCWireElectronicsSim::fillDigis().
|
protected |
Definition at line 141 of file CSCBaseElectronicsSim.cc.
References makeNoiseSignal(), theNoiseWasAdded, thePeakTimeSigma, theRandGaussQ, and theSignalMap.
Referenced by simulate().
|
protected |
Definition at line 117 of file CSCBaseElectronicsSim.cc.
References channelIndex(), CSCDetectorHit::getCharge(), CSCDetectorHit::getElement(), CSCDetectorHit::getPosition(), CSCDetectorHit::getTime(), readoutElement(), signalDelay(), theAmpResponse, and theDetectorHitMap.
Referenced by simulate().
|
protected |
the average time-of-flight from the interaction point to the given detector
|
protectedpure virtual |
Implemented in CSCStripElectronicsSim, and CSCWireElectronicsSim.
Referenced by fillAmpResponse().
|
inlineprotectedvirtual |
lets users map channels to different indices for links
Reimplemented in CSCWireElectronicsSim.
Definition at line 103 of file CSCBaseElectronicsSim.h.
Referenced by amplifySignal(), and CSCStripElectronicsSim::createDigi().
|
protected |
|
inline |
Definition at line 48 of file CSCBaseElectronicsSim.h.
References theDigiSimLinks.
Referenced by CSCDigitizer::doAction().
|
protected |
Definition at line 98 of file CSCBaseElectronicsSim.cc.
References calculateAmpResponse(), i, LogTrace, theAmpResponse, theNumberOfSamples, and theSamplingTime.
Referenced by CSCStripElectronicsSim::CSCStripElectronicsSim(), and CSCWireElectronicsSim::CSCWireElectronicsSim().
|
protected |
Definition at line 155 of file CSCBaseElectronicsSim.cc.
References LogTrace, makeNoiseSignal(), nElements, theNoiseWasAdded, theNumberOfSamples, theSamplingTime, theSignalMap, and theSignalStartTime.
Referenced by add(), CSCStripElectronicsSim::addCrosstalk(), CSCStripElectronicsSim::fillStripDigis(), and CSCStripElectronicsSim::runComparator().
|
protectedpure virtual |
Implemented in CSCStripElectronicsSim, and CSCWireElectronicsSim.
Referenced by setLayer().
|
inlineprotected |
the CSCDetId corresponding to the current layer
Definition at line 106 of file CSCBaseElectronicsSim.h.
References theLayerId.
Referenced by CSCStripElectronicsSim::addCrosstalk(), CSCStripElectronicsSim::createDigi(), CSCWireElectronicsSim::fillDigis(), CSCStripElectronicsSim::fillDigis(), CSCStripElectronicsSim::fillStripDigis(), CSCStripElectronicsSim::makeNoiseSignal(), and simulate().
|
protectedvirtual |
Reimplemented in CSCStripElectronicsSim.
Definition at line 134 of file CSCBaseElectronicsSim.cc.
References theNumberOfSamples, theSamplingTime, and theSignalStartTime.
Referenced by addNoise(), and find().
|
protectedpure virtual |
Implemented in CSCStripElectronicsSim, and CSCWireElectronicsSim.
Referenced by amplifySignal(), and simulate().
|
protected |
Definition at line 86 of file CSCBaseElectronicsSim.cc.
References CSCLayer::chamber(), CSCDetId, GeomDet::geographicalId(), CSCLayer::geometry(), initParameters(), DetId::rawId(), CSCChamber::specs(), theLayer, theLayerGeometry, theLayerId, and theSpecs.
Referenced by CSCStripElectronicsSim::fillMissingLayer(), and simulate().
|
inline |
for standalone apps who don't calculate it from the geometry
Definition at line 53 of file CSCBaseElectronicsSim.h.
References errorMatrix2Lands_multiChannel::id, and theLayerId.
|
protected |
void CSCBaseElectronicsSim::setRandomEngine | ( | CLHEP::HepRandomEngine & | engine | ) |
Definition at line 46 of file CSCBaseElectronicsSim.cc.
References theRandGaussQ.
Referenced by CSCDigitizer::setRandomEngine().
|
inlineprotected |
How long before & after the bunch crossing to simulate shortening the time can save CPU
Definition at line 79 of file CSCBaseElectronicsSim.h.
References theSignalStartTime, and theSignalStopTime.
|
protectedvirtual |
how long, in ns, it takes a signal at pos to propagate to the readout edge. This may be negative, since the timing may be calibrated to the center of the detector
Definition at line 184 of file CSCBaseElectronicsSim.cc.
References CSCChamberSpecs::chamberType(), pos, theSignalPropagationSpeed, and theSpecs.
Referenced by amplifySignal().
void CSCBaseElectronicsSim::simulate | ( | const CSCLayer * | layer, |
const std::vector< CSCDetectorHit > & | inputHits | ||
) |
Definition at line 53 of file CSCBaseElectronicsSim.cc.
References add(), addNoise(), amplifySignal(), doNoise_, AlCaHLTBitMon_QueryRunRegistry::getElement(), i, layerId(), readoutElement(), setLayer(), theDetectorHitMap, theDigiSimLinks, theNoiseWasAdded, and theSignalMap.
Referenced by CSCDigitizer::doAction().
|
protected |
Definition at line 156 of file CSCBaseElectronicsSim.h.
Referenced by CSCWireElectronicsSim::fillDigis(), CSCStripElectronicsSim::makeNoiseSignal(), and simulate().
|
protected |
Definition at line 131 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::addCrosstalk(), CSCStripElectronicsSim::channelsToRead(), find(), CSCWireElectronicsSim::initParameters(), CSCStripElectronicsSim::initParameters(), CSCStripElectronicsSim::runComparator(), and CSCStripElectronicsSim::selfTest().
|
protected |
Definition at line 120 of file CSCBaseElectronicsSim.h.
Referenced by amplifySignal(), and fillAmpResponse().
|
protected |
Definition at line 123 of file CSCBaseElectronicsSim.h.
Referenced by CSCWireElectronicsSim::fillDigis(), and CSCStripElectronicsSim::runComparator().
|
protected |
Definition at line 138 of file CSCBaseElectronicsSim.h.
Referenced by CSCBaseElectronicsSim(), CSCWireElectronicsSim::fillDigis(), and CSCStripElectronicsSim::initParameters().
|
protected |
Definition at line 160 of file CSCBaseElectronicsSim.h.
Referenced by addLinks(), amplifySignal(), CSCStripElectronicsSim::getKeyStripsFromMC(), and simulate().
|
protected |
Definition at line 161 of file CSCBaseElectronicsSim.h.
Referenced by addLinks(), digiSimLinks(), and simulate().
|
protected |
Definition at line 116 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::initParameters(), setLayer(), and CSCWireElectronicsSim::timeOfFlightCalibration().
|
protected |
Definition at line 115 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::addCrosstalk(), CSCWireElectronicsSim::initParameters(), CSCStripElectronicsSim::initParameters(), CSCWireElectronicsSim::readoutElement(), CSCStripElectronicsSim::readoutElement(), setLayer(), and CSCWireElectronicsSim::timeOfFlightCalibration().
|
protected |
Definition at line 117 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::fillMissingLayer(), layerId(), setLayer(), and setLayerId().
|
protected |
Definition at line 128 of file CSCBaseElectronicsSim.h.
Referenced by addNoise(), find(), and simulate().
|
protected |
Definition at line 148 of file CSCBaseElectronicsSim.h.
Referenced by fillAmpResponse(), find(), CSCStripElectronicsSim::initParameters(), CSCStripElectronicsSim::makeNoiseSignal(), and makeNoiseSignal().
|
protected |
Definition at line 151 of file CSCBaseElectronicsSim.h.
Referenced by CSCWireElectronicsSim::fillDigis(), CSCStripElectronicsSim::getKeyStrips(), and CSCStripElectronicsSim::runComparator().
|
protected |
Definition at line 135 of file CSCBaseElectronicsSim.h.
Referenced by addNoise().
|
protected |
Definition at line 163 of file CSCBaseElectronicsSim.h.
Referenced by addNoise(), CSCStripElectronicsSim::comparatorReading(), CSCStripElectronicsSim::createDigi(), CSCWireElectronicsSim::fillDigis(), setRandomEngine(), and ~CSCBaseElectronicsSim().
|
protected |
Definition at line 145 of file CSCBaseElectronicsSim.h.
Referenced by fillAmpResponse(), CSCWireElectronicsSim::fillDigis(), find(), CSCStripElectronicsSim::initParameters(), CSCStripElectronicsSim::makeNoiseSignal(), and makeNoiseSignal().
|
protected |
Definition at line 134 of file CSCBaseElectronicsSim.h.
Referenced by CSCWireElectronicsSim::initParameters(), and CSCStripElectronicsSim::initParameters().
|
protected |
Definition at line 119 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::addCrosstalk(), addNoise(), CSCWireElectronicsSim::fillDigis(), CSCStripElectronicsSim::fillMissingLayer(), find(), CSCStripElectronicsSim::runComparator(), and simulate().
|
protected |
Speed (cm/ns) that it takes for the signal to get from the element to the readout. Actually negative in strips, due to reflection effects.
Definition at line 154 of file CSCBaseElectronicsSim.h.
Referenced by signalDelay().
|
protected |
Definition at line 141 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::createDigi(), CSCWireElectronicsSim::fillDigis(), find(), CSCStripElectronicsSim::initParameters(), CSCStripElectronicsSim::makeNoiseSignal(), makeNoiseSignal(), CSCStripElectronicsSim::runComparator(), and setSignalTimeRange().
|
protected |
Definition at line 142 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::initParameters(), CSCStripElectronicsSim::runComparator(), and setSignalTimeRange().
|
protected |
Definition at line 114 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::createDigi(), CSCWireElectronicsSim::fillDigis(), CSCWireElectronicsSim::initParameters(), CSCStripElectronicsSim::initParameters(), setLayer(), and signalDelay().
|
protected |
Definition at line 155 of file CSCBaseElectronicsSim.h.
Referenced by CSCStripElectronicsSim::createDigi(), and CSCWireElectronicsSim::fillDigis().