CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCStripElectronicsSim.h
Go to the documentation of this file.
1 #ifndef MU_END_STRIP_ELECTRONICS_SIM_H
2 #define MU_END_STRIP_ELECTRONICS_SIM_H
3 
15 
16 class CSCDetectorHit;
17 class CSCComparatorDigi;
19 class CSCStripConditions;
20 #include <vector>
21 #include <string>
22 
24 {
25 public:
27  explicit CSCStripElectronicsSim(const edm::ParameterSet & p);
28 
29  virtual ~CSCStripElectronicsSim();
30 
31  void fillDigis(CSCStripDigiCollection & digis,
32  CSCComparatorDigiCollection & comparators);
33 
34  void fillMissingLayer(const CSCLayer * layer, const CSCComparatorDigiCollection & comparators,
35  CSCStripDigiCollection & digis);
36 
38 
39  CSCAnalogSignal makeNoiseSignal(int element);
40 
41  void createDigi(int istrip, const CSCAnalogSignal & signal, std::vector<CSCStripDigi> & result);
42 
43 private:
45  void initParameters();
46 
47  virtual int readoutElement(int strip) const;
48 
49  float calculateAmpResponse(float t) const;
51 
52  void runComparator(std::vector<CSCComparatorDigi> & result);
53 
55  float comparatorReading(const CSCAnalogSignal & signal, float time) const;
56 
57  // tells which strips to read out around the input strip
58  void getReadoutRange(int inputStrip,
59  int & minStrip, int & maxStrip);
60 
62  std::list<int>
63  getKeyStrips(const std::vector<CSCComparatorDigi> & comparators) const;
64 
66  std::list<int>
67  getKeyStripsFromMC() const;
70  std::list<int>
71  channelsToRead(const std::list<int> & keyStrips, int window) const;
72 
73  void fillStripDigis(const std::list<int> & keyStrips,
74  CSCStripDigiCollection & digis);
75 
76  void addCrosstalk();
77  void addCrosstalk(const CSCAnalogSignal & signal,
78  int thisStrip, int otherStrip);
79 
80 
81  void selfTest() const;
82 
83  // saturation of the 12-bit ADC. Max reading is 4095
84  void doSaturation(CSCStripDigi & digi);
85 
86  // useful constants
87  float theComparatorThreshold; // in fC
90  // note that we don't implement the effect of the x3.5 amplifier
92  // all of these times are in nanoseconds
96  // save the calculation of time-of-flight+drift+shaping
98 
99  int nScaBins_;
104 
106  // the length of each SCA time bin, in ns. 50 by default
108  // the SCA bin which holds the peak signal. 4, by default.
109  // that's really the 5th, since We start counting at 0
111  // which time bin the trigger crossing goes in
113  // to center comparator signals
116  // tweaks the timing of the SCA
117  std::vector<double> theSCATimingOffsets;
118  // remeber toe TOF correction in comparators,
119  // so we can undo it for SCA
121 };
122 
123 #endif
124 
def window
Definition: svgfig.py:642
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
float comparatorReading(const CSCAnalogSignal &signal, float time) const
calculates the comparator reading, including saturation and offsets
std::list< int > getKeyStripsFromMC() const
get ths strips that have detector hits
void fillMissingLayer(const CSCLayer *layer, const CSCComparatorDigiCollection &comparators, CSCStripDigiCollection &digis)
float calculateAmpResponse(float t) const
void getReadoutRange(int inputStrip, int &minStrip, int &maxStrip)
void fillStripDigis(const std::list< int > &keyStrips, CSCStripDigiCollection &digis)
void setStripConditions(CSCStripConditions *cond)
CSCAnalogSignal makeNoiseSignal(int element)
CSCStripConditions * theStripConditions
std::vector< double > theSCATimingOffsets
void createDigi(int istrip, const CSCAnalogSignal &signal, std::vector< CSCStripDigi > &result)
std::list< int > channelsToRead(const std::list< int > &keyStrips, int window) const
tuple result
Definition: query.py:137
void runComparator(std::vector< CSCComparatorDigi > &result)
CSCCrosstalkGenerator * theCrosstalkGenerator
void initParameters()
initialization for each layer
void doSaturation(CSCStripDigi &digi)
CSCStripElectronicsSim(const edm::ParameterSet &p)
configurable parameters
std::list< int > getKeyStrips(const std::vector< CSCComparatorDigi > &comparators) const
finds the key strips from these comparators
void fillDigis(CSCStripDigiCollection &digis, CSCComparatorDigiCollection &comparators)
virtual int readoutElement(int strip) const
CSCStripAmpResponse theAmpResponse