CMS 3D CMS Logo

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

#include <L1MuDTSEU.h>

Inheritance diagram for L1MuDTSEU:
L1AbstractProcessor

Public Member Functions

const L1MuDTERSers () const
 return pointer to Extrapolation Result Selector More...
 
const std::vector< L1MuDTEUX * > & 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...
 
 L1MuDTSEU (const L1MuDTSectorProcessor &sp, Extrapolation ext, unsigned int tsId)
 constructor More...
 
void load (const L1MuDTTrackSegPhi *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...
 
virtual void reset ()
 reset SEU More...
 
void reset (unsigned int relAdr)
 reset single extrapolation More...
 
virtual void run (const edm::EventSetup &c)
 run SEU More...
 
unsigned int tsId () const
 return start track segment identifier (relative address) More...
 
virtual ~L1MuDTSEU ()
 destructor More...
 
- Public Member Functions inherited from L1AbstractProcessor
virtual void run ()
 run processor logic More...
 
virtual ~L1AbstractProcessor ()
 destructor More...
 

Private Attributes

L1MuDTERSm_ERS
 
std::vector< L1MuDTEUX * > m_EUXs
 
Extrapolation m_ext
 
std::bitset< 12 > m_EXtable
 
std::bitset< 12 > m_QStable
 
const L1MuDTSectorProcessorm_sp
 
const L1MuDTTrackSegPhim_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)

Date:
2008/02/18 17:38:04
Revision:
1.4

N. Neumeister CERN EP

Definition at line 50 of file L1MuDTSEU.h.

Constructor & Destructor Documentation

L1MuDTSEU::L1MuDTSEU ( const L1MuDTSectorProcessor sp,
Extrapolation  ext,
unsigned int  tsId 
)

constructor

Definition at line 52 of file L1MuDTSEU.cc.

References m_ERS, m_EUXs, and m_sp.

52  :
53  m_sp(sp), m_ext(ext),
55 
56  m_EUXs.reserve(12);
57 
58  for ( int target_ts = 0; target_ts < 12; target_ts++ ) {
59  m_EUXs.push_back( new L1MuDTEUX(m_sp,*this,target_ts) );
60  }
61 
62  m_ERS = new L1MuDTERS(*this);
63 
64 }
Extrapolation m_ext
Definition: L1MuDTSEU.h:102
Extrapolation ext() const
return extrapolation type
Definition: L1MuDTSEU.h:82
unsigned int m_startTS_Id
Definition: L1MuDTSEU.h:103
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
const L1MuDTSectorProcessor & m_sp
Definition: L1MuDTSEU.h:101
L1MuDTERS * m_ERS
Definition: L1MuDTSEU.h:107
const L1MuDTTrackSegPhi * m_startTS
Definition: L1MuDTSEU.h:105
unsigned int tsId() const
return start track segment identifier (relative address)
Definition: L1MuDTSEU.h:85
L1MuDTSEU::~L1MuDTSEU ( )
virtual

destructor

Definition at line 71 of file L1MuDTSEU.cc.

References m_ERS, m_EUXs, and m_startTS.

71  {
72 
73  vector<L1MuDTEUX*>::iterator iter_eux;
74  for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) {
75  delete (*iter_eux);
76  *iter_eux = 0;
77  }
78 
79  m_startTS = 0;
80  m_EUXs.clear();
81 
82  delete m_ERS;
83 
84 }
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
L1MuDTERS * m_ERS
Definition: L1MuDTSEU.h:107
const L1MuDTTrackSegPhi * m_startTS
Definition: L1MuDTSEU.h:105

Member Function Documentation

const L1MuDTERS* L1MuDTSEU::ers ( ) const
inline

return pointer to Extrapolation Result Selector

Definition at line 97 of file L1MuDTSEU.h.

References m_ERS.

97 { return m_ERS; }
L1MuDTERS * m_ERS
Definition: L1MuDTSEU.h:107
const std::vector<L1MuDTEUX*>& L1MuDTSEU::eux ( ) const
inline

return pointer to an Extrapolator

Definition at line 94 of file L1MuDTSEU.h.

References m_EUXs.

Referenced by L1MuDTERS::run().

94 { return m_EUXs; }
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
Extrapolation L1MuDTSEU::ext ( ) const
inline

return extrapolation type

Definition at line 82 of file L1MuDTSEU.h.

References m_ext.

Referenced by L1MuDTEUX::load(), L1MuDTEUX::run(), and L1MuDTExtrapolationUnit::run().

82 { return m_ext; }
Extrapolation m_ext
Definition: L1MuDTSEU.h:102
const std::bitset<12>& L1MuDTSEU::exTable ( ) const
inline

return Extrapolator table

Definition at line 73 of file L1MuDTSEU.h.

References m_EXtable.

73 { return m_EXtable; }
std::bitset< 12 > m_EXtable
Definition: L1MuDTSEU.h:109
bool L1MuDTSEU::isNextWheelSEU ( ) const
inline

is it a next wheel Single Extrapolation Unit

Definition at line 91 of file L1MuDTSEU.h.

References m_startTS_Id.

Referenced by run().

91 { return ( m_startTS_Id == 2 || m_startTS_Id == 3 ); }
unsigned int m_startTS_Id
Definition: L1MuDTSEU.h:103
bool L1MuDTSEU::isOwnWheelSEU ( ) const
inline

is it a own wheel Single Extrapolation Unit

Definition at line 88 of file L1MuDTSEU.h.

References m_startTS_Id.

88 { return ( m_startTS_Id == 0 || m_startTS_Id == 1 ); }
unsigned int m_startTS_Id
Definition: L1MuDTSEU.h:103
void L1MuDTSEU::load ( const L1MuDTTrackSegPhi startTS)
inline

load data into the SEU

Definition at line 70 of file L1MuDTSEU.h.

References m_startTS.

70 { m_startTS = startTS; }
const L1MuDTTrackSegPhi * m_startTS
Definition: L1MuDTSEU.h:105
int L1MuDTSEU::numberOfExt ( ) const

return number of successful extrapolations

Definition at line 189 of file L1MuDTSEU.cc.

References m_EUXs.

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

189  {
190 
191  int number = 0;
192  vector<L1MuDTEUX*>::const_iterator iter_eux;
193  for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) {
194  if ( (*iter_eux)->result() ) number++;
195  }
196 
197  return number;
198 
199 }
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
const std::bitset<12>& L1MuDTSEU::qsTable ( ) const
inline

return Quality Sorter table

Definition at line 76 of file L1MuDTSEU.h.

References m_QStable.

76 { return m_QStable; }
std::bitset< 12 > m_QStable
Definition: L1MuDTSEU.h:110
void L1MuDTSEU::reset ( void  )
virtual

reset SEU

Implements L1AbstractProcessor.

Definition at line 157 of file L1MuDTSEU.cc.

References m_ERS, m_EUXs, m_EXtable, m_QStable, m_startTS, L1MuDTERS::reset(), and L1MuDTTrackSegPhi::reset().

157  {
158 
159  m_startTS = 0;
160  vector<L1MuDTEUX*>::iterator iter_eux;
161  for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) {
162  (*iter_eux)->reset();
163  }
164 
165  m_ERS->reset();
166 
167  m_EXtable.reset();
168  m_QStable.reset();
169 
170 }
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
void reset()
reset phi track segment
std::bitset< 12 > m_EXtable
Definition: L1MuDTSEU.h:109
virtual void reset()
reset ERS
Definition: L1MuDTERS.cc:109
std::bitset< 12 > m_QStable
Definition: L1MuDTSEU.h:110
L1MuDTERS * m_ERS
Definition: L1MuDTSEU.h:107
const L1MuDTTrackSegPhi * m_startTS
Definition: L1MuDTSEU.h:105
void L1MuDTSEU::reset ( unsigned int  relAdr)

reset single extrapolation

Definition at line 176 of file L1MuDTSEU.cc.

References m_EUXs, m_EXtable, and m_QStable.

176  {
177 
178  m_EXtable.reset(relAdr);
179  m_QStable.reset(relAdr);
180  m_EUXs[relAdr]->reset();
181 // m_ERS->reset();
182 
183 }
std::vector< L1MuDTEUX * > m_EUXs
Definition: L1MuDTSEU.h:106
std::bitset< 12 > m_EXtable
Definition: L1MuDTSEU.h:109
std::bitset< 12 > m_QStable
Definition: L1MuDTSEU.h:110
void L1MuDTSEU::run ( const edm::EventSetup c)
virtual

run SEU

Reimplemented from L1AbstractProcessor.

Definition at line 94 of file L1MuDTSEU.cc.

References gather_cfg::cout, L1MuDTSectorProcessor::data(), L1MuDTTFConfig::Debug(), L1MuDTTrackSegPhi::empty(), L1MuDTDataBuffer::getTSphi(), isNextWheelSEU(), m_ERS, m_EUXs, m_ext, m_EXtable, m_QStable, m_sp, m_startTS, m_startTS_Id, numberOfExt(), query::result, L1MuDTERS::run(), filterCSVwithJSON::target, and L1MuDTExtrapolationUnit::which_ext().

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

return start track segment identifier (relative address)

Definition at line 85 of file L1MuDTSEU.h.

References m_startTS_Id.

Referenced by L1MuDTExtrapolationUnit::run().

85 { return m_startTS_Id; }
unsigned int m_startTS_Id
Definition: L1MuDTSEU.h:103

Member Data Documentation

L1MuDTERS* L1MuDTSEU::m_ERS
private

Definition at line 107 of file L1MuDTSEU.h.

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

std::vector<L1MuDTEUX*> L1MuDTSEU::m_EUXs
private

Definition at line 106 of file L1MuDTSEU.h.

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

Extrapolation L1MuDTSEU::m_ext
private

Definition at line 102 of file L1MuDTSEU.h.

Referenced by ext(), and run().

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

Definition at line 109 of file L1MuDTSEU.h.

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

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

Definition at line 110 of file L1MuDTSEU.h.

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

const L1MuDTSectorProcessor& L1MuDTSEU::m_sp
private

Definition at line 101 of file L1MuDTSEU.h.

Referenced by L1MuDTSEU(), and run().

const L1MuDTTrackSegPhi* L1MuDTSEU::m_startTS
private

Definition at line 105 of file L1MuDTSEU.h.

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

unsigned int L1MuDTSEU::m_startTS_Id
private

Definition at line 103 of file L1MuDTSEU.h.

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