CMS 3D CMS Logo

L1MuBMEUX.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 #ifndef L1MUBM_EUX_H
18 #define L1MUBM_EUX_H
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <utility>
25 #include <map>
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
30 
33 
34 //------------------------------------
35 // Collaborating Class Declarations --
36 //------------------------------------
37 
41 
42 class L1MuBMTrackSegPhi;
44 class L1MuBMSEU;
45 class L1MuDTExtLut;
46 class L1MuDTTFParameters;
47 
48 // ---------------------
49 // -- Class Interface --
50 // ---------------------
51 
53 public:
55  L1MuBMEUX(const L1MuBMSectorProcessor& sp, const L1MuBMSEU& seu, int id);
56 
58  ~L1MuBMEUX() override;
59 
61  bool operator==(const L1MuBMEUX&) const;
62 
64  void run(const edm::EventSetup& c) override;
65 
67  void reset() override;
68 
70  void load(const L1MuBMTrackSegPhi* start_ts, const L1MuBMTrackSegPhi* target_ts);
71 
73  std::pair<const L1MuBMTrackSegPhi*, const L1MuBMTrackSegPhi*> ts() const;
74 
76  class EUX_Comp {
77  public:
78  EUX_Comp(const L1MuBMEUX* k = nullptr) : _not(k) {}
79  bool operator()(const L1MuBMEUX* first, const L1MuBMEUX* second) const {
80  if (!second->result())
81  return false;
82  if (_not != nullptr && *first == *_not)
83  return true;
84  if (_not != nullptr && *second == *_not)
85  return false;
86  return (first->quality() < second->quality());
87  }
88 
89  private:
90  const L1MuBMEUX* _not;
91  };
92 
94  inline int id() const { return m_id; }
95 
97  inline bool result() const { return m_result; }
98 
100  inline unsigned int quality() const { return m_quality; }
101 
103  inline unsigned short int address() const { return m_address; }
104 
105 private:
107  int sec_mod(int) const;
108 
109 private:
111  const L1MuBMSEU& m_seu; // reference to Single Extrapolation Unit
112  int m_id; // index of start TS
113 
114  bool m_result; //@@ 1 bit
115  unsigned short int m_quality; //@@ 1 bit
116  unsigned short int m_address; //@@ 4 bits
117 
118  const L1MuBMTrackSegPhi* m_start; // start track segment
119  const L1MuBMTrackSegPhi* m_target; // target track segment
120 
122 
123  //edm::ESHandle< L1MuDTExtLut > theExtLUTs; // extrapolation look-up tables
125  int const theExtFilter = 1; // extrapolation quality filter
126  unsigned short const nbit_phi = 12; // number of bits used for phi
127  unsigned short const nbit_phib = 10; // number of bits used for phib
128 
129  //edm::ESHandle< L1MuDTTFParameters > pars;
131 };
132 
133 #endif
L1MuBMEUX::m_address
unsigned short int m_address
Definition: L1MuBMEUX.h:116
L1MuBMEUX::reset
void reset() override
reset Extrapolator
Definition: L1MuBMEUX.cc:238
L1MuBMEUX::operator==
bool operator==(const L1MuBMEUX &) const
equal operator
Definition: L1MuBMEUX.cc:76
L1MuBMEUX::L1MuBMEUX
L1MuBMEUX(const L1MuBMSectorProcessor &sp, const L1MuBMSEU &seu, int id)
constructor
Definition: L1MuBMEUX.cc:50
L1MuBMEUX::pars
L1MuDTTFParameters pars
Definition: L1MuBMEUX.h:130
L1MuBMEUX::sec_mod
int sec_mod(int) const
output sector numbers in the range -6 to +5
Definition: L1MuBMEUX.cc:258
L1MuBMTrackSegPhi
Definition: L1MuBMTrackSegPhi.h:41
L1MuBMEUX::EUX_Comp::_not
const L1MuBMEUX * _not
Definition: L1MuBMEUX.h:90
ESHandle.h
L1AbstractProcessor.h
L1MuBMEUX::load
void load(const L1MuBMTrackSegPhi *start_ts, const L1MuBMTrackSegPhi *target_ts)
load data into EUX
Definition: L1MuBMEUX.cc:223
L1MuDTExtLut
Definition: L1MuDTExtLut.h:39
L1TMuonBarrelParams.h
L1MuBMEUX
Definition: L1MuBMEUX.h:52
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
L1MuBMLUTHandler
Definition: L1MuBMLUTHandler.h:26
L1MuBMEUX::m_quality
unsigned short int m_quality
Definition: L1MuBMEUX.h:115
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1MuBMEUX::m_target
const L1MuBMTrackSegPhi * m_target
Definition: L1MuBMEUX.h:119
L1MuBMSectorProcessor
Definition: L1MuBMSectorProcessor.h:54
L1MuBMEUX::EUX_Comp::EUX_Comp
EUX_Comp(const L1MuBMEUX *k=nullptr)
Definition: L1MuBMEUX.h:78
L1MuBMEUX::m_sp
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMEUX.h:110
L1MuBMEUX::EUX_Comp::operator()
bool operator()(const L1MuBMEUX *first, const L1MuBMEUX *second) const
Definition: L1MuBMEUX.h:79
L1MuBMEUX::result
bool result() const
return extrapolation result
Definition: L1MuBMEUX.h:97
edm::ESHandle< L1TMuonBarrelParams >
L1MuBMEUX::ts
std::pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > ts() const
return pointer to start and target track segment
Definition: L1MuBMEUX.cc:250
L1AbstractProcessor
Definition: L1AbstractProcessor.h:34
dqmdumpme.k
k
Definition: dqmdumpme.py:60
L1MuBMEUX::nbit_phib
unsigned const short nbit_phib
Definition: L1MuBMEUX.h:127
L1TMuonBarrelParamsRcd.h
L1MuBMEUX::m_id
int m_id
Definition: L1MuBMEUX.h:112
L1MuBMEUX::m_seu
const L1MuBMSEU & m_seu
Definition: L1MuBMEUX.h:111
L1MuBMEUX::bmtfParamsHandle
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle
Definition: L1MuBMEUX.h:121
L1AbstractProcessor::run
virtual void run()
run processor logic
Definition: L1AbstractProcessor.h:40
L1MuBMEUX::~L1MuBMEUX
~L1MuBMEUX() override
destructor
Definition: L1MuBMEUX.cc:67
edm::EventSetup
Definition: EventSetup.h:57
L1MuBMEUX::id
int id() const
return Extrapolation identifier
Definition: L1MuBMEUX.h:94
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1MuBMEUX::m_start
const L1MuBMTrackSegPhi * m_start
Definition: L1MuBMEUX.h:118
L1MuBMEUX::address
unsigned short int address() const
return extrapolation address (0-11) (address = 15 indicates negative ext. result)
Definition: L1MuBMEUX.h:103
L1MuBMEUX::theExtFilter
const int theExtFilter
Definition: L1MuBMEUX.h:125
L1MuBMLUTHandler.h
L1MuBMEUX::quality
unsigned int quality() const
return extrapolation quality
Definition: L1MuBMEUX.h:100
L1MuBMEUX::theExtLUTs
L1MuBMLUTHandler * theExtLUTs
Definition: L1MuBMEUX.h:124
L1MuBMEUX::EUX_Comp
helper class for finding the best and second best extrapolation
Definition: L1MuBMEUX.h:76
L1MuDTTFParameters
Definition: L1MuDTTFParameters.h:36
L1MuBMEUX::nbit_phi
unsigned const short nbit_phi
Definition: L1MuBMEUX.h:126
L1MuBMSEU
Definition: L1MuBMSEU.h:48
L1MuBMEUX::m_result
bool m_result
Definition: L1MuBMEUX.h:114