#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 |
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.
|
override |
Definition at line 56 of file CSCStripElectronicsSim.cc.
References doCrosstalk_, and theCrosstalkGenerator.
|
private |
Definition at line 372 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::nElements, SortSignalsByTotal(), and CSCBaseElectronicsSim::theSignalMap.
Referenced by fillDigis().
|
private |
Definition at line 400 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 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 264 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 109 of file CSCStripElectronicsSim.cc.
References CSCAnalogSignal::getValue(), 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 420 of file CSCStripElectronicsSim.cc.
References CSCBaseElectronicsSim::addLinks(), CSCChamberSpecs::chamberType(), CSCBaseElectronicsSim::channelIndex(), doSaturation(), muonCSCDigis_cfi::gain, CSCAnalogSignal::getValue(), CSCBaseElectronicsSim::layerId(), LogTrace, nScaBins_, muonCSCDigis_cfi::pedestal, CSCStripConditions::pedestal(), sca_time_bin_size, CSCStripConditions::smearedGain(), lumiQTWidget::t, cscNeutronWriter_cfi::t0, theAverageTimeOfFlight, theSCATimingOffsets, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSpecs, theStripConditions, CSCBaseElectronicsSim::theTimingCalibrationError, and hcalSimParameters_cfi::timeSmearing.
Referenced by fillStripDigis().
|
private |
Definition at line 450 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 330 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 460 of file CSCStripElectronicsSim.cc.
References CSCDetId::chamberId(), fillStripDigis(), getKeyStrips(), CSCBaseElectronicsSim::setLayer(), CSCBaseElectronicsSim::theLayerId, and CSCBaseElectronicsSim::theSignalMap.
Referenced by CSCDigitizer::doAction().
|
private |
Definition at line 354 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(), mps_fire::result, and CSCBaseElectronicsSim::theOffsetOfBxZero.
Referenced by fillMissingLayer().
|
private |
get ths strips that have detector hits
Definition at line 248 of file CSCStripElectronicsSim.cc.
References plotBeamSpotDB::first, mps_fire::result, CSCBaseElectronicsSim::theDetectorHitMap, and create_public_lumi_plots::transform.
Referenced by fillDigis().
|
private |
|
overrideprivatevirtual |
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.
|
overrideprivatevirtual |
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(), digitizers_cfi::strip, CSCBaseElectronicsSim::theBunchSpacing, theComparatorDeadTime, theComparatorSamplingTime, theComparatorThreshold, theComparatorTimeBinOffset, theComparatorTimeOffset, theComparatorWait, CSCBaseElectronicsSim::theOffsetOfBxZero, CSCBaseElectronicsSim::theSignalMap, CSCBaseElectronicsSim::theSignalStartTime, CSCBaseElectronicsSim::theSignalStopTime, theTimingOffset, and ntuplemaker::time.
Referenced by fillDigis().
|
private |
Definition at line 487 of file CSCStripElectronicsSim.cc.
References channelsToRead(), doSuppression_, CSCBaseElectronicsSim::nElements, and readoutElement().
|
inline |
Definition at line 42 of file CSCStripElectronicsSim.h.
References mps_fire::result, digitizers_cfi::strip, and lumiQTWidget::t.
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(), and makeNoiseSignal().
|
private |
Definition at line 103 of file CSCStripElectronicsSim.h.
Referenced by initParameters(), and runComparator().