CMS 3D CMS Logo

CSCCathodeLCTProcessor.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCCathodeLCTProcessor_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCCathodeLCTProcessor_h
3 
39 
40 #include <vector>
41 
42 class CSCGeometry;
43 
45 {
46  public:
48  CSCCathodeLCTProcessor(unsigned endcap, unsigned station, unsigned sector,
49  unsigned subsector, unsigned chamber,
50  const edm::ParameterSet& conf,
51  const edm::ParameterSet& comm,
52  const edm::ParameterSet& ctmb);
53 
56 
58  void setConfigParameters(const CSCDBL1TPParameters* conf);
59 
61  void clear();
62 
63  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
64 
67  std::vector<CSCCLCTDigi> run(const CSCComparatorDigiCollection* compdc);
68 
71  void run(const std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
72 
74  bool getDigis(const CSCComparatorDigiCollection* compdc);
75  void getDigis(const CSCComparatorDigiCollection* compdc, const CSCDetId& id);
76 
79 
82 
84  std::vector<CSCCLCTDigi> readoutCLCTs();
85 
87  std::vector<CSCCLCTDigi> getCLCTs();
88 
89  std::vector<int> preTriggerBXs() const {return thePreTriggerBXs;}
90 
91  std::vector<CSCCLCTPreTriggerDigi> preTriggerDigis() const {return thePreTriggerDigis; }
92 
96  void setRing(unsigned r) {theRing = r;}
97 
101 
102  // we use these next ones to address the various bits inside the array that's
103  // used to make the cathode LCTs.
112 
113  private:
118  int infoV;
119 
121  const unsigned theEndcap;
122  const unsigned theStation;
123  const unsigned theSector;
124  const unsigned theSubsector;
125  const unsigned theTrigChamber;
126 
128 
129  // holders for easy access:
130  unsigned int theRing;
131  unsigned int theChamber;
132  bool isME11;
133 
136 
137  std::vector<CSCComparatorDigi> digiV[CSCConstants::NUM_LAYERS];
138  std::vector<int> thePreTriggerBXs;
139  std::vector<CSCCLCTPreTriggerDigi> thePreTriggerDigis;
140 
142  bool isSLHC;
143 
147  unsigned int alctClctOffset;
148 
150  unsigned int fifo_tbins, fifo_pretrig; // only for test beam mode.
151  unsigned int hit_persist, drift_delay;
154  unsigned int tmb_l1a_window_size;
155 
158 
161 
164 
167  unsigned int clct_state_machine_zone; // +- around a keystrip
168  bool dynamic_state_machine_zone; //use a pattern dependent zone
169 
171  unsigned int pretrig_trig_zone;
172 
175 
178 
180  static const unsigned int def_fifo_tbins, def_fifo_pretrig;
181  static const unsigned int def_hit_persist, def_drift_delay;
182  static const unsigned int def_nplanes_hit_pretrig;
183  static const unsigned int def_nplanes_hit_pattern;
184  static const unsigned int def_pid_thresh_pretrig, def_min_separation;
185  static const unsigned int def_tmb_l1a_window_size;
186 
189 
191  void checkConfigParameters();
192 
194  static const int cfeb_strips[2];
195 
196  //---------------- Methods common to all firmware versions ------------------
197  void readComparatorDigis(std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
198  void pulseExtension(const std::vector<int> time[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
199  const int nStrips,
200  unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
201 
202  //--------------- Functions for 2007 version of the firmware ----------------
203  std::vector<CSCCLCTDigi> findLCTs(const std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
204  bool preTrigger(const unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
205  const int start_bx, int& first_bx);
206  bool ptnFinding(const unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
207  const int nStrips, const unsigned int bx_time);
208  void markBusyKeys(const int best_hstrip, const int best_patid,
209  int quality[CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
210 
214 
215  //--------------- Functions for SLHC studies ----------------
216  std::vector<CSCCLCTDigi> findLCTsSLHC(const std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]);
217 
219 
220  //--------------------------- Auxiliary methods -----------------------------
222  void dumpConfigParams() const;
223 
225  void dumpDigis(const std::vector<int> strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
226  const int stripType, const int nStrips) const;
227 
228  //--------------------------- Methods for tests -----------------------------
229  void testLCTs();
230 };
231 
232 #endif
static const unsigned int def_drift_delay
CSCCLCTDigi bestCLCT[CSCConstants::MAX_CLCT_TBINS]
std::vector< CSCCLCTDigi > readoutCLCTs()
static const unsigned int def_fifo_tbins
bool ispretrig[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
static const int cfeb_strips[2]
std::vector< CSCCLCTDigi > findLCTs(const std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
int first_bx_corrected[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
static const int pattern2007_offset[CSCConstants::MAX_HALFSTRIPS_IN_PATTERN]
static const unsigned int def_min_separation
static const unsigned int def_nplanes_hit_pretrig
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
bool preTrigger(const unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int start_bx, int &first_bx)
static const unsigned int def_pid_thresh_pretrig
unsigned int best_pid[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
void markBusyKeys(const int best_hstrip, const int best_patid, int quality[CSCConstants::NUM_HALF_STRIPS_7CFEBS])
void readComparatorDigis(std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
void dumpDigis(const std::vector< int > strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int stripType, const int nStrips) const
static const int pattern2007[CSCConstants::NUM_CLCT_PATTERNS][CSCConstants::MAX_HALFSTRIPS_IN_PATTERN+2]
static const unsigned int def_tmb_l1a_window_size
void setCSCGeometry(const CSCGeometry *g)
bool getDigis(const CSCComparatorDigiCollection *compdc)
static const unsigned int def_nplanes_hit_pattern
std::vector< CSCCLCTPreTriggerDigi > thePreTriggerDigis
bool ptnFinding(const unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips, const unsigned int bx_time)
double pulse(double x, double y, double z, double t)
std::vector< int > preTriggerBXs() const
static const unsigned int def_fifo_pretrig
std::vector< int > thePreTriggerBXs
static const unsigned int def_hit_persist
int stagger[CSCConstants::NUM_LAYERS]
unsigned int nhits[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
std::vector< CSCCLCTDigi > run(const CSCComparatorDigiCollection *compdc)
CSCCLCTDigi secondCLCT[CSCConstants::MAX_CLCT_TBINS]
std::vector< CSCComparatorDigi > digiV[CSCConstants::NUM_LAYERS]
void pulseExtension(const std::vector< int > time[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips, unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
std::vector< CSCCLCTDigi > findLCTsSLHC(const std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
std::vector< CSCCLCTPreTriggerDigi > preTriggerDigis() const
std::vector< CSCCLCTDigi > getCLCTs()
void setConfigParameters(const CSCDBL1TPParameters *conf)