CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
L1MuBMSEU Class Reference

#include <L1MuBMSEU.h>

Public Member Functions

const L1MuBMERSers () const
 return pointer to Extrapolation Result Selector More...
 
const std::vector< L1MuBMEUX * > & eux () const
 return pointer to an Extrapolator More...
 
Extrapolation ext () const
 return extrapolation type More...
 
const std::bitset< 12 > & exTable () const
 return Extrapolator table More...
 
bool isNextWheelSEU () const
 is it a next wheel Single Extrapolation Unit More...
 
bool isOwnWheelSEU () const
 is it a own wheel Single Extrapolation Unit More...
 
 L1MuBMSEU (const L1MuBMSectorProcessor &sp, Extrapolation ext, unsigned int tsId)
 constructor More...
 
void load (const L1MuBMTrackSegPhi *startTS)
 load data into the SEU More...
 
int numberOfExt () const
 return number of successful extrapolations More...
 
const std::bitset< 12 > & qsTable () const
 return Quality Sorter table More...
 
void reset ()
 reset SEU More...
 
void reset (unsigned int relAdr)
 reset single extrapolation More...
 
void run (const L1TMuonBarrelParams &params)
 run SEU More...
 
unsigned int tsId () const
 return start track segment identifier (relative address) More...
 
 ~L1MuBMSEU ()
 destructor More...
 

Private Attributes

L1MuBMERSm_ERS
 
std::vector< L1MuBMEUX * > m_EUXs
 
Extrapolation m_ext
 
std::bitset< 12 > m_EXtable
 
std::bitset< 12 > m_QStable
 
const L1MuBMSectorProcessorm_sp
 
const L1MuBMTrackSegPhim_startTS
 
unsigned int m_startTS_Id
 

Detailed Description

Single Extrapolation Unit:

performs for a given start track segment and a given extrapolation type extrapolations to all possible target track segments (12 or 6)

N. Neumeister CERN EP

Definition at line 48 of file L1MuBMSEU.h.

Constructor & Destructor Documentation

L1MuBMSEU::L1MuBMSEU ( const L1MuBMSectorProcessor sp,
Extrapolation  ext,
unsigned int  tsId 
)

constructor

Definition at line 50 of file L1MuBMSEU.cc.

References m_ERS, m_EUXs, and m_sp.

51  : m_sp(sp), m_ext(ext), m_startTS_Id(tsId), m_startTS(nullptr), m_EUXs(), m_ERS() {
52  m_EUXs.reserve(12);
53 
54  for (int target_ts = 0; target_ts < 12; target_ts++) {
55  m_EUXs.push_back(new L1MuBMEUX(m_sp, *this, target_ts));
56  }
57 
58  m_ERS = new L1MuBMERS(*this);
59 }
Extrapolation ext() const
return extrapolation type
Definition: L1MuBMSEU.h:78
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMSEU.h:96
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:98
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
unsigned int tsId() const
return start track segment identifier (relative address)
Definition: L1MuBMSEU.h:81
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:102
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:100
Extrapolation m_ext
Definition: L1MuBMSEU.h:97
L1MuBMSEU::~L1MuBMSEU ( )

destructor

Definition at line 65 of file L1MuBMSEU.cc.

References m_ERS, m_EUXs, and m_startTS.

65  {
66  vector<L1MuBMEUX*>::iterator iter_eux;
67  for (iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++) {
68  delete (*iter_eux);
69  *iter_eux = nullptr;
70  }
71 
72  m_startTS = nullptr;
73  m_EUXs.clear();
74 
75  delete m_ERS;
76 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:102
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:100

Member Function Documentation

const L1MuBMERS* L1MuBMSEU::ers ( ) const
inline

return pointer to Extrapolation Result Selector

Definition at line 93 of file L1MuBMSEU.h.

References m_ERS.

93 { return m_ERS; }
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:102
const std::vector<L1MuBMEUX*>& L1MuBMSEU::eux ( ) const
inline

return pointer to an Extrapolator

Definition at line 90 of file L1MuBMSEU.h.

References m_EUXs.

Referenced by L1MuBMERS::run().

90 { return m_EUXs; }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
Extrapolation L1MuBMSEU::ext ( ) const
inline

return extrapolation type

Definition at line 78 of file L1MuBMSEU.h.

References m_ext.

Referenced by L1MuBMEUX::load(), L1MuBMEUX::run(), and L1MuBMExtrapolationUnit::run().

78 { return m_ext; }
Extrapolation m_ext
Definition: L1MuBMSEU.h:97
const std::bitset<12>& L1MuBMSEU::exTable ( ) const
inline

return Extrapolator table

Definition at line 69 of file L1MuBMSEU.h.

References m_EXtable.

69 { return m_EXtable; }
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:104
bool L1MuBMSEU::isNextWheelSEU ( ) const
inline

is it a next wheel Single Extrapolation Unit

Definition at line 87 of file L1MuBMSEU.h.

References m_startTS_Id.

Referenced by run().

87 { return (m_startTS_Id == 2 || m_startTS_Id == 3); }
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:98
bool L1MuBMSEU::isOwnWheelSEU ( ) const
inline

is it a own wheel Single Extrapolation Unit

Definition at line 84 of file L1MuBMSEU.h.

References m_startTS_Id.

84 { return (m_startTS_Id == 0 || m_startTS_Id == 1); }
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:98
void L1MuBMSEU::load ( const L1MuBMTrackSegPhi startTS)
inline

load data into the SEU

Definition at line 66 of file L1MuBMSEU.h.

References m_startTS.

66 { m_startTS = startTS; }
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:100
int L1MuBMSEU::numberOfExt ( ) const

return number of successful extrapolations

Definition at line 173 of file L1MuBMSEU.cc.

References m_EUXs, and contentValuesFiles::number.

Referenced by L1MuBMERS::run(), and run().

173  {
174  int number = 0;
175  vector<L1MuBMEUX*>::const_iterator iter_eux;
176  for (iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++) {
177  if ((*iter_eux)->result())
178  number++;
179  }
180 
181  return number;
182 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
const std::bitset<12>& L1MuBMSEU::qsTable ( ) const
inline

return Quality Sorter table

Definition at line 72 of file L1MuBMSEU.h.

References m_QStable.

72 { return m_QStable; }
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:105
void L1MuBMSEU::reset ( void  )

reset SEU

Definition at line 147 of file L1MuBMSEU.cc.

References m_ERS, m_EUXs, m_EXtable, m_QStable, m_startTS, L1MuBMERS::reset(), and L1MuBMTrackSegPhi::reset().

147  {
148  m_startTS = nullptr;
149  vector<L1MuBMEUX*>::iterator iter_eux;
150  for (iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++) {
151  (*iter_eux)->reset();
152  }
153 
154  m_ERS->reset();
155 
156  m_EXtable.reset();
157  m_QStable.reset();
158 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:105
void reset()
reset phi track segment
void reset()
reset ERS
Definition: L1MuBMERS.cc:96
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:104
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:102
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:100
void L1MuBMSEU::reset ( unsigned int  relAdr)

reset single extrapolation

Definition at line 163 of file L1MuBMSEU.cc.

References m_EUXs, m_EXtable, and m_QStable.

163  {
164  m_EXtable.reset(relAdr);
165  m_QStable.reset(relAdr);
166  m_EUXs[relAdr]->reset();
167  // m_ERS->reset();
168 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:105
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:104
void L1MuBMSEU::run ( const L1TMuonBarrelParams params)

run SEU

Definition at line 85 of file L1MuBMSEU.cc.

References gather_cfg::cout, L1MuBMSectorProcessor::data(), L1MuBMTFConfig::Debug(), L1MuBMTrackSegPhi::empty(), L1MuBMDataBuffer::getTSphi(), isNextWheelSEU(), m_ERS, m_EUXs, m_ext, m_EXtable, m_QStable, m_sp, m_startTS, m_startTS_Id, numberOfExt(), mps_fire::result, L1MuBMERS::run(), filterCSVwithJSON::target, and L1MuBMExtrapolationUnit::which_ext().

85  {
86  if (L1MuBMTFConfig::Debug(3))
87  cout << "Run SEU " << m_ext << " " << m_startTS_Id << endl;
88 
89  pair<int, int> ext_pair = L1MuBMExtrapolationUnit::which_ext(m_ext);
90  int target = ext_pair.second;
91 
92  // check if it is a nextWheel or ownWheel SEU
93  bool nextWheel = isNextWheelSEU();
94 
95  // relative addresses used
96  // nextWheel
97  // extrapolation extrapolation
98  // address address
99  // +--------+--------+ +--------+--------+
100  // + | | | + | | |
101  // | 4 5 | 6 7 | | | 6 7 |
102  // | | | | | | | |
103  // | +--------+--------+ | +--------+--------+
104  // |........| | |........| |
105  // phi |..0...1.| 2 3 | phi |........| 2 3 |
106  // |........| | |........| |
107  // | +--------+--------+ | +--------+--------+
108  // | | | | | | | |
109  // | 8 9 | 10 11 | | | 10 11 |
110  // - | | | - | | |
111  // +--------+--------+ +--------+--------+
112  //
113  // -- eta -- -- eta --
114 
115  // loop over all 12 target addresses
116  for (int reladr = 0; reladr < 12; reladr++) {
117  // for the nextWheel extrapolations only reladr: 2,3,6,7,10,11
118  if (nextWheel && (reladr / 2) % 2 == 0)
119  continue;
120 
121  const L1MuBMTrackSegPhi* target_ts = m_sp.data()->getTSphi(target, reladr);
122  if (target_ts && !target_ts->empty()) {
123  m_EUXs[reladr]->load(m_startTS, target_ts);
124  m_EUXs[reladr]->run(params);
125  if (m_EUXs[reladr]->result())
126  m_EXtable.set(reladr);
127  }
128  }
129 
130  if (L1MuBMTFConfig::Debug(3)) {
131  int n_ext = numberOfExt();
132  if (n_ext > 0)
133  cout << "number of successful EUX : " << n_ext << endl;
134  }
135 
136  if (m_ERS)
137  m_ERS->run();
138 
139  // if ( m_ERS->address(0) != 15 ) m_QStable.set(m_ERS->address(0));
140  // if ( m_ERS->address(1) != 15 ) m_QStable.set(m_ERS->address(1));
142 }
static std::pair< int, int > which_ext(Extrapolation ext)
return station of start and target track segment for a given extrapolation
int numberOfExt() const
return number of successful extrapolations
Definition: L1MuBMSEU.cc:173
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMSEU.h:96
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:98
tuple result
Definition: mps_fire.py:311
void run()
run L1MuBMERS
Definition: L1MuBMERS.cc:61
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:101
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:105
static bool Debug()
const TSPhivector & getTSphi() const
get all track segments from the buffer
bool isNextWheelSEU() const
is it a next wheel Single Extrapolation Unit
Definition: L1MuBMSEU.h:87
const L1MuBMDataBuffer * data() const
return pointer to Data Buffer
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:104
tuple cout
Definition: gather_cfg.py:144
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:102
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:100
Extrapolation m_ext
Definition: L1MuBMSEU.h:97
bool empty() const
is it an empty phi track segment?
unsigned int L1MuBMSEU::tsId ( ) const
inline

return start track segment identifier (relative address)

Definition at line 81 of file L1MuBMSEU.h.

References m_startTS_Id.

Referenced by L1MuBMExtrapolationUnit::run().

81 { return m_startTS_Id; }
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:98

Member Data Documentation

L1MuBMERS* L1MuBMSEU::m_ERS
private

Definition at line 102 of file L1MuBMSEU.h.

Referenced by ers(), L1MuBMSEU(), reset(), run(), and ~L1MuBMSEU().

std::vector<L1MuBMEUX*> L1MuBMSEU::m_EUXs
private

Definition at line 101 of file L1MuBMSEU.h.

Referenced by eux(), L1MuBMSEU(), numberOfExt(), reset(), run(), and ~L1MuBMSEU().

Extrapolation L1MuBMSEU::m_ext
private

Definition at line 97 of file L1MuBMSEU.h.

Referenced by ext(), and run().

std::bitset<12> L1MuBMSEU::m_EXtable
private

Definition at line 104 of file L1MuBMSEU.h.

Referenced by exTable(), reset(), and run().

std::bitset<12> L1MuBMSEU::m_QStable
private

Definition at line 105 of file L1MuBMSEU.h.

Referenced by qsTable(), reset(), and run().

const L1MuBMSectorProcessor& L1MuBMSEU::m_sp
private

Definition at line 96 of file L1MuBMSEU.h.

Referenced by L1MuBMSEU(), and run().

const L1MuBMTrackSegPhi* L1MuBMSEU::m_startTS
private

Definition at line 100 of file L1MuBMSEU.h.

Referenced by load(), reset(), run(), and ~L1MuBMSEU().

unsigned int L1MuBMSEU::m_startTS_Id
private

Definition at line 98 of file L1MuBMSEU.h.

Referenced by isNextWheelSEU(), isOwnWheelSEU(), run(), and tsId().