#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) |
virtual | ~CSCStripElectronicsSim () |
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 |
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 () |
initialization for each layer More... | |
virtual int | readoutElement (int strip) const |
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 |
the average time-of-flight from the interaction point to the given detector More... | |
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 27 of file CSCStripElectronicsSim.h.
|
explicit |
configurable parameters
Definition at line 23 of file CSCStripElectronicsSim.cc.
References doCrosstalk_, CSCBaseElectronicsSim::fillAmpResponse(), and theCrosstalkGenerator.
|
virtual |
Definition at line 56 of file CSCStripElectronicsSim.cc.
References doCrosstalk_, and theCrosstalkGenerator.
|
private |
Definition at line 369 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::nElements, python.multivaluedict::sort(), SortSignalsByTotal(), and CSCBaseElectronicsSim::theSignalMap.
Referenced by fillDigis().
|
private |
Definition at line 397 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.
|
privatevirtual |
Implements CSCBaseElectronicsSim.
Definition at line 87 of file CSCStripElectronicsSim.cc.
References CSCStripAmpResponse::calculateAmpResponse(), 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 261 of file CSCStripElectronicsSim.cc.
References doSuppression_, i, CSCBaseElectronicsSim::nElements, readoutElement(), query::result, and svgfig::window().
Referenced by fillStripDigis(), and selfTest().
|
private |
calculates the comparator reading, including saturation and offsets
Definition at line 109 of file CSCStripElectronicsSim.cc.
References CSCAnalogSignal::getValue(), bookConverter::min, theComparatorRMSOffset, and theComparatorSaturation.
Referenced by runComparator().
void CSCStripElectronicsSim::createDigi | ( | int | istrip, |
const CSCAnalogSignal & | signal, | ||
std::vector< CSCStripDigi > & | result, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 417 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::addLinks(), CSCChamberSpecs::chamberType(), CSCBaseElectronicsSim::channelIndex(), doSaturation(), CSCAnalogSignal::getValue(), CSCBaseElectronicsSim::layerId(), LogTrace, nScaBins_, CSCStripConditions::pedestal(), EcalCondDBWriter_cfi::pedestal, sca_time_bin_size, CSCStripConditions::smearedGain(), edmStreamStallGrapher::t, theAverageTimeOfFlight, theSCATimingOffsets, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSpecs, theStripConditions, and CSCBaseElectronicsSim::theTimingCalibrationError.
Referenced by fillStripDigis().
|
private |
Definition at line 447 of file CSCStripElectronicsSim.cc.
References CSCStripDigi::getADCCounts(), bookConverter::min, and CSCStripDigi::setADCCounts().
Referenced by createDigi().
void CSCStripElectronicsSim::fillDigis | ( | CSCStripDigiCollection & | digis, |
CSCComparatorDigiCollection & | comparators, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 327 of file CSCStripElectronicsSim.cc.
References addCrosstalk(), doCrosstalk_, fillStripDigis(), getKeyStripsFromMC(), CSCBaseElectronicsSim::layerId(), and runComparator().
Referenced by CSCDigitizer::doAction().
void CSCStripElectronicsSim::fillMissingLayer | ( | const CSCLayer * | layer, |
const CSCComparatorDigiCollection & | comparators, | ||
CSCStripDigiCollection & | digis, | ||
CLHEP::HepRandomEngine * | engine | ||
) |
Definition at line 457 of file CSCStripElectronicsSim.cc.
References CSCDetId::chamberId(), CSCDetId, fillStripDigis(), getKeyStrips(), CSCBaseElectronicsSim::setLayer(), CSCBaseElectronicsSim::theLayerId, and CSCBaseElectronicsSim::theSignalMap.
Referenced by CSCDigitizer::doAction().
|
private |
Definition at line 351 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 229 of file CSCStripElectronicsSim.cc.
References funct::abs(), query::result, and CSCBaseElectronicsSim::theOffsetOfBxZero.
Referenced by fillMissingLayer().
|
private |
get ths strips that have detector hits
Definition at line 248 of file CSCStripElectronicsSim.cc.
References first, query::result, CSCBaseElectronicsSim::theDetectorHitMap, and create_public_lumi_plots::transform.
Referenced by fillDigis().
|
private |
|
privatevirtual |
initialization for each layer
Implements CSCBaseElectronicsSim.
Definition at line 62 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 93 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.
|
privatevirtual |
Implements CSCBaseElectronicsSim.
Definition at line 82 of file CSCStripElectronicsSim.cc.
References CSCLayerGeometry::channel(), and CSCBaseElectronicsSim::theLayerGeometry.
Referenced by addCrosstalk(), channelsToRead(), runComparator(), and selfTest().
|
private |
Definition at line 118 of file CSCStripElectronicsSim.cc.
References comparatorReading(), CSCBaseElectronicsSim::find(), CSCAnalogSignal::getValue(), CSCBaseElectronicsSim::nElements, convertSQLitetoXML_cfg::output, readoutElement(), python.multivaluedict::sort(), CSCBaseElectronicsSim::theBunchSpacing, theComparatorDeadTime, theComparatorSamplingTime, theComparatorThreshold, theComparatorTimeBinOffset, theComparatorTimeOffset, theComparatorWait, CSCBaseElectronicsSim::theOffsetOfBxZero, CSCBaseElectronicsSim::theSignalMap, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSignalStopTime, theTimingOffset, and cond::rpcobgas::time.
Referenced by fillDigis().
|
private |
Definition at line 484 of file CSCStripElectronicsSim.cc.
References 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 107 of file CSCStripElectronicsSim.h.
Referenced by CSCStripElectronicsSim(), fillDigis(), and ~CSCStripElectronicsSim().
|
private |
Definition at line 106 of file CSCStripElectronicsSim.h.
Referenced by channelsToRead(), and selfTest().
|
private |
Definition at line 105 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), initParameters(), and makeNoiseSignal().
|
private |
Definition at line 116 of file CSCStripElectronicsSim.h.
Referenced by initParameters().
|
private |
Definition at line 113 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), initParameters(), and makeNoiseSignal().
|
private |
Definition at line 55 of file CSCStripElectronicsSim.h.
Referenced by calculateAmpResponse().
|
private |
Definition at line 126 of file CSCStripElectronicsSim.h.
Referenced by createDigi(), and initParameters().
|
private |
Definition at line 111 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 100 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 94 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 95 of file CSCStripElectronicsSim.h.
Referenced by comparatorReading().
|
private |
Definition at line 121 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 97 of file CSCStripElectronicsSim.h.
Referenced by comparatorReading().
|
private |
Definition at line 93 of file CSCStripElectronicsSim.h.
Referenced by initParameters(), and runComparator().
|
private |
Definition at line 118 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 120 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 99 of file CSCStripElectronicsSim.h.
Referenced by runComparator().
|
private |
Definition at line 109 of file CSCStripElectronicsSim.h.
Referenced by addCrosstalk(), CSCStripElectronicsSim(), and ~CSCStripElectronicsSim().
|
private |
Definition at line 101 of file CSCStripElectronicsSim.h.
|
private |
Definition at line 123 of file CSCStripElectronicsSim.h.
Referenced by createDigi().
|
private |
Definition at line 108 of file CSCStripElectronicsSim.h.
Referenced by addCrosstalk(), createDigi(), makeNoiseSignal(), and setStripConditions().
|
private |
Definition at line 103 of file CSCStripElectronicsSim.h.
Referenced by initParameters(), and runComparator().