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