CMS 3D CMS Logo

CSCMotherboard.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCMotherboard_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCMotherboard_h
3 
46 
47 class CSCMotherboard : public CSCBaseboard {
48 public:
50  CSCMotherboard(unsigned endcap,
51  unsigned station,
52  unsigned sector,
53  unsigned subsector,
54  unsigned chamber,
55  const edm::ParameterSet& conf);
56 
58  ~CSCMotherboard() override = default;
59 
62  void run(const CSCWireDigiCollection* wiredc, const CSCComparatorDigiCollection* compdc);
63 
64  /*
65  Returns vector of good correlated LCTs in the read-out time window.
66  LCTs in the BX window [early_tbins,...,late_tbins] are considered
67  good for physics. The central LCT BX is time bin 8.
68  - tmb_l1a_window_size = 7 (Run-1, Run-2) -> [5, 6, 7, 8, 9, 10, 11]
69  - tmb_l1a_window_size = 5 (Run-3) -> [6, 7, 8, 9, 10]
70  - tmb_l1a_window_size = 3 (Run-4?) -> [7, 8, 9]
71 
72  Note, this function does not have an exact counterpart in the
73  firmware. The reason is that the DAQ of LCTs is not correctly
74  simulated in CMSSW - at least the simulation of the L1-accept.
75  So, this function corresponds to both the trigger path and the
76  DAQ path in the firmware. In general, the function will return
77  LCTs that would not be used in the OMTF or EMTF emulator,
78  because they are out-of-time relative for tracking purposes. For
79  instance an LCT with BX5 would be read out by the DAQ, but would
80  likely not be used by the EMTF.
81  */
82  virtual std::vector<CSCCorrelatedLCTDigi> readoutLCTs() const;
83 
84  // LCT selection: at most 2 in each BX
85  void selectLCTs();
86 
89 
92  void clear();
93 
95  void setConfigParameters(const CSCDBL1TPParameters* conf);
96 
98  std::unique_ptr<CSCAnodeLCTProcessor> alctProc;
99 
101  std::unique_ptr<CSCCathodeLCTProcessor> clctProc;
102 
103  // VK: change to protected, to allow inheritance
104 protected:
105  /* Containers for reconstructed ALCTs and CLCTs */
106  std::vector<CSCALCTDigi> alctV;
107  std::vector<CSCCLCTDigi> clctV;
108 
111 
112  /* Container with sorted and selected LCTs */
113  std::vector<CSCCorrelatedLCTDigi> lctV;
114 
116 
117  // helper function to return ALCT/CLCT with correct central BX
120 
122  unsigned int mpc_block_me1a;
125 
128 
131 
134 
135  // when set to true, ignore CLCTs found in later BX's
137 
138  // encode special bits for high-multiplicity triggers
139  unsigned showerSource_;
140 
141  /*
142  Preferential index array in matching window, relative to the ALCT BX.
143  Where the central match BX goes first,
144  then the closest early, the closest late, etc.
145  */
146  std::vector<int> preferred_bx_match_;
147 
149  static const unsigned int def_mpc_block_me1a;
150  static const unsigned int def_alct_trig_enable, def_clct_trig_enable;
152  static const unsigned int def_tmb_l1a_window_size;
153 
154  /* quality assignment */
155  std::unique_ptr<LCTQualityAssignment> qualityAssignment_;
156 
157  /* quality control */
158  std::unique_ptr<LCTQualityControl> qualityControl_;
159 
160  /*
161  Helper class to check if an ALCT intersects with a CLCT. Normally
162  this class should not be used. It is left in the code as a potential
163  improvement for ME1/1 when unphysical LCTs are not desired. This
164  function is not implemented in the firmware.
165  */
166  std::unique_ptr<CSCALCTCrossCLCT> cscOverlap_;
167 
169  void checkConfigParameters();
170 
171  /*
172  This function matches maximum two ALCTs with maximum two CLCTs in
173  a bunch crossing. The best ALCT is considered the one with the highest
174  quality in a BX. Similarly for the best CLCT. If there is just one
175  ALCT and just one CLCT, the correlated LCT is made from those two
176  components. If there are exactly two ALCTs and two CLCTs, the best
177  LCT and second best LCT are formed from the best ALCT-CLCT combination
178  and the second best ALCT-CLCT combination. In case there is missing
179  information (e.g. second best ALCT, but no second best CLCT), information
180  is copied over.
181  */
182  void correlateLCTs(const CSCALCTDigi& bestALCT,
183  const CSCALCTDigi& secondALCT,
184  const CSCCLCTDigi& bestCLCT,
185  const CSCCLCTDigi& secondCLCT,
186  CSCCorrelatedLCTDigi& bLCT,
187  CSCCorrelatedLCTDigi& sLCT,
188  int type) const;
189 
190  /*
191  This method calculates all the TMB words and then passes them to the
192  constructor of correlated LCTs. The LCT data members are filled with
193  information from the ALCT-CLCT combination.
194  */
195  void constructLCTs(
196  const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT, int type, int trknmb, CSCCorrelatedLCTDigi& lct) const;
197 
198  /*
199  This function copies valid ALCT/CLCT information to invalid the ALCT/CLCT
200  if present, so that we always construct the maximum number of valid LCts
201  */
203 
204  // CLCT pattern number: encodes the pattern number itself
205  unsigned int encodePattern(const int clctPattern) const;
206 
208  void dumpConfigParams() const;
209 
210  /* encode high multiplicity bits for Run-3 exotic triggers */
212 };
213 #endif
CSCMotherboard::run
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc)
Definition: CSCMotherboard.cc:124
CSCShowerDigi.h
CSCDBL1TPParameters
Definition: CSCDBL1TPParameters.h:14
CSCMotherboard::qualityControl_
std::unique_ptr< LCTQualityControl > qualityControl_
Definition: CSCMotherboard.h:158
CSCMotherboard::selectLCTs
void selectLCTs()
Definition: CSCMotherboard.cc:468
CSCMotherboard::readoutShower
CSCShowerDigi readoutShower() const
Definition: CSCMotherboard.cc:344
CSCMotherboard::match_trig_window_size
unsigned int match_trig_window_size
Definition: CSCMotherboard.h:124
CSCMotherboard::copyValidToInValid
void copyValidToInValid(CSCALCTDigi &, CSCALCTDigi &, CSCCLCTDigi &, CSCCLCTDigi &) const
Definition: CSCMotherboard.cc:405
CSCMotherboard::CSCMotherboard
CSCMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
Definition: CSCMotherboard.cc:13
CSCMotherboard::def_clct_trig_enable
static const unsigned int def_clct_trig_enable
Definition: CSCMotherboard.h:150
CSCMotherboard::mpc_block_me1a
unsigned int mpc_block_me1a
Definition: CSCMotherboard.h:122
CSCMotherboard::lctV
std::vector< CSCCorrelatedLCTDigi > lctV
Definition: CSCMotherboard.h:113
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCMotherboard::alctProc
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
Definition: CSCMotherboard.h:98
CSCShowerDigi
Definition: CSCShowerDigi.h:9
CSCMotherboard::allLCTs_
LCTContainer allLCTs_
Definition: CSCMotherboard.h:110
LCTContainer
Definition: LCTContainer.h:20
CSCCorrelatedLCTDigi.h
CSCMotherboard::def_alct_trig_enable
static const unsigned int def_alct_trig_enable
Definition: CSCMotherboard.h:150
CSCMotherboard
Definition: CSCMotherboard.h:47
CSCMotherboard::clear
void clear()
Definition: CSCMotherboard.cc:82
CSCMotherboard::clct_trig_enable
unsigned int clct_trig_enable
Definition: CSCMotherboard.h:123
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCMotherboard::~CSCMotherboard
~CSCMotherboard() override=default
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
CSCMotherboard::checkConfigParameters
void checkConfigParameters()
Definition: CSCMotherboard.cc:498
CSCMotherboard::clctV
std::vector< CSCCLCTDigi > clctV
Definition: CSCMotherboard.h:107
CSCMotherboard::match_earliest_clct_only_
bool match_earliest_clct_only_
Definition: CSCMotherboard.h:136
CSCMotherboard::clctProc
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
Definition: CSCMotherboard.h:101
CSCMotherboard::correlateLCTs
void correlateLCTs(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &bLCT, CSCCorrelatedLCTDigi &sLCT, int type) const
Definition: CSCMotherboard.cc:346
CSCMotherboard::alctV
std::vector< CSCALCTDigi > alctV
Definition: CSCMotherboard.h:106
CSCMotherboard::dumpConfigParams
void dumpConfigParams() const
Definition: CSCMotherboard.cc:521
CSCMotherboard::def_tmb_l1a_window_size
static const unsigned int def_tmb_l1a_window_size
Definition: CSCMotherboard.h:152
CSCCathodeLCTProcessor.h
CSCAnodeLCTProcessor.h
CSCMotherboard::cscOverlap_
std::unique_ptr< CSCALCTCrossCLCT > cscOverlap_
Definition: CSCMotherboard.h:166
edm::ParameterSet
Definition: ParameterSet.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
CSCBaseboard
Definition: CSCBaseboard.h:14
LCTContainer.h
CSCMotherboard::preferred_bx_match_
std::vector< int > preferred_bx_match_
Definition: CSCMotherboard.h:146
CSCMotherboard::shower_
CSCShowerDigi shower_
Definition: CSCMotherboard.h:115
CSCMotherboard::early_tbins
int early_tbins
Definition: CSCMotherboard.h:130
CSCUpgradeCathodeLCTProcessor.h
CSCUpgradeAnodeLCTProcessor.h
CSCComparatorDigiCollection
CSCMotherboard::readout_earliest_2
bool readout_earliest_2
Definition: CSCMotherboard.h:133
CSCMotherboard::drop_used_clcts
bool drop_used_clcts
Definition: CSCMotherboard.h:127
CSCMotherboard::readoutLCTs
virtual std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const
Definition: CSCMotherboard.cc:247
CSCMotherboard::getBXShiftedCLCT
CSCCLCTDigi getBXShiftedCLCT(const CSCCLCTDigi &) const
Definition: CSCMotherboard.cc:543
CSCMotherboard::tmb_l1a_window_size
unsigned int tmb_l1a_window_size
Definition: CSCMotherboard.h:124
CSCWireDigiCollection
LCTQualityAssignment.h
CSCMotherboard::setConfigParameters
void setConfigParameters(const CSCDBL1TPParameters *conf)
Definition: CSCMotherboard.cc:101
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCMotherboard::alct_trig_enable
unsigned int alct_trig_enable
Definition: CSCMotherboard.h:123
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
CSCMotherboard::showerSource_
unsigned showerSource_
Definition: CSCMotherboard.h:139
CSCMotherboard::encodePattern
unsigned int encodePattern(const int clctPattern) const
Definition: CSCMotherboard.cc:459
CSCMotherboard::constructLCTs
void constructLCTs(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, int type, int trknmb, CSCCorrelatedLCTDigi &lct) const
Definition: CSCMotherboard.cc:428
CSCMotherboard::def_match_trig_window_size
static const unsigned int def_match_trig_window_size
Definition: CSCMotherboard.h:151
CSCALCTCrossCLCT.h
CSCMotherboard::def_mpc_block_me1a
static const unsigned int def_mpc_block_me1a
Definition: CSCMotherboard.h:149
CSCMotherboard::def_match_trig_enable
static const unsigned int def_match_trig_enable
Definition: CSCMotherboard.h:151
CSCMotherboard::match_trig_enable
unsigned int match_trig_enable
Definition: CSCMotherboard.h:123
CSCMotherboard::getBXShiftedALCT
CSCALCTDigi getBXShiftedALCT(const CSCALCTDigi &) const
Definition: CSCMotherboard.cc:537
CSCMotherboard::encodeHighMultiplicityBits
void encodeHighMultiplicityBits()
Definition: CSCMotherboard.cc:549
CSCMotherboard::qualityAssignment_
std::unique_ptr< LCTQualityAssignment > qualityAssignment_
Definition: CSCMotherboard.h:155
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19