1 #ifndef MU_END_BASE_ELECTRONICS_SIM_H 2 #define MU_END_BASE_ELECTRONICS_SIM_H 34 class HepRandomEngine;
41 typedef std::map<int, CSCAnalogSignal, std::less<int> >
CSCSignalMap;
46 void simulate(
const CSCLayer * layer,
47 const std::vector<CSCDetectorHit> & inputHits,
48 CLHEP::HepRandomEngine*);
50 const DigiSimLinks &
digiSimLinks()
const {
return theDigiSimLinks;}
61 void setLayer(
const CSCLayer * layer);
63 virtual void initParameters() = 0;
65 void fillAmpResponse();
66 virtual float calculateAmpResponse(
float t)
const = 0;
72 virtual int readoutElement(
int element)
const = 0;
75 void combineAnalogSignals(
const std::vector<CSCAnalogSignal> &);
77 void setNoise(
float rmsNoise,
float noiseSigmaThreshold);
82 theSignalStartTime = startTime;
83 theSignalStopTime = stopTime;
86 void addNoise(CLHEP::HepRandomEngine*);
93 virtual CSCAnalogSignal makeNoiseSignal(
int element, CLHEP::HepRandomEngine*);
98 virtual float signalDelay(
int element,
float pos)
const;
102 virtual void addLinks(
int channelIndex);
111 double averageTimeOfFlight(
const DetId & detId)
const;
114 enum {
NONE, CONSERVATIVE, RADICAL};
std::vector< double > theBunchTimingOffsets
const CSCLayer * theLayer
const CSCChamberSpecs * theSpecs
CSCSignalMap theSignalMap
const CSCLayerGeometry * theLayerGeometry
std::multimap< int, CSCDetectorHit, std::less< int > > DetectorHitMap
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
std::map< int, CSCAnalogSignal, std::less< int > > CSCSignalMap
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const DigiSimLinks & digiSimLinks() const
CSCAnalogSignal theAmpResponse
void setLayerId(const CSCDetId &id)
for standalone apps who don't calculate it from the geometry
std::vector< double > theSignalPropagationSpeed
edm::DetSet< StripDigiSimLink > DigiSimLinks
DetectorHitMap theDetectorHitMap
void setSignalTimeRange(double startTime, double stopTime)
CSCDetId layerId() const
the CSCDetId corresponding to the current layer
DigiSimLinks theDigiSimLinks
virtual int channelIndex(int channel) const
lets users map channels to different indices for links
std::vector< double > theTimingCalibrationError