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> readoutCLCTsME1a();
88  std::vector<CSCCLCTDigi> readoutCLCTsME1b();
89 
91  std::vector<CSCCLCTDigi> getCLCTs();
92 
93  std::vector<int> preTriggerBXs() const {return thePreTriggerBXs;}
94 
95  std::vector<CSCCLCTPreTriggerDigi> preTriggerDigis() const {return thePreTriggerDigis; }
96 
98  std::vector<CSCCLCTPreTriggerDigi> preTriggerDigisME1a();
99  std::vector<CSCCLCTPreTriggerDigi> preTriggerDigisME1b();
100 
104 
105  // we use these next ones to address the various bits inside the array that's
106  // used to make the cathode LCTs.
115 
116  private:
121  int infoV;
122 
124  const unsigned theEndcap;
125  const unsigned theStation;
126  const unsigned theSector;
127  const unsigned theSubsector;
128  const unsigned theTrigChamber;
129 
131 
132  // holders for easy access:
133  unsigned int theRing;
134  unsigned int theChamber;
135  bool isME11;
136 
139 
140  std::vector<CSCComparatorDigi> digiV[CSCConstants::NUM_LAYERS];
141  std::vector<int> thePreTriggerBXs;
142  std::vector<CSCCLCTPreTriggerDigi> thePreTriggerDigis;
143 
145  bool isSLHC;
146 
150  unsigned int alctClctOffset;
151 
153  unsigned int fifo_tbins, fifo_pretrig; // only for test beam mode.
154  unsigned int hit_persist, drift_delay;
157  unsigned int tmb_l1a_window_size;
158 
161 
164 
167 
170  unsigned int clct_state_machine_zone; // +- around a keystrip
171  bool dynamic_state_machine_zone; //use a pattern dependent zone
172 
174  unsigned int pretrig_trig_zone;
175 
178 
181 
183  static const unsigned int def_fifo_tbins, def_fifo_pretrig;
184  static const unsigned int def_hit_persist, def_drift_delay;
185  static const unsigned int def_nplanes_hit_pretrig;
186  static const unsigned int def_nplanes_hit_pattern;
187  static const unsigned int def_pid_thresh_pretrig, def_min_separation;
188  static const unsigned int def_tmb_l1a_window_size;
189 
192 
194  void checkConfigParameters();
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 nStrips) const;
227 };
228 
229 #endif
static const unsigned int def_drift_delay
CSCCLCTDigi bestCLCT[CSCConstants::MAX_CLCT_TBINS]
void dumpDigis(const std::vector< int > strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips) const
std::vector< CSCCLCTDigi > readoutCLCTs()
static const unsigned int def_fifo_tbins
bool ispretrig[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
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])
std::vector< CSCCLCTPreTriggerDigi > preTriggerDigisME1a()
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< CSCCLCTDigi > readoutCLCTsME1a()
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)
std::vector< CSCCLCTDigi > readoutCLCTsME1b()
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< CSCCLCTPreTriggerDigi > preTriggerDigisME1b()
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)