#include <CSCStripElectronicsSim.h>
Public Member Functions | |
void | createDigi (int istrip, const CSCAnalogSignal &signal, std::vector< CSCStripDigi > &result, CLHEP::HepRandomEngine *) |
CSCStripElectronicsSim (const edm::ParameterSet &p) | |
configurable parameters More... | |
void | fillDigis (CSCStripDigiCollection &digis, CSCComparatorDigiCollection &comparators, CLHEP::HepRandomEngine *) |
void | fillMissingLayer (const CSCLayer *layer, const CSCComparatorDigiCollection &comparators, CSCStripDigiCollection &digis, CLHEP::HepRandomEngine *) |
CSCAnalogSignal | makeNoiseSignal (int element, CLHEP::HepRandomEngine *) override |
void | setStripConditions (CSCStripConditions *cond) |
~CSCStripElectronicsSim () override | |
Public Member Functions inherited from CSCBaseElectronicsSim | |
const DigiSimLinks & | digiSimLinks () const |
void | setLayerId (const CSCDetId &id) |
for standalone apps who don't calculate it from the geometry More... | |
void | simulate (const CSCLayer *layer, const std::vector< CSCDetectorHit > &inputHits, CLHEP::HepRandomEngine *) |
virtual | ~CSCBaseElectronicsSim () |
Private Member Functions | |
void | addCrosstalk (CLHEP::HepRandomEngine *) |
void | addCrosstalk (const CSCAnalogSignal &signal, int thisStrip, int otherStrip, CLHEP::HepRandomEngine *) |
float | calculateAmpResponse (float t) const override |
std::list< int > | channelsToRead (const std::list< int > &keyStrips, int window) const |
float | comparatorReading (const CSCAnalogSignal &signal, float time, CLHEP::HepRandomEngine *) const |
calculates the comparator reading, including saturation and offsets More... | |
void | doSaturation (CSCStripDigi &digi) |
void | fillStripDigis (const std::list< int > &keyStrips, CSCStripDigiCollection &digis, CLHEP::HepRandomEngine *) |
std::list< int > | getKeyStrips (const std::vector< CSCComparatorDigi > &comparators) const |
finds the key strips from these comparators More... | |
std::list< int > | getKeyStripsFromMC () const |
get ths strips that have detector hits More... | |
void | getReadoutRange (int inputStrip, int &minStrip, int &maxStrip) |
void | initParameters () override |
initialization for each layer More... | |
int | readoutElement (int strip) const override |
void | runComparator (std::vector< CSCComparatorDigi > &result, CLHEP::HepRandomEngine *) |
void | selfTest () const |
Private Attributes | |
bool | doCrosstalk_ |
bool | doSuppression_ |
int | nScaBins_ |
int | sca_peak_bin |
float | sca_time_bin_size |
CSCStripAmpResponse | theAmpResponse |
float | theAverageTimeOfFlight |
int | theComparatorClockJump |
float | theComparatorDeadTime |
float | theComparatorNoise |
float | theComparatorRMSOffset |
double | theComparatorSamplingTime |
float | theComparatorSaturation |
float | theComparatorThreshold |
double | theComparatorTimeBinOffset |
double | theComparatorTimeOffset |
float | theComparatorWait |
CSCCrosstalkGenerator * | theCrosstalkGenerator |
float | theDaqDeadTime |
std::vector< double > | theSCATimingOffsets |
CSCStripConditions * | theStripConditions |
float | theTimingOffset |
Additional Inherited Members | |
Public Types inherited from CSCBaseElectronicsSim | |
typedef std::map< int, CSCAnalogSignal, std::less< int > > | CSCSignalMap |
typedef edm::DetSet< StripDigiSimLink > | DigiSimLinks |
Protected Types inherited from CSCBaseElectronicsSim | |
enum | { NONE, CONSERVATIVE, RADICAL } |
typedef std::multimap< int, CSCDetectorHit, std::less< int > > | DetectorHitMap |
Protected Member Functions inherited from CSCBaseElectronicsSim | |
CSCAnalogSignal & | add (const CSCAnalogSignal &, CLHEP::HepRandomEngine *) |
virtual void | addLinks (int channelIndex) |
void | addNoise (CLHEP::HepRandomEngine *) |
CSCAnalogSignal | amplifySignal (const CSCDetectorHit &) |
double | averageTimeOfFlight (const DetId &detId) const |
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, CLHEP::HepRandomEngine *) |
CSCDetId | layerId () const |
the CSCDetId corresponding to the current layer More... | |
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 inherited from CSCBaseElectronicsSim | |
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 |
float | theSamplingTime |
int | theShapingTime |
CSCSignalMap | theSignalMap |
std::vector< double > | theSignalPropagationSpeed |
float | theSignalStartTime |
float | theSignalStopTime |
const CSCChamberSpecs * | theSpecs |
std::vector< double > | theTimingCalibrationError |
Model the readout electronics chain for EMU CSC strips
Definition at line 28 of file CSCStripElectronicsSim.h.
|
explicit |
configurable parameters
Definition at line 23 of file CSCStripElectronicsSim.cc.
References doCrosstalk_, CSCBaseElectronicsSim::fillAmpResponse(), and theCrosstalkGenerator.
|
override |
Definition at line 53 of file CSCStripElectronicsSim.cc.
References doCrosstalk_, and theCrosstalkGenerator.
|
private |
Definition at line 320 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::nElements, jetUpdater_cfi::sort, SortSignalsByTotal(), and CSCBaseElectronicsSim::theSignalMap.
Referenced by fillDigis().
|
private |
Definition at line 345 of file CSCStripElectronicsSim.cc.
References CSCStripConditions::crosstalk(), CSCBaseElectronicsSim::find(), CSCCrosstalkGenerator::getCrosstalk(), CSCBaseElectronicsSim::layerId(), TrapezoidalPlaneBounds::length(), readoutElement(), CSCCrosstalkGenerator::setParameters(), CSCAnalogSignal::superimpose(), theCrosstalkGenerator, CSCBaseElectronicsSim::theLayerGeometry, and theStripConditions.
|
overrideprivatevirtual |
Implements CSCBaseElectronicsSim.
Definition at line 77 of file CSCStripElectronicsSim.cc.
References CSCStripAmpResponse::calculateAmpResponse(), submitPVValidationJobs::t, and theAmpResponse.
|
private |
finds what strips to read. Will either take 5 strips around the keystrip, or the whole CFEB, based on doSuppression_
Definition at line 238 of file CSCStripElectronicsSim.cc.
References doSuppression_, mps_fire::i, CSCBaseElectronicsSim::nElements, readoutElement(), mps_fire::result, and svgfig::window().
Referenced by fillStripDigis(), and selfTest().
|
private |
calculates the comparator reading, including saturation and offsets
Definition at line 94 of file CSCStripElectronicsSim.cc.
References CSCAnalogSignal::getValue(), min(), theComparatorRMSOffset, theComparatorSaturation, and protons_cff::time.
Referenced by runComparator().
void CSCStripElectronicsSim::createDigi | ( | int | istrip, |
const CSCAnalogSignal & | signal, | ||
std::vector< CSCStripDigi > & | result, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 362 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::addLinks(), CSCChamberSpecs::chamberType(), CSCBaseElectronicsSim::channelIndex(), doSaturation(), PedestalClient_cfi::gain, CSCAnalogSignal::getValue(), CSCBaseElectronicsSim::layerId(), LogTrace, nScaBins_, CSCStripConditions::pedestal(), EcalCondDBWriter_cfi::pedestal, mps_fire::result, sca_time_bin_size, CSCStripConditions::smearedGain(), submitPVValidationJobs::t, FrontierCondition_GT_autoExpress_cfi::t0, theAverageTimeOfFlight, theSCATimingOffsets, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSpecs, theStripConditions, CSCBaseElectronicsSim::theTimingCalibrationError, and hcalSimParameters_cfi::timeSmearing.
Referenced by fillStripDigis().
|
private |
Definition at line 390 of file CSCStripElectronicsSim.cc.
References CSCStripDigi::getADCCounts(), min(), and CSCStripDigi::setADCCounts().
Referenced by createDigi().
void CSCStripElectronicsSim::fillDigis | ( | CSCStripDigiCollection & | digis, |
CSCComparatorDigiCollection & | comparators, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 286 of file CSCStripElectronicsSim.cc.
References addCrosstalk(), doCrosstalk_, fillStripDigis(), getKeyStripsFromMC(), CSCBaseElectronicsSim::layerId(), FastTimerService_cff::range, and runComparator().
Referenced by CSCDigitizer::doAction().
void CSCStripElectronicsSim::fillMissingLayer | ( | const CSCLayer * | layer, |
const CSCComparatorDigiCollection & | comparators, | ||
CSCStripDigiCollection & | digis, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 398 of file CSCStripElectronicsSim.cc.
References CSCDetId::chamberId(), fillStripDigis(), getKeyStrips(), phase1PixelTopology::layer, CSCBaseElectronicsSim::setLayer(), CSCBaseElectronicsSim::theLayerId, and CSCBaseElectronicsSim::theSignalMap.
Referenced by CSCDigitizer::doAction().
|
private |
Definition at line 306 of file CSCStripElectronicsSim.cc.
References channelsToRead(), createDigi(), CSCBaseElectronicsSim::find(), and CSCBaseElectronicsSim::layerId().
Referenced by fillDigis(), and fillMissingLayer().
|
private |
finds the key strips from these comparators
Definition at line 207 of file CSCStripElectronicsSim.cc.
References funct::abs(), mps_fire::result, and CSCBaseElectronicsSim::theOffsetOfBxZero.
Referenced by fillMissingLayer().
|
private |
get ths strips that have detector hits
Definition at line 221 of file CSCStripElectronicsSim.cc.
References first, mps_fire::result, CSCBaseElectronicsSim::theDetectorHitMap, and HcalDetIdTransform::transform().
Referenced by fillDigis().
|
private |
|
overrideprivatevirtual |
initialization for each layer
Implements CSCBaseElectronicsSim.
Definition at line 59 of file CSCStripElectronicsSim.cc.
References CSCChamberSpecs::chamberType(), PV3DBase< T, PVType, FrameType >::mag(), CSCBaseElectronicsSim::nElements, nScaBins_, CSCLayerGeometry::numberOfStrips(), GloballyPositioned< T >::position(), sca_peak_bin, sca_time_bin_size, GeomDet::surface(), theAverageTimeOfFlight, CSCBaseElectronicsSim::theBunchTimingOffsets, theComparatorThreshold, CSCBaseElectronicsSim::theLayer, CSCBaseElectronicsSim::theLayerGeometry, CSCBaseElectronicsSim::theNumberOfSamples, CSCBaseElectronicsSim::theSamplingTime, CSCBaseElectronicsSim::theShapingTime, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSignalStopTime, CSCBaseElectronicsSim::theSpecs, and theTimingOffset.
|
overridevirtual |
Reimplemented from CSCBaseElectronicsSim.
Definition at line 79 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::doNoise_, CSCAnalogSignal::getValue(), CSCBaseElectronicsSim::layerId(), CSCStripConditions::noisify(), nScaBins_, sca_time_bin_size, CSCBaseElectronicsSim::theNumberOfSamples, CSCBaseElectronicsSim::theSamplingTime, CSCBaseElectronicsSim::theSignalStartTime, and theStripConditions.
|
overrideprivatevirtual |
Implements CSCBaseElectronicsSim.
Definition at line 75 of file CSCStripElectronicsSim.cc.
References CSCLayerGeometry::channel(), digitizers_cfi::strip, and CSCBaseElectronicsSim::theLayerGeometry.
Referenced by addCrosstalk(), channelsToRead(), runComparator(), and selfTest().
|
private |
Definition at line 101 of file CSCStripElectronicsSim.cc.
References comparatorReading(), CSCBaseElectronicsSim::find(), reco::JetExtendedAssociation::getValue(), CSCBaseElectronicsSim::nElements, convertSQLitetoXML_cfg::output, readoutElement(), mps_fire::result, jetUpdater_cfi::sort, digitizers_cfi::strip, CSCBaseElectronicsSim::theBunchSpacing, theComparatorDeadTime, theComparatorSamplingTime, theComparatorThreshold, theComparatorTimeBinOffset, theComparatorTimeOffset, theComparatorWait, CSCBaseElectronicsSim::theOffsetOfBxZero, CSCBaseElectronicsSim::theSignalMap, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSignalStopTime, theTimingOffset, and protons_cff::time.
Referenced by fillDigis().
|
private |
Definition at line 422 of file CSCStripElectronicsSim.cc.
References cms::cuda::assert(), channelsToRead(), doSuppression_, CSCBaseElectronicsSim::nElements, and readoutElement().
|
inline |
Definition at line 42 of file CSCStripElectronicsSim.h.
References theStripConditions.
Referenced by CSCDigitizer::setStripConditions().
|
private |
Definition at line 102 of file CSCStripElectronicsSim.h.
Referenced by CSCStripElectronicsSim(), fillDigis(), and ~CSCStripElectronicsSim().
|
private |
Definition at line 101 of file CSCStripElectronicsSim.h.
Referenced by channelsToRead(), and selfTest().
|
private |
Definition at line 100 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), initParameters(), and makeNoiseSignal().
|
private |
Definition at line 111 of file CSCStripElectronicsSim.h.
Referenced by initParameters().
|
private |
Definition at line 108 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), initParameters(), and makeNoiseSignal().
|
private |
Definition at line 58 of file CSCStripElectronicsSim.h.
Referenced by calculateAmpResponse().
|
private |
Definition at line 121 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), and initParameters().
|
private |
Definition at line 106 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 95 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 89 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 90 of file CSCStripElectronicsSim.h.
Referenced by comparatorReading().
|
private |
Definition at line 116 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 92 of file CSCStripElectronicsSim.h.
Referenced by comparatorReading().
|
private |
Definition at line 88 of file CSCStripElectronicsSim.h.
Referenced by initParameters(), and runComparator().
|
private |
Definition at line 113 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 115 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 94 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 104 of file CSCStripElectronicsSim.h.
Referenced by addCrosstalk(), CSCStripElectronicsSim(), and ~CSCStripElectronicsSim().
|
private |
Definition at line 96 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 118 of file CSCStripElectronicsSim.h.
Referenced by createDigi().
|
private |
Definition at line 103 of file CSCStripElectronicsSim.h.
Referenced by addCrosstalk(), createDigi(), makeNoiseSignal(), and setStripConditions().
|
private |
Definition at line 98 of file CSCStripElectronicsSim.h.
Referenced by initParameters(), and runComparator().