CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1MuBMSEU Class Reference

#include <L1MuBMSEU.h>

Inheritance diagram for L1MuBMSEU:
L1AbstractProcessor

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...
 
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 ~L1MuBMSEU ()
 destructor More...
 
- Public Member Functions inherited from L1AbstractProcessor
virtual void run ()
 run processor logic More...
 
virtual void run ()
 run processor logic More...
 
virtual ~L1AbstractProcessor ()
 destructor More...
 
virtual ~L1AbstractProcessor ()
 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.

50  :
51  m_sp(sp), m_ext(ext),
53 
54  m_EUXs.reserve(12);
55 
56  for ( int target_ts = 0; target_ts < 12; target_ts++ ) {
57  m_EUXs.push_back( new L1MuBMEUX(m_sp,*this,target_ts) );
58  }
59 
60  m_ERS = new L1MuBMERS(*this);
61 
62 }
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMSEU.h:99
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:101
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:104
unsigned int tsId() const
return start track segment identifier (relative address)
Definition: L1MuBMSEU.h:83
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:105
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:103
Definition: memstream.h:15
Extrapolation m_ext
Definition: L1MuBMSEU.h:100
L1MuBMSEU::~L1MuBMSEU ( )
virtual

destructor

Definition at line 69 of file L1MuBMSEU.cc.

References m_ERS, m_EUXs, and m_startTS.

69  {
70 
71  vector<L1MuBMEUX*>::iterator iter_eux;
72  for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) {
73  delete (*iter_eux);
74  *iter_eux = 0;
75  }
76 
77  m_startTS = 0;
78  m_EUXs.clear();
79 
80  delete m_ERS;
81 
82 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:104
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:105
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:103

Member Function Documentation

const L1MuBMERS* L1MuBMSEU::ers ( ) const
inline

return pointer to Extrapolation Result Selector

Definition at line 95 of file L1MuBMSEU.h.

References m_ERS.

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

return pointer to an Extrapolator

Definition at line 92 of file L1MuBMSEU.h.

References m_EUXs.

Referenced by L1MuBMERS::run().

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

return extrapolation type

Definition at line 80 of file L1MuBMSEU.h.

References m_ext.

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

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

return Extrapolator table

Definition at line 71 of file L1MuBMSEU.h.

References m_EXtable.

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

is it a next wheel Single Extrapolation Unit

Definition at line 89 of file L1MuBMSEU.h.

References m_startTS_Id.

Referenced by run().

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

is it a own wheel Single Extrapolation Unit

Definition at line 86 of file L1MuBMSEU.h.

References m_startTS_Id.

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

load data into the SEU

Definition at line 68 of file L1MuBMSEU.h.

References m_startTS.

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

return number of successful extrapolations

Definition at line 187 of file L1MuBMSEU.cc.

References m_EUXs.

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

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

return Quality Sorter table

Definition at line 74 of file L1MuBMSEU.h.

References m_QStable, and numberOfExt().

74 { return m_QStable; }
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:108
void L1MuBMSEU::reset ( void  )
virtual

reset SEU

Implements L1AbstractProcessor.

Definition at line 155 of file L1MuBMSEU.cc.

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

155  {
156 
157  m_startTS = 0;
158  vector<L1MuBMEUX*>::iterator iter_eux;
159  for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) {
160  (*iter_eux)->reset();
161  }
162 
163  m_ERS->reset();
164 
165  m_EXtable.reset();
166  m_QStable.reset();
167 
168 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:104
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:108
void reset()
reset phi track segment
virtual void reset()
reset ERS
Definition: L1MuBMERS.cc:107
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:107
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:105
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:103
void L1MuBMSEU::reset ( unsigned int  relAdr)

reset single extrapolation

Definition at line 174 of file L1MuBMSEU.cc.

References m_EUXs, m_EXtable, and m_QStable.

174  {
175 
176  m_EXtable.reset(relAdr);
177  m_QStable.reset(relAdr);
178  m_EUXs[relAdr]->reset();
179 // m_ERS->reset();
180 
181 }
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:104
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:108
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:107
void L1MuBMSEU::run ( const edm::EventSetup c)
virtual

run SEU

Reimplemented from L1AbstractProcessor.

Definition at line 92 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(), edmPickEvents::target, and L1MuBMExtrapolationUnit::which_ext().

92  {
93 
94  if ( L1MuBMTFConfig::Debug(3) ) cout << "Run SEU " << m_ext << " "
95  << m_startTS_Id << endl;
96 
97  pair<int,int> ext_pair = L1MuBMExtrapolationUnit::which_ext(m_ext);
98  int target = ext_pair.second;
99 
100  // check if it is a nextWheel or ownWheel SEU
101  bool nextWheel = isNextWheelSEU();
102 
103  // relative addresses used
104  // nextWheel
105  // extrapolation extrapolation
106  // address address
107  // +--------+--------+ +--------+--------+
108  // + | | | + | | |
109  // | 4 5 | 6 7 | | | 6 7 |
110  // | | | | | | | |
111  // | +--------+--------+ | +--------+--------+
112  // |........| | |........| |
113  // phi |..0...1.| 2 3 | phi |........| 2 3 |
114  // |........| | |........| |
115  // | +--------+--------+ | +--------+--------+
116  // | | | | | | | |
117  // | 8 9 | 10 11 | | | 10 11 |
118  // - | | | - | | |
119  // +--------+--------+ +--------+--------+
120  //
121  // -- eta -- -- eta --
122 
123  // loop over all 12 target addresses
124  for ( int reladr = 0; reladr < 12; reladr++ ) {
125 
126  // for the nextWheel extrapolations only reladr: 2,3,6,7,10,11
127  if ( nextWheel && (reladr/2)%2 == 0 ) continue;
128 
129  const L1MuBMTrackSegPhi* target_ts = m_sp.data()->getTSphi(target, reladr);
130  if ( target_ts && !target_ts->empty() ) {
131  m_EUXs[reladr]->load(m_startTS, target_ts);
132  m_EUXs[reladr]->run(c);
133  if ( m_EUXs[reladr]->result() ) m_EXtable.set(reladr);
134  }
135 
136  }
137 
138  if ( L1MuBMTFConfig::Debug(3) ) {
139  int n_ext = numberOfExt();
140  if ( n_ext > 0 ) cout << "number of successful EUX : " << n_ext << endl;
141  }
142 
143  if ( m_ERS ) m_ERS->run();
144 
145  // if ( m_ERS->address(0) != 15 ) m_QStable.set(m_ERS->address(0));
146  // if ( m_ERS->address(1) != 15 ) m_QStable.set(m_ERS->address(1));
148 
149 }
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:187
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMSEU.h:99
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:101
virtual void run()
run L1MuBMERS
Definition: L1MuBMERS.cc:67
std::vector< L1MuBMEUX * > m_EUXs
Definition: L1MuBMSEU.h:104
std::bitset< 12 > m_QStable
Definition: L1MuBMSEU.h:108
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:89
const L1MuBMDataBuffer * data() const
return pointer to Data Buffer
std::bitset< 12 > m_EXtable
Definition: L1MuBMSEU.h:107
L1MuBMERS * m_ERS
Definition: L1MuBMSEU.h:105
const L1MuBMTrackSegPhi * m_startTS
Definition: L1MuBMSEU.h:103
Extrapolation m_ext
Definition: L1MuBMSEU.h:100
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 83 of file L1MuBMSEU.h.

References m_startTS_Id.

Referenced by L1MuBMExtrapolationUnit::run().

83 { return m_startTS_Id; }
unsigned int m_startTS_Id
Definition: L1MuBMSEU.h:101

Member Data Documentation

L1MuBMERS* L1MuBMSEU::m_ERS
private

Definition at line 105 of file L1MuBMSEU.h.

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

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

Definition at line 104 of file L1MuBMSEU.h.

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

Extrapolation L1MuBMSEU::m_ext
private

Definition at line 100 of file L1MuBMSEU.h.

Referenced by ext(), and run().

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

Definition at line 107 of file L1MuBMSEU.h.

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

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

Definition at line 108 of file L1MuBMSEU.h.

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

const L1MuBMSectorProcessor& L1MuBMSEU::m_sp
private

Definition at line 99 of file L1MuBMSEU.h.

Referenced by L1MuBMSEU(), and run().

const L1MuBMTrackSegPhi* L1MuBMSEU::m_startTS
private

Definition at line 103 of file L1MuBMSEU.h.

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

unsigned int L1MuBMSEU::m_startTS_Id
private

Definition at line 101 of file L1MuBMSEU.h.

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