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