CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CSCBaseElectronicsSim Class Referenceabstract

#include <CSCBaseElectronicsSim.h>

Inheritance diagram for CSCBaseElectronicsSim:
CSCStripElectronicsSim CSCWireElectronicsSim

Public Types

typedef std::map< int,
CSCAnalogSignal, std::less
< int > > 
CSCSignalMap
 
typedef edm::DetSet
< StripDigiSimLink
DigiSimLinks
 

Public Member Functions

const DigiSimLinksdigiSimLinks () 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 ()
 

Protected Types

enum  { NONE, CONSERVATIVE, RADICAL }
 
typedef std::multimap< int,
CSCDetectorHit, std::less< int > > 
DetectorHitMap
 

Protected Member Functions

CSCAnalogSignaladd (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 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 ()
 
CSCAnalogSignalfind (int element, CLHEP::HepRandomEngine *)
 
virtual void initParameters ()=0
 
CSCDetId layerId () const
 the CSCDetId corresponding to the current layer More...
 
virtual CSCAnalogSignal makeNoiseSignal (int element, CLHEP::HepRandomEngine *)
 
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 CSCLayertheLayer
 
const CSCLayerGeometrytheLayerGeometry
 
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 CSCChamberSpecstheSpecs
 
std::vector< double > theTimingCalibrationError
 

Detailed Description

Commonalities between CSCStripElectronicsSim and CSCWireElectronicsSim.

Author
Rick Wilkinson

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 37 of file CSCBaseElectronicsSim.h.

Member Typedef Documentation

typedef std::map<int, CSCAnalogSignal, std::less<int> > CSCBaseElectronicsSim::CSCSignalMap

Definition at line 41 of file CSCBaseElectronicsSim.h.

typedef std::multimap<int, CSCDetectorHit, std::less<int> > CSCBaseElectronicsSim::DetectorHitMap
protected

Definition at line 161 of file CSCBaseElectronicsSim.h.

Definition at line 42 of file CSCBaseElectronicsSim.h.

Member Enumeration Documentation

anonymous enum
protected

Constructor & Destructor Documentation

CSCBaseElectronicsSim::~CSCBaseElectronicsSim ( )
virtual

Definition at line 41 of file CSCBaseElectronicsSim.cc.

CSCBaseElectronicsSim::CSCBaseElectronicsSim ( const edm::ParameterSet p)
protected

Definition at line 15 of file CSCBaseElectronicsSim.cc.

Member Function Documentation

CSCAnalogSignal & CSCBaseElectronicsSim::add ( const CSCAnalogSignal signal,
CLHEP::HepRandomEngine *  engine 
)
protected

Definition at line 170 of file CSCBaseElectronicsSim.cc.

Referenced by counter.Counter::register().

void CSCBaseElectronicsSim::addLinks ( int  channelIndex)
protectedvirtual

creates links from Digi to SimTrack disabled for now

Definition at line 188 of file CSCBaseElectronicsSim.cc.

void CSCBaseElectronicsSim::addNoise ( CLHEP::HepRandomEngine *  engine)
protected

Definition at line 135 of file CSCBaseElectronicsSim.cc.

CSCAnalogSignal CSCBaseElectronicsSim::amplifySignal ( const CSCDetectorHit detectorHit)
protected

Definition at line 111 of file CSCBaseElectronicsSim.cc.

double CSCBaseElectronicsSim::averageTimeOfFlight ( const DetId detId) const
protected

the average time-of-flight from the interaction point to the given detector

virtual float CSCBaseElectronicsSim::calculateAmpResponse ( float  t) const
protectedpure virtual
virtual int CSCBaseElectronicsSim::channelIndex ( int  channel) const
inlineprotectedvirtual

lets users map channels to different indices for links

Reimplemented in CSCWireElectronicsSim.

Definition at line 105 of file CSCBaseElectronicsSim.h.

105 {return channel;}
void CSCBaseElectronicsSim::combineAnalogSignals ( const std::vector< CSCAnalogSignal > &  )
protected
const DigiSimLinks& CSCBaseElectronicsSim::digiSimLinks ( ) const
inline

Definition at line 50 of file CSCBaseElectronicsSim.h.

References theDigiSimLinks.

50 {return theDigiSimLinks;}
void CSCBaseElectronicsSim::fillAmpResponse ( )
protected

Definition at line 92 of file CSCBaseElectronicsSim.cc.

CSCAnalogSignal & CSCBaseElectronicsSim::find ( int  element,
CLHEP::HepRandomEngine *  engine 
)
protected

Definition at line 149 of file CSCBaseElectronicsSim.cc.

virtual void CSCBaseElectronicsSim::initParameters ( )
protectedpure virtual
CSCDetId CSCBaseElectronicsSim::layerId ( ) const
inlineprotected

the CSCDetId corresponding to the current layer

Definition at line 108 of file CSCBaseElectronicsSim.h.

References theLayerId.

108 {return theLayerId;}
CSCAnalogSignal CSCBaseElectronicsSim::makeNoiseSignal ( int  element,
CLHEP::HepRandomEngine *   
)
protectedvirtual

Reimplemented in CSCStripElectronicsSim.

Definition at line 128 of file CSCBaseElectronicsSim.cc.

virtual int CSCBaseElectronicsSim::readoutElement ( int  element) const
protectedpure virtual
void CSCBaseElectronicsSim::setLayer ( const CSCLayer layer)
protected

Definition at line 80 of file CSCBaseElectronicsSim.cc.

void CSCBaseElectronicsSim::setLayerId ( const CSCDetId id)
inline

for standalone apps who don't calculate it from the geometry

Definition at line 55 of file CSCBaseElectronicsSim.h.

References theLayerId.

void CSCBaseElectronicsSim::setNoise ( float  rmsNoise,
float  noiseSigmaThreshold 
)
protected
void CSCBaseElectronicsSim::setSignalTimeRange ( double  startTime,
double  stopTime 
)
inlineprotected

How long before & after the bunch crossing to simulate shortening the time can save CPU

Definition at line 81 of file CSCBaseElectronicsSim.h.

References dcs_trend_monitor_cfg::startTime, theSignalStartTime, and theSignalStopTime.

float CSCBaseElectronicsSim::signalDelay ( int  element,
float  pos 
) const
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 178 of file CSCBaseElectronicsSim.cc.

void CSCBaseElectronicsSim::simulate ( const CSCLayer layer,
const std::vector< CSCDetectorHit > &  inputHits,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 46 of file CSCBaseElectronicsSim.cc.

Member Data Documentation

bool CSCBaseElectronicsSim::doNoise_
protected

Definition at line 158 of file CSCBaseElectronicsSim.h.

int CSCBaseElectronicsSim::nElements
protected

Definition at line 133 of file CSCBaseElectronicsSim.h.

CSCAnalogSignal CSCBaseElectronicsSim::theAmpResponse
protected

Definition at line 122 of file CSCBaseElectronicsSim.h.

float CSCBaseElectronicsSim::theBunchSpacing
protected

Definition at line 125 of file CSCBaseElectronicsSim.h.

std::vector<double> CSCBaseElectronicsSim::theBunchTimingOffsets
protected

Definition at line 140 of file CSCBaseElectronicsSim.h.

DetectorHitMap CSCBaseElectronicsSim::theDetectorHitMap
protected

Definition at line 162 of file CSCBaseElectronicsSim.h.

DigiSimLinks CSCBaseElectronicsSim::theDigiSimLinks
protected

Definition at line 163 of file CSCBaseElectronicsSim.h.

Referenced by digiSimLinks().

const CSCLayer* CSCBaseElectronicsSim::theLayer
protected

Definition at line 118 of file CSCBaseElectronicsSim.h.

const CSCLayerGeometry* CSCBaseElectronicsSim::theLayerGeometry
protected

Definition at line 117 of file CSCBaseElectronicsSim.h.

CSCDetId CSCBaseElectronicsSim::theLayerId
protected

Definition at line 119 of file CSCBaseElectronicsSim.h.

Referenced by layerId(), and setLayerId().

bool CSCBaseElectronicsSim::theNoiseWasAdded
protected

Definition at line 130 of file CSCBaseElectronicsSim.h.

int CSCBaseElectronicsSim::theNumberOfSamples
protected

Definition at line 150 of file CSCBaseElectronicsSim.h.

int CSCBaseElectronicsSim::theOffsetOfBxZero
protected

Definition at line 153 of file CSCBaseElectronicsSim.h.

float CSCBaseElectronicsSim::thePeakTimeSigma
protected

Definition at line 137 of file CSCBaseElectronicsSim.h.

float CSCBaseElectronicsSim::theSamplingTime
protected

Definition at line 147 of file CSCBaseElectronicsSim.h.

int CSCBaseElectronicsSim::theShapingTime
protected

Definition at line 136 of file CSCBaseElectronicsSim.h.

CSCSignalMap CSCBaseElectronicsSim::theSignalMap
protected

Definition at line 121 of file CSCBaseElectronicsSim.h.

std::vector<double> CSCBaseElectronicsSim::theSignalPropagationSpeed
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 156 of file CSCBaseElectronicsSim.h.

float CSCBaseElectronicsSim::theSignalStartTime
protected

Definition at line 143 of file CSCBaseElectronicsSim.h.

Referenced by setSignalTimeRange().

float CSCBaseElectronicsSim::theSignalStopTime
protected

Definition at line 144 of file CSCBaseElectronicsSim.h.

Referenced by setSignalTimeRange().

const CSCChamberSpecs* CSCBaseElectronicsSim::theSpecs
protected

Definition at line 116 of file CSCBaseElectronicsSim.h.

std::vector<double> CSCBaseElectronicsSim::theTimingCalibrationError
protected

Definition at line 157 of file CSCBaseElectronicsSim.h.