CMS 3D CMS Logo

MuxHToutputs.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_MuxHToutputs_h
2 #define L1Trigger_TrackFindingTMTT_MuxHToutputs_h
3 
6 
7 #include <vector>
8 #include <memory>
9 
10 //==================================================================================================
21 //==================================================================================================
22 
23 namespace tmtt {
24 
25  class Settings;
26 
27  class MuxHToutputs {
28  public:
29  enum class MuxAlgoName { None = 0, mBinPerLink = 1 };
30 
31  // Initialize constants from configuration parameters.
32  MuxHToutputs(const Settings* settings);
33 
34  // Determine which tracks are transmitted on each HT output optical link, taking into account the multiplexing
35  // of multiple (eta,phi) sectors onto single links and the truncation of the tracks caused by the requirement
36  // to output all the tracks within the time-multiplexed period.
37  // This function replaces the 2D track collection in the r-phi HT with the subset surviving the TM cut.
38  void exec(Array2D<std::unique_ptr<HTrphi>>& mHtRphis) const;
39 
40  // Determine number of optical links used to output tracks from each phi nonant
41  // (where "link" refers to a pair of links in the hardware).
42  unsigned int numLinksPerNonant() const {
43  unsigned int iCorr = (settings_->miniHTstage()) ? 1 : 0;
44  return numPhiSecPerNon_ * numEtaRegions_ * (busySectorMbinRanges_.size() - iCorr) / this->muxFactor();
45  }
46 
47  private:
48  // Define the number of (eta,phi) sectors that each output opto-link takes tracks from. (Depends on MUX scheme).
49  unsigned int muxFactor() const;
50 
51  // Define the MUX algorithm by which tracks from the specified m-bin range in the HT for a given (phi,eta)
52  // sector within a phi nonant are multiplexed onto a single output optical link.
53  unsigned int linkID(unsigned int iSecInNon, unsigned int iEtaReg, unsigned int mBinRange) const;
54 
55  // Do sanity check of the MUX algorithm implemented in linkID().
56  void sanityCheck();
57 
58  private:
59  const Settings* settings_; // Configuration parameters
60 
61  // Configuration parameters
63  unsigned int numPhiNonants_;
64  unsigned int numPhiSectors_;
65  unsigned int numPhiSecPerNon_;
66  unsigned int numEtaRegions_;
68  unsigned int busySectorNumStubs_;
69  std::vector<unsigned int> busySectorMbinRanges_;
71  };
72 
73 } // namespace tmtt
74 
75 #endif
bool miniHTstage() const
Definition: Settings.h:149
unsigned int numEtaRegions_
Definition: MuxHToutputs.h:66
void exec(Array2D< std::unique_ptr< HTrphi >> &mHtRphis) const
Definition: MuxHToutputs.cc:57
unsigned int busySectorNumStubs_
Definition: MuxHToutputs.h:68
MuxHToutputs(const Settings *settings)
Definition: MuxHToutputs.cc:19
std::vector< unsigned int > busySectorMbinRanges_
Definition: MuxHToutputs.h:69
unsigned int numLinksPerNonant() const
Definition: MuxHToutputs.h:42
unsigned int numPhiNonants_
Definition: MuxHToutputs.h:63
bool busySectorUseMbinRanges_
Definition: MuxHToutputs.h:70
unsigned int numPhiSecPerNon_
Definition: MuxHToutputs.h:65
unsigned int muxFactor() const
=== This is the base class for the linearised chi-squared track fit algorithms.
Definition: Array2D.h:16
unsigned int linkID(unsigned int iSecInNon, unsigned int iEtaReg, unsigned int mBinRange) const
unsigned int numPhiSectors_
Definition: MuxHToutputs.h:64
const Settings * settings_
Definition: MuxHToutputs.h:59
MuxAlgoName muxOutputsHT_
Definition: MuxHToutputs.h:62