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 Member Functions | Private Attributes
L1MuBMSectorProcessor Class Reference

#include <L1MuBMSectorProcessor.h>

Public Member Functions

const L1MuBMAssignmentUnitAU (int id) const
 return pointer to Assignment Unit, index [0,1] More...
 
bool brl () const
 is it a barrel-only Sector Processor? More...
 
const L1MuBMDataBufferdata () const
 return pointer to Data Buffer More...
 
L1MuBMDataBufferdata ()
 
const L1MuBMExtrapolationUnitEU () const
 return pointer to Extrapolation Unit More...
 
const L1MuBMSecProcIdid () const
 return Sector Processor identifier More...
 
 L1MuBMSectorProcessor (const L1MuBMTrackFinder &, const L1MuBMSecProcId &, edm::ConsumesCollector &&)
 constructor More...
 
const L1MuBMSectorProcessorneighbour () const
 return pointer to the next wheel neighbour More...
 
bool ovl () const
 is it an overlap region Sector Processor? More...
 
void print () const
 print muon candidates found by the Sector Processor More...
 
virtual void reset ()
 reset the Sector Processor More...
 
virtual void run (int bx, const edm::Event &e, const edm::EventSetup &c)
 run the Sector Processor More...
 
const L1MuBMTrackAssemblerTA () const
 return pointer to Track Assembler More...
 
const L1MuBMTrackFindertf () const
 return reference to barrel MTTF More...
 
L1MuBMTracktrack (int id) const
 return pointer to muon candidate, index [0,1] More...
 
L1MuBMTracktracK (int id) const
 return pointer to muon candidate, index [0,1] More...
 
virtual ~L1MuBMSectorProcessor ()
 destructor More...
 

Private Member Functions

bool anyTrack () const
 are there any non-empty muon candidates? More...
 

Private Attributes

std::vector
< L1MuBMAssignmentUnit * > 
m_AUs
 
L1MuBMDataBufferm_DataBuffer
 
L1MuBMExtrapolationUnitm_EU
 
L1MuBMSectorReceiverm_SectorReceiver
 
L1MuBMSecProcId m_spid
 
L1MuBMTrackAssemblerm_TA
 
const L1MuBMTrackFinderm_tf
 
std::vector< L1MuBMTrack * > m_TrackCands
 
std::vector< L1MuBMTrack * > m_TracKCands
 

Detailed Description

Sector Processor:

A Sector Processor consists of:

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 54 of file L1MuBMSectorProcessor.h.

Constructor & Destructor Documentation

L1MuBMSectorProcessor::L1MuBMSectorProcessor ( const L1MuBMTrackFinder tf,
const L1MuBMSecProcId id,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 53 of file L1MuBMSectorProcessor.cc.

References m_AUs, m_spid, m_TrackCands, and m_TracKCands.

55  :
56 
57  m_tf(tf), m_spid(id),
59  m_DataBuffer(new L1MuBMDataBuffer(*this)),
60  m_EU(new L1MuBMExtrapolationUnit(*this)),
61  m_TA(new L1MuBMTrackAssembler(*this)),
63 
64  // 2 assignment units
65  m_AUs.reserve(2);
66  m_AUs.push_back(new L1MuBMAssignmentUnit(*this,0));
67  m_AUs.push_back(new L1MuBMAssignmentUnit(*this,1));
68 
69  // now the 2 track candidates
70  m_TrackCands.reserve(2);
71  m_TrackCands.push_back(new L1MuBMTrack(m_spid) );
72  m_TrackCands.push_back(new L1MuBMTrack(m_spid) );
73 
74  m_TracKCands.reserve(2);
75  m_TracKCands.push_back(new L1MuBMTrack(m_spid) );
76  m_TracKCands.push_back(new L1MuBMTrack(m_spid) );
77 
78 }
std::vector< L1MuBMTrack * > m_TracKCands
std::vector< L1MuBMTrack * > m_TrackCands
def move
Definition: eostools.py:510
const L1MuBMTrackFinder & m_tf
L1MuBMSectorReceiver * m_SectorReceiver
L1MuBMTrackAssembler * m_TA
L1MuBMDataBuffer * m_DataBuffer
std::vector< L1MuBMAssignmentUnit * > m_AUs
L1MuBMExtrapolationUnit * m_EU
L1MuBMSectorProcessor::~L1MuBMSectorProcessor ( )
virtual

destructor

Definition at line 85 of file L1MuBMSectorProcessor.cc.

References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TrackCands, and m_TracKCands.

85  {
86 
87  delete m_SectorReceiver;
88  delete m_DataBuffer;
89  delete m_EU;
90  delete m_TA;
91  delete m_AUs[0];
92  delete m_AUs[1];
93  delete m_TrackCands[0];
94  delete m_TrackCands[1];
95  delete m_TracKCands[0];
96  delete m_TracKCands[1];
97 
98 }
std::vector< L1MuBMTrack * > m_TracKCands
std::vector< L1MuBMTrack * > m_TrackCands
L1MuBMSectorReceiver * m_SectorReceiver
L1MuBMTrackAssembler * m_TA
L1MuBMDataBuffer * m_DataBuffer
std::vector< L1MuBMAssignmentUnit * > m_AUs
L1MuBMExtrapolationUnit * m_EU

Member Function Documentation

bool L1MuBMSectorProcessor::anyTrack ( ) const
private

are there any non-empty muon candidates?

Definition at line 243 of file L1MuBMSectorProcessor.cc.

References relativeConstraints::empty, and m_TrackCands.

Referenced by print().

243  {
244 
245  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() ) return true;
246  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() ) return true;
247 
248  return false;
249 
250 }
std::vector< L1MuBMTrack * > m_TrackCands
const L1MuBMAssignmentUnit* L1MuBMSectorProcessor::AU ( int  id) const
inline

return pointer to Assignment Unit, index [0,1]

Definition at line 99 of file L1MuBMSectorProcessor.h.

References id(), and m_AUs.

99 { return m_AUs[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMAssignmentUnit * > m_AUs
bool L1MuBMSectorProcessor::brl ( ) const
inline

is it a barrel-only Sector Processor?

Definition at line 83 of file L1MuBMSectorProcessor.h.

References m_spid, and L1MuBMSecProcId::ovl().

83 { return !m_spid.ovl(); }
bool ovl() const
is it an overlap region Sector Processor?
const L1MuBMDataBuffer* L1MuBMSectorProcessor::data ( ) const
inline
L1MuBMDataBuffer* L1MuBMSectorProcessor::data ( )
inline

Definition at line 90 of file L1MuBMSectorProcessor.h.

References m_DataBuffer.

Referenced by cuy.FindIssue::__init__().

90 { return m_DataBuffer; }
L1MuBMDataBuffer * m_DataBuffer
const L1MuBMExtrapolationUnit* L1MuBMSectorProcessor::EU ( ) const
inline

return pointer to Extrapolation Unit

Definition at line 93 of file L1MuBMSectorProcessor.h.

References m_EU.

Referenced by L1MuBMTrackAssembler::run().

93 { return m_EU; }
L1MuBMExtrapolationUnit * m_EU
const L1MuBMSecProcId& L1MuBMSectorProcessor::id ( void  ) const
inline
const L1MuBMSectorProcessor * L1MuBMSectorProcessor::neighbour ( ) const

return pointer to the next wheel neighbour

Definition at line 221 of file L1MuBMSectorProcessor.cc.

References funct::abs(), id(), m_spid, m_tf, L1MuBMSecProcId::sector(), L1MuBMTrackFinder::sp(), and L1MuBMSecProcId::wheel().

221  {
222 
223  int sector = m_spid.sector();
224  int wheel = m_spid.wheel();
225 
226  // the neighbour is in the same wedge with the following definition:
227  // current SP -3 -2 -1 +1 +2 +3
228  // neighbour -2 -1 +1 0 +1 +2
229 
230  if ( wheel == 1) return 0;
231  wheel = (wheel == -1) ? 1 : (wheel/abs(wheel)) * (abs(wheel)-1);
232 
233  const L1MuBMSecProcId id(wheel,sector);
234 
235  return m_tf.sp(id);
236 
237 }
int sector() const
return sector number
const L1MuBMTrackFinder & m_tf
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const L1MuBMSecProcId & id() const
return Sector Processor identifier
int wheel() const
return wheel number
bool L1MuBMSectorProcessor::ovl ( ) const
inline

is it an overlap region Sector Processor?

Definition at line 86 of file L1MuBMSectorProcessor.h.

References m_spid, and L1MuBMSecProcId::ovl().

86 { return m_spid.ovl(); }
bool ovl() const
is it an overlap region Sector Processor?
void L1MuBMSectorProcessor::print ( void  ) const

print muon candidates found by the Sector Processor

Definition at line 204 of file L1MuBMSectorProcessor.cc.

References anyTrack(), gather_cfg::cout, m_spid, and m_TrackCands.

204  {
205 
206  if ( anyTrack() ) {
207  cout << "Muon candidates found in " << m_spid << " : " << endl;
208  vector<L1MuBMTrack*>::const_iterator iter = m_TrackCands.begin();
209  while ( iter != m_TrackCands.end() ) {
210  if ( *iter) (*iter)->print();
211  iter++;
212  }
213  }
214 
215 }
bool anyTrack() const
are there any non-empty muon candidates?
std::vector< L1MuBMTrack * > m_TrackCands
tuple cout
Definition: gather_cfg.py:145
void L1MuBMSectorProcessor::reset ( void  )
virtual

reset the Sector Processor

Definition at line 185 of file L1MuBMSectorProcessor.cc.

References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TrackCands, m_TracKCands, L1MuBMDataBuffer::reset(), L1MuBMTrackAssembler::reset(), L1MuBMSectorReceiver::reset(), and L1MuBMExtrapolationUnit::reset().

Referenced by run().

185  {
186 
188  if ( m_DataBuffer ) m_DataBuffer->reset();
189  if ( m_EU ) m_EU->reset();
190  if ( m_TA ) m_TA->reset();
191  if ( m_AUs[0] ) m_AUs[0]->reset();
192  if ( m_AUs[1] ) m_AUs[1]->reset();
193  if ( m_TrackCands[0] ) m_TrackCands[0]->reset();
194  if ( m_TrackCands[1] ) m_TrackCands[1]->reset();
195  if ( m_TracKCands[0] ) m_TracKCands[0]->reset();
196  if ( m_TracKCands[1] ) m_TracKCands[1]->reset();
197 
198 }
std::vector< L1MuBMTrack * > m_TracKCands
void reset()
clear Data Buffer
std::vector< L1MuBMTrack * > m_TrackCands
virtual void reset()
reset Extrapolation Unit
virtual void reset()
reset Track Assembler
void reset()
clear Sector Receiver
L1MuBMSectorReceiver * m_SectorReceiver
L1MuBMTrackAssembler * m_TA
L1MuBMDataBuffer * m_DataBuffer
std::vector< L1MuBMAssignmentUnit * > m_AUs
L1MuBMExtrapolationUnit * m_EU
void L1MuBMSectorProcessor::run ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
virtual

run the Sector Processor

Definition at line 107 of file L1MuBMSectorProcessor.cc.

References gather_cfg::cout, L1MuBMTFConfig::Debug(), relativeConstraints::empty, L1MuBMTrackAssembler::isEmpty(), m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_spid, m_TA, m_TrackCands, m_TracKCands, L1MuBMExtrapolationUnit::numberOfExt(), L1MuBMDataBuffer::numberTSphi(), L1MuBMTrackAssembler::print(), L1MuBMExtrapolationUnit::print(), L1MuBMDataBuffer::printTSphi(), reset(), L1MuBMTrackAssembler::run(), L1MuBMSectorReceiver::run(), L1MuBMExtrapolationUnit::run(), and L1MuBMSecProcId::wheel().

107  {
108 
109  // receive data and store them into the data buffer
110  if ( m_SectorReceiver ) m_SectorReceiver->run(bx, e, c);
111 
112  // check content of data buffer
113  if ( m_DataBuffer ) {
114  if ( L1MuBMTFConfig::Debug(4) && m_DataBuffer->numberTSphi() > 0 ) {
115  cout << "Phi track segments received by " << m_spid << " : " << endl;
117  }
118  }
119 
120  // perform all extrapolations
121  int n_ext = 0; // number of successful extrapolations
122  if ( m_EU && m_DataBuffer && m_DataBuffer->numberTSphi() > 1 ) {
123  m_EU->run(c);
124  n_ext = m_EU->numberOfExt();
125  if ( L1MuBMTFConfig::Debug(3) && n_ext > 0 ) {
126 // if ( print_flag && n_ext > 0 ) {
127  cout << "Number of successful extrapolations : " << n_ext << endl;
128  m_EU->print();
129  }
130  }
131 
132  // hardware debug (output from Extrapolator and Quality Sorter)
133  // m_EU->print(1);
134 
135  // perform track assembling
136  if ( m_TA && n_ext > 0 ) {
137  m_TA->run();
138  if ( L1MuBMTFConfig::Debug(3) ) m_TA->print();
139  }
140 
141  // assign pt, eta, phi and quality
142  if ( m_AUs[0] && !m_TA->isEmpty(0) ) m_AUs[0]->run(c);
143  if ( m_AUs[1] && !m_TA->isEmpty(1) ) m_AUs[1]->run(c);
144 
145  if ( m_spid.wheel() == -1 ) {
146  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(2)>3 && m_TrackCands[0]->address(2)<6 ) m_TrackCands[0]->reset();
147  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(3)>3 && m_TrackCands[0]->address(3)<6 ) m_TrackCands[0]->reset();
148  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(4)>3 && m_TrackCands[0]->address(4)<6 ) m_TrackCands[0]->reset();
149 
150  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(2)>3 && m_TracKCands[0]->address(2)<6 ) m_TracKCands[0]->reset();
151  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(3)>3 && m_TracKCands[0]->address(3)<6 ) m_TracKCands[0]->reset();
152  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(4)>3 && m_TracKCands[0]->address(4)<6 ) m_TracKCands[0]->reset();
153 
154  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(2)>3 && m_TrackCands[1]->address(2)<6 ) m_TrackCands[1]->reset();
155  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(3)>3 && m_TrackCands[1]->address(3)<6 ) m_TrackCands[1]->reset();
156  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(4)>3 && m_TrackCands[1]->address(4)<6 ) m_TrackCands[1]->reset();
157 
158  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(2)>3 && m_TracKCands[1]->address(2)<6 ) m_TracKCands[1]->reset();
159  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(3)>3 && m_TracKCands[1]->address(3)<6 ) m_TracKCands[1]->reset();
160  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(4)>3 && m_TracKCands[1]->address(4)<6 ) m_TracKCands[1]->reset();
161 
162  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(2)>7 && m_TrackCands[0]->address(2)<10 ) m_TrackCands[0]->reset();
163  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(3)>7 && m_TrackCands[0]->address(3)<10 ) m_TrackCands[0]->reset();
164  if ( m_TrackCands[0] && !m_TrackCands[0]->empty() && m_TrackCands[0]->address(4)>7 && m_TrackCands[0]->address(4)<10 ) m_TrackCands[0]->reset();
165 
166  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(2)>7 && m_TracKCands[0]->address(2)<10 ) m_TracKCands[0]->reset();
167  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(3)>7 && m_TracKCands[0]->address(3)<10 ) m_TracKCands[0]->reset();
168  if ( m_TracKCands[0] && !m_TracKCands[0]->empty() && m_TracKCands[0]->address(4)>7 && m_TracKCands[0]->address(4)<10 ) m_TracKCands[0]->reset();
169 
170  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(2)>7 && m_TrackCands[1]->address(2)<10 ) m_TrackCands[1]->reset();
171  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(3)>7 && m_TrackCands[1]->address(3)<10 ) m_TrackCands[1]->reset();
172  if ( m_TrackCands[1] && !m_TrackCands[1]->empty() && m_TrackCands[1]->address(4)>7 && m_TrackCands[1]->address(4)<10 ) m_TrackCands[1]->reset();
173 
174  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(2)>7 && m_TracKCands[1]->address(2)<10 ) m_TracKCands[1]->reset();
175  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(3)>7 && m_TracKCands[1]->address(3)<10 ) m_TracKCands[1]->reset();
176  if ( m_TracKCands[1] && !m_TracKCands[1]->empty() && m_TracKCands[1]->address(4)>7 && m_TracKCands[1]->address(4)<10 ) m_TracKCands[1]->reset();
177  }
178 
179 }
int numberTSphi() const
return number of non-empty phi track segments
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from the BBMX and CSC chamber triggers
void printTSphi() const
print all phi track segments which are in the buffer
virtual void run()
run Track Assembler
std::vector< L1MuBMTrack * > m_TracKCands
void print() const
print result of Track Assembler
std::vector< L1MuBMTrack * > m_TrackCands
int numberOfExt() const
return number of successful extrapolations
void print(int level=0) const
print all successful extrapolations
bool isEmpty(int id) const
is it a valid Track Class?
static bool Debug()
L1MuBMSectorReceiver * m_SectorReceiver
L1MuBMTrackAssembler * m_TA
L1MuBMDataBuffer * m_DataBuffer
std::vector< L1MuBMAssignmentUnit * > m_AUs
tuple cout
Definition: gather_cfg.py:145
L1MuBMExtrapolationUnit * m_EU
virtual void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Sector Processor
virtual void reset()
reset the Sector Processor
virtual void run(const edm::EventSetup &c)
run Extrapolation Unit
int wheel() const
return wheel number
const L1MuBMTrackAssembler* L1MuBMSectorProcessor::TA ( ) const
inline

return pointer to Track Assembler

Definition at line 96 of file L1MuBMSectorProcessor.h.

References m_TA.

Referenced by L1MuBMAssignmentUnit::getPtMethod(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMAssignmentUnit::Quality(), and L1MuBMAssignmentUnit::run().

96 { return m_TA; }
L1MuBMTrackAssembler * m_TA
const L1MuBMTrackFinder& L1MuBMSectorProcessor::tf ( ) const
inline

return reference to barrel MTTF

Definition at line 80 of file L1MuBMSectorProcessor.h.

References m_tf.

80 { return m_tf; }
const L1MuBMTrackFinder & m_tf
L1MuBMTrack* L1MuBMSectorProcessor::track ( int  id) const
inline

return pointer to muon candidate, index [0,1]

Definition at line 102 of file L1MuBMSectorProcessor.h.

References id(), and m_TrackCands.

Referenced by L1MuBMAssignmentUnit::PhiAU(), L1MuBMAssignmentUnit::PtAU(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMEtaProcessor::receiveAddresses(), L1MuBMWedgeSorter::run(), and L1MuBMAssignmentUnit::run().

102 { return m_TrackCands[id]; }
std::vector< L1MuBMTrack * > m_TrackCands
const L1MuBMSecProcId & id() const
return Sector Processor identifier
L1MuBMTrack* L1MuBMSectorProcessor::tracK ( int  id) const
inline

return pointer to muon candidate, index [0,1]

Definition at line 105 of file L1MuBMSectorProcessor.h.

References id(), and m_TracKCands.

Referenced by L1MuBMAssignmentUnit::PhiAU(), L1MuBMAssignmentUnit::PtAU(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMEtaProcessor::receiveAddresses(), and L1MuBMAssignmentUnit::run().

105 { return m_TracKCands[id]; }
std::vector< L1MuBMTrack * > m_TracKCands
const L1MuBMSecProcId & id() const
return Sector Processor identifier

Member Data Documentation

std::vector<L1MuBMAssignmentUnit*> L1MuBMSectorProcessor::m_AUs
private
L1MuBMDataBuffer* L1MuBMSectorProcessor::m_DataBuffer
private

Definition at line 118 of file L1MuBMSectorProcessor.h.

Referenced by data(), reset(), run(), and ~L1MuBMSectorProcessor().

L1MuBMExtrapolationUnit* L1MuBMSectorProcessor::m_EU
private

Definition at line 119 of file L1MuBMSectorProcessor.h.

Referenced by EU(), reset(), run(), and ~L1MuBMSectorProcessor().

L1MuBMSectorReceiver* L1MuBMSectorProcessor::m_SectorReceiver
private

Definition at line 117 of file L1MuBMSectorProcessor.h.

Referenced by reset(), run(), and ~L1MuBMSectorProcessor().

L1MuBMSecProcId L1MuBMSectorProcessor::m_spid
private

Definition at line 115 of file L1MuBMSectorProcessor.h.

Referenced by brl(), id(), L1MuBMSectorProcessor(), neighbour(), ovl(), print(), and run().

L1MuBMTrackAssembler* L1MuBMSectorProcessor::m_TA
private

Definition at line 120 of file L1MuBMSectorProcessor.h.

Referenced by reset(), run(), TA(), and ~L1MuBMSectorProcessor().

const L1MuBMTrackFinder& L1MuBMSectorProcessor::m_tf
private

Definition at line 114 of file L1MuBMSectorProcessor.h.

Referenced by neighbour(), and tf().

std::vector<L1MuBMTrack*> L1MuBMSectorProcessor::m_TrackCands
private
std::vector<L1MuBMTrack*> L1MuBMSectorProcessor::m_TracKCands
private