CMS 3D CMS Logo

CSCAnodeLCTProcessor.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCAnodeLCTProcessor_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCAnodeLCTProcessor_h
3 
24 
25 #include <vector>
26 
28 {
29  public:
31  CSCAnodeLCTProcessor(unsigned endcap, unsigned station, unsigned sector,
32  unsigned subsector, unsigned chamber,
33  const edm::ParameterSet& conf,
34  const edm::ParameterSet& comm);
35 
38 
40  void setConfigParameters(const CSCDBL1TPParameters* conf);
41 
43  void clear();
44 
47  std::vector<CSCALCTDigi> run(const CSCWireDigiCollection* wiredc);
48 
51  void run(const std::vector<int> wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]);
52 
54  bool getDigis(const CSCWireDigiCollection* wiredc);
55  void getDigis(const CSCWireDigiCollection* wiredc, const CSCDetId& id);
56 
58  enum {MAX_ALCT_BINS = 16};
59 
66 
69 
71  std::vector<CSCALCTDigi> readoutALCTs();
72 
74  std::vector<CSCALCTDigi> getALCTs();
75 
77  void setRing(unsigned r) {theRing = r;}
78 
80  enum {NUM_PATTERN_WIRES = 14};
85  static const int time_weights[NUM_PATTERN_WIRES];
86 
87  private:
92  int infoV;
93 
95  const unsigned theEndcap;
96  const unsigned theStation;
97  const unsigned theSector;
98  const unsigned theSubsector;
99  const unsigned theTrigChamber;
100 
102  unsigned theRing;
103 
104  unsigned theChamber;
105 
106  bool isME11;
107 
110 
114  std::vector<CSCWireDigi> digiV[CSCConstants::NUM_LAYERS];
116 
118  bool isMTCC;
119 
121  bool isTMB07;
122 
124  bool isSLHC;
125 
131 
133  unsigned int hit_persist;
134 
137 
140 
143 
147 
150 
153 
156 
159 
162 
164  static const unsigned int def_fifo_tbins, def_fifo_pretrig;
165  static const unsigned int def_drift_delay;
167  static const unsigned int def_nplanes_hit_accel_pretrig;
168  static const unsigned int def_nplanes_hit_accel_pattern;
169  static const unsigned int def_trig_mode, def_accel_mode;
170  static const unsigned int def_l1a_window_width;
171 
174 
176  void loadPatternMask();
177 
180 
182  void checkConfigParameters();
183 
185  void clear(const int wire, const int pattern);
186 
188  void readWireDigis(std::vector<int> wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]);
189  bool pulseExtension(const std::vector<int> wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]);
190  bool preTrigger(const int key_wire, const int start_bx);
191  bool patternDetection(const int key_wire);
192  void ghostCancellationLogic();
194  void lctSearch();
195  void trigMode(const int key_wire);
196  void accelMode(const int key_wire);
197 
198  std::vector<CSCALCTDigi>
199  bestTrackSelector(const std::vector<CSCALCTDigi>& all_alcts);
200  bool isBetterALCT(const CSCALCTDigi& lhsALCT, const CSCALCTDigi& rhsALCT);
201 
203  void dumpConfigParams() const;
204 
206  void dumpDigis(const std::vector<int> wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]) const;
207 
208  void showPatterns(const int key_wire);
209 };
210 
211 #endif
void showPatterns(const int key_wire)
void readWireDigis(std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES])
int quality[CSCConstants::MAX_NUM_WIRES][3]
int first_bx_corrected[CSCConstants::MAX_NUM_WIRES]
static const int time_weights[NUM_PATTERN_WIRES]
static const unsigned int def_drift_delay
static const unsigned int def_fifo_tbins
CSCALCTDigi bestALCT[MAX_ALCT_BINS]
CSCALCTDigi secondALCT[MAX_ALCT_BINS]
static const int pattern_mask_slim[CSCConstants::NUM_ALCT_PATTERNS][NUM_PATTERN_WIRES]
bool getDigis(const CSCWireDigiCollection *wiredc)
const unsigned theTrigChamber
void setConfigParameters(const CSCDBL1TPParameters *conf)
void trigMode(const int key_wire)
static const unsigned int def_accel_mode
static const unsigned int def_nplanes_hit_accel_pretrig
static const unsigned int def_fifo_pretrig
static const int pattern_mask_r1[CSCConstants::NUM_ALCT_PATTERNS][NUM_PATTERN_WIRES]
void accelMode(const int key_wire)
static const unsigned int def_nplanes_hit_pattern
static const int pattern_envelope[CSCConstants::NUM_ALCT_PATTERNS][NUM_PATTERN_WIRES]
bool preTrigger(const int key_wire, const int start_bx)
static const int pattern_mask_open[CSCConstants::NUM_ALCT_PATTERNS][NUM_PATTERN_WIRES]
bool pulseExtension(const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES])
static const unsigned int def_l1a_window_width
bool isBetterALCT(const CSCALCTDigi &lhsALCT, const CSCALCTDigi &rhsALCT)
static const unsigned int def_trig_mode
static const unsigned int def_nplanes_hit_accel_pattern
void setRing(unsigned r)
std::vector< CSCALCTDigi > readoutALCTs()
std::vector< CSCALCTDigi > bestTrackSelector(const std::vector< CSCALCTDigi > &all_alcts)
int first_bx[CSCConstants::MAX_NUM_WIRES]
void dumpDigis(const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]) const
unsigned int pulse[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES]
bool patternDetection(const int key_wire)
unsigned int nplanes_hit_accel_pattern
std::vector< CSCALCTDigi > run(const CSCWireDigiCollection *wiredc)
unsigned int pretrig_extra_deadtime
std::vector< CSCWireDigi > digiV[CSCConstants::NUM_LAYERS]
int pattern_mask[CSCConstants::NUM_ALCT_PATTERNS][NUM_PATTERN_WIRES]
std::vector< CSCALCTDigi > getALCTs()
static const unsigned int def_nplanes_hit_pretrig
unsigned int nplanes_hit_accel_pretrig