#include <L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.h>
Public Member Functions | |
const L1MuDTAssignmentUnit * | AU (int id) const |
return pointer to Assignment Unit, index [0,1] | |
bool | brl () const |
is it a barrel-only Sector Processor? | |
L1MuDTDataBuffer * | data () |
const L1MuDTDataBuffer * | data () const |
return pointer to Data Buffer | |
const L1MuDTExtrapolationUnit * | EU () const |
return pointer to Extrapolation Unit | |
const L1MuDTSecProcId & | id () const |
return Sector Processor identifier | |
L1MuDTSectorProcessor (const L1MuDTTrackFinder &, const L1MuDTSecProcId &) | |
constructor | |
const L1MuDTSectorProcessor * | neighbour () const |
return pointer to the next wheel neighbour | |
bool | ovl () const |
is it an overlap region Sector Processor? | |
void | print () const |
print muon candidates found by the Sector Processor | |
virtual void | reset () |
reset the Sector Processor | |
virtual void | run (int bx, const edm::Event &e, const edm::EventSetup &c) |
run the Sector Processor | |
const L1MuDTTrackAssembler * | TA () const |
return pointer to Track Assembler | |
const L1MuDTTrackFinder & | tf () const |
return reference to barrel MTTF | |
L1MuDTTrack * | tracK (int id) const |
return pointer to muon candidate, index [0,1] | |
L1MuDTTrack * | track (int id) const |
return pointer to muon candidate, index [0,1] | |
virtual | ~L1MuDTSectorProcessor () |
destructor | |
Private Member Functions | |
bool | anyTrack () const |
are there any non-empty muon candidates? | |
Private Attributes | |
std::vector < L1MuDTAssignmentUnit * > | m_AUs |
L1MuDTDataBuffer * | m_DataBuffer |
L1MuDTExtrapolationUnit * | m_EU |
L1MuDTSectorReceiver * | m_SectorReceiver |
L1MuDTSecProcId | m_spid |
L1MuDTTrackAssembler * | m_TA |
const L1MuDTTrackFinder & | m_tf |
std::vector< L1MuDTTrack * > | m_TracKCands |
std::vector< L1MuDTTrack * > | m_TrackCands |
A Sector Processor consists of:
N. Neumeister CERN EP J. Troconiz UAM Madrid
Definition at line 54 of file L1MuDTSectorProcessor.h.
L1MuDTSectorProcessor::L1MuDTSectorProcessor | ( | const L1MuDTTrackFinder & | tf, | |
const L1MuDTSecProcId & | id | |||
) |
constructor
Definition at line 55 of file L1MuDTSectorProcessor.cc.
References m_AUs, m_spid, m_TracKCands, and m_TrackCands.
00056 : 00057 m_tf(tf), m_spid(id), 00058 m_SectorReceiver(new L1MuDTSectorReceiver(*this)), 00059 m_DataBuffer(new L1MuDTDataBuffer(*this)), 00060 m_EU(new L1MuDTExtrapolationUnit(*this)), 00061 m_TA(new L1MuDTTrackAssembler(*this)), 00062 m_AUs(), m_TrackCands(), m_TracKCands() { 00063 00064 // 2 assignment units 00065 m_AUs.reserve(2); 00066 m_AUs.push_back(new L1MuDTAssignmentUnit(*this,0)); 00067 m_AUs.push_back(new L1MuDTAssignmentUnit(*this,1)); 00068 00069 // now the 2 track candidates 00070 m_TrackCands.reserve(2); 00071 m_TrackCands.push_back(new L1MuDTTrack(m_spid) ); 00072 m_TrackCands.push_back(new L1MuDTTrack(m_spid) ); 00073 00074 m_TracKCands.reserve(2); 00075 m_TracKCands.push_back(new L1MuDTTrack(m_spid) ); 00076 m_TracKCands.push_back(new L1MuDTTrack(m_spid) ); 00077 00078 }
L1MuDTSectorProcessor::~L1MuDTSectorProcessor | ( | ) | [virtual] |
destructor
Definition at line 85 of file L1MuDTSectorProcessor.cc.
References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TracKCands, and m_TrackCands.
00085 { 00086 00087 delete m_SectorReceiver; 00088 delete m_DataBuffer; 00089 delete m_EU; 00090 delete m_TA; 00091 delete m_AUs[0]; 00092 delete m_AUs[1]; 00093 delete m_TrackCands[0]; 00094 delete m_TrackCands[1]; 00095 delete m_TracKCands[0]; 00096 delete m_TracKCands[1]; 00097 00098 }
bool L1MuDTSectorProcessor::anyTrack | ( | ) | const [private] |
are there any non-empty muon candidates?
Definition at line 208 of file L1MuDTSectorProcessor.cc.
References empty, and m_TrackCands.
Referenced by print().
00208 { 00209 00210 if ( m_TrackCands[0] && !m_TrackCands[0]->empty() ) return true; 00211 if ( m_TrackCands[1] && !m_TrackCands[1]->empty() ) return true; 00212 00213 return false; 00214 00215 }
const L1MuDTAssignmentUnit* L1MuDTSectorProcessor::AU | ( | int | id | ) | const [inline] |
return pointer to Assignment Unit, index [0,1]
Definition at line 99 of file L1MuDTSectorProcessor.h.
References m_AUs.
bool L1MuDTSectorProcessor::brl | ( | ) | const [inline] |
is it a barrel-only Sector Processor?
Definition at line 83 of file L1MuDTSectorProcessor.h.
References m_spid, and L1MuDTSecProcId::ovl().
L1MuDTDataBuffer* L1MuDTSectorProcessor::data | ( | void | ) | [inline] |
Definition at line 90 of file L1MuDTSectorProcessor.h.
References m_DataBuffer.
00090 { return m_DataBuffer; }
const L1MuDTDataBuffer* L1MuDTSectorProcessor::data | ( | void | ) | const [inline] |
return pointer to Data Buffer
Definition at line 89 of file L1MuDTSectorProcessor.h.
References m_DataBuffer.
Referenced by L1MuDTSectorReceiver::receiveCSCData(), L1MuDTSectorReceiver::receiveDTBXData(), L1MuDTSEU::run(), L1MuDTExtrapolationUnit::run(), and L1MuDTAssignmentUnit::TSR().
00089 { return m_DataBuffer; }
const L1MuDTExtrapolationUnit* L1MuDTSectorProcessor::EU | ( | ) | const [inline] |
return pointer to Extrapolation Unit
Definition at line 93 of file L1MuDTSectorProcessor.h.
References m_EU.
Referenced by L1MuDTTrackAssembler::run().
00093 { return m_EU; }
const L1MuDTSecProcId& L1MuDTSectorProcessor::id | ( | void | ) | const [inline] |
return Sector Processor identifier
Definition at line 77 of file L1MuDTSectorProcessor.h.
References m_spid.
Referenced by L1MuDTSectorReceiver::address2sector(), L1MuDTSectorReceiver::address2wheel(), neighbour(), L1MuDTAssignmentUnit::PhiAU(), L1MuDTExtrapolationUnit::print(), and L1MuDTSectorReceiver::receiveCSCData().
00077 { return m_spid; }
const L1MuDTSectorProcessor * L1MuDTSectorProcessor::neighbour | ( | ) | const |
return pointer to the next wheel neighbour
Definition at line 186 of file L1MuDTSectorProcessor.cc.
References funct::abs(), id(), m_spid, m_tf, L1MuDTSecProcId::sector(), L1MuDTTrackFinder::sp(), L1MuDTSecProcId::wheel(), and muonGeometry::wheel.
00186 { 00187 00188 int sector = m_spid.sector(); 00189 int wheel = m_spid.wheel(); 00190 00191 // the neighbour is in the same wedge with the following definition: 00192 // current SP -3 -2 -1 +1 +2 +3 00193 // neighbour -2 -1 +1 0 +1 +2 00194 00195 if ( wheel == 1) return 0; 00196 wheel = (wheel == -1) ? 1 : (wheel/abs(wheel)) * (abs(wheel)-1); 00197 00198 const L1MuDTSecProcId id(wheel,sector); 00199 00200 return m_tf.sp(id); 00201 00202 }
bool L1MuDTSectorProcessor::ovl | ( | ) | const [inline] |
is it an overlap region Sector Processor?
Definition at line 86 of file L1MuDTSectorProcessor.h.
References m_spid, and L1MuDTSecProcId::ovl().
Referenced by L1MuDTAssignmentUnit::getPtMethod(), L1MuDTSectorReceiver::receiveDTBXData(), and L1MuDTSectorReceiver::run().
print muon candidates found by the Sector Processor
Definition at line 169 of file L1MuDTSectorProcessor.cc.
References anyTrack(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), iter, m_spid, and m_TrackCands.
00169 { 00170 00171 if ( anyTrack() ) { 00172 cout << "Muon candidates found in " << m_spid << " : " << endl; 00173 vector<L1MuDTTrack*>::const_iterator iter = m_TrackCands.begin(); 00174 while ( iter != m_TrackCands.end() ) { 00175 if ( *iter) (*iter)->print(); 00176 iter++; 00177 } 00178 } 00179 00180 }
reset the Sector Processor
Definition at line 150 of file L1MuDTSectorProcessor.cc.
References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TracKCands, m_TrackCands, L1MuDTDataBuffer::reset(), L1MuDTSectorReceiver::reset(), L1MuDTExtrapolationUnit::reset(), and L1MuDTTrackAssembler::reset().
00150 { 00151 00152 if ( m_SectorReceiver ) m_SectorReceiver->reset(); 00153 if ( m_DataBuffer ) m_DataBuffer->reset(); 00154 if ( m_EU ) m_EU->reset(); 00155 if ( m_TA ) m_TA->reset(); 00156 if ( m_AUs[0] ) m_AUs[0]->reset(); 00157 if ( m_AUs[1] ) m_AUs[1]->reset(); 00158 if ( m_TrackCands[0] ) m_TrackCands[0]->reset(); 00159 if ( m_TrackCands[1] ) m_TrackCands[1]->reset(); 00160 if ( m_TracKCands[0] ) m_TracKCands[0]->reset(); 00161 if ( m_TracKCands[1] ) m_TracKCands[1]->reset(); 00162 00163 }
void L1MuDTSectorProcessor::run | ( | int | bx, | |
const edm::Event & | e, | |||
const edm::EventSetup & | c | |||
) | [virtual] |
run the Sector Processor
Definition at line 107 of file L1MuDTSectorProcessor.cc.
References GenMuonPlsPt100GeV_cfg::cout, L1MuDTTFConfig::Debug(), lat::endl(), L1MuDTTrackAssembler::isEmpty(), m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_spid, m_TA, L1MuDTExtrapolationUnit::numberOfExt(), L1MuDTDataBuffer::numberTSphi(), L1MuDTTrackAssembler::print(), L1MuDTExtrapolationUnit::print(), L1MuDTDataBuffer::printTSphi(), L1MuDTSectorReceiver::run(), L1MuDTTrackAssembler::run(), and L1MuDTExtrapolationUnit::run().
00107 { 00108 00109 // receive data and store them into the data buffer 00110 if ( m_SectorReceiver ) m_SectorReceiver->run(bx, e); 00111 00112 // check content of data buffer 00113 if ( m_DataBuffer ) { 00114 if ( L1MuDTTFConfig::Debug(4) && m_DataBuffer->numberTSphi() > 0 ) { 00115 cout << "Phi track segments received by " << m_spid << " : " << endl; 00116 m_DataBuffer->printTSphi(); 00117 } 00118 } 00119 00120 // perform all extrapolations 00121 int n_ext = 0; // number of successful extrapolations 00122 if ( m_EU && m_DataBuffer && m_DataBuffer->numberTSphi() > 1 ) { 00123 m_EU->run(c); 00124 n_ext = m_EU->numberOfExt(); 00125 if ( L1MuDTTFConfig::Debug(3) && n_ext > 0 ) { 00126 cout << "Number of successful extrapolations : " << n_ext << endl; 00127 m_EU->print(); 00128 } 00129 } 00130 00131 // hardware debug (output from Extrapolator and Quality Sorter) 00132 // m_EU->print(1); 00133 00134 // perform track assembling 00135 if ( m_TA && n_ext > 0 ) { 00136 m_TA->run(); 00137 if ( L1MuDTTFConfig::Debug(3) ) m_TA->print(); 00138 } 00139 00140 // assign pt, eta, phi and quality 00141 if ( m_AUs[0] && !m_TA->isEmpty(0) ) m_AUs[0]->run(c); 00142 if ( m_AUs[1] && !m_TA->isEmpty(1) ) m_AUs[1]->run(c); 00143 00144 }
const L1MuDTTrackAssembler* L1MuDTSectorProcessor::TA | ( | ) | const [inline] |
return pointer to Track Assembler
Definition at line 96 of file L1MuDTSectorProcessor.h.
References m_TA.
Referenced by L1MuDTAssignmentUnit::getPtMethod(), L1MuDTAssignmentUnit::QuaAU(), and L1MuDTAssignmentUnit::run().
00096 { return m_TA; }
const L1MuDTTrackFinder& L1MuDTSectorProcessor::tf | ( | ) | const [inline] |
return reference to barrel MTTF
Definition at line 80 of file L1MuDTSectorProcessor.h.
References m_tf.
00080 { return m_tf; }
L1MuDTTrack* L1MuDTSectorProcessor::tracK | ( | int | id | ) | const [inline] |
return pointer to muon candidate, index [0,1]
Definition at line 105 of file L1MuDTSectorProcessor.h.
References m_TracKCands.
Referenced by L1MuDTAssignmentUnit::PhiAU(), L1MuDTAssignmentUnit::PtAU(), L1MuDTAssignmentUnit::QuaAU(), L1MuDTEtaProcessor::receiveAddresses(), and L1MuDTAssignmentUnit::run().
00105 { return m_TracKCands[id]; }
L1MuDTTrack* L1MuDTSectorProcessor::track | ( | int | id | ) | const [inline] |
return pointer to muon candidate, index [0,1]
Definition at line 102 of file L1MuDTSectorProcessor.h.
References m_TrackCands.
Referenced by L1MuDTAssignmentUnit::PhiAU(), L1MuDTAssignmentUnit::PtAU(), L1MuDTAssignmentUnit::QuaAU(), L1MuDTEtaProcessor::receiveAddresses(), L1MuDTAssignmentUnit::run(), and L1MuDTWedgeSorter::run().
00102 { return m_TrackCands[id]; }
std::vector<L1MuDTAssignmentUnit*> L1MuDTSectorProcessor::m_AUs [private] |
Definition at line 121 of file L1MuDTSectorProcessor.h.
Referenced by AU(), L1MuDTSectorProcessor(), reset(), run(), and ~L1MuDTSectorProcessor().
Definition at line 118 of file L1MuDTSectorProcessor.h.
Referenced by data(), reset(), run(), and ~L1MuDTSectorProcessor().
Definition at line 119 of file L1MuDTSectorProcessor.h.
Referenced by EU(), reset(), run(), and ~L1MuDTSectorProcessor().
Definition at line 117 of file L1MuDTSectorProcessor.h.
Referenced by reset(), run(), and ~L1MuDTSectorProcessor().
L1MuDTSecProcId L1MuDTSectorProcessor::m_spid [private] |
Definition at line 115 of file L1MuDTSectorProcessor.h.
Referenced by brl(), id(), L1MuDTSectorProcessor(), neighbour(), ovl(), print(), and run().
L1MuDTTrackAssembler* L1MuDTSectorProcessor::m_TA [private] |
Definition at line 120 of file L1MuDTSectorProcessor.h.
Referenced by reset(), run(), TA(), and ~L1MuDTSectorProcessor().
const L1MuDTTrackFinder& L1MuDTSectorProcessor::m_tf [private] |
std::vector<L1MuDTTrack*> L1MuDTSectorProcessor::m_TracKCands [private] |
Definition at line 124 of file L1MuDTSectorProcessor.h.
Referenced by L1MuDTSectorProcessor(), reset(), tracK(), and ~L1MuDTSectorProcessor().
std::vector<L1MuDTTrack*> L1MuDTSectorProcessor::m_TrackCands [private] |
Definition at line 123 of file L1MuDTSectorProcessor.h.
Referenced by anyTrack(), L1MuDTSectorProcessor(), print(), reset(), track(), and ~L1MuDTSectorProcessor().