#include <L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.h>
Public Member Functions | |
int | id () const |
return Wedge Sorter identifier (0-11) | |
L1MuDTWedgeSorter (const L1MuDTTrackFinder &, int id) | |
constructor | |
void | print () const |
print results after sorting | |
virtual void | reset () |
reset Wedge Sorter | |
virtual void | run () |
run Wedge Sorter | |
const std::vector< const L1MuDTTrack * > & | tracks () const |
return vector of muon candidates | |
virtual | ~L1MuDTWedgeSorter () |
destructor | |
Private Member Functions | |
bool | anyTrack () const |
are there any non-empty muon candidates in the Wedge Sorter? | |
void | runCOL (std::vector< L1MuDTTrack * > &) const |
run the Cancel Out Logic of the wedge sorter | |
Static Private Member Functions | |
static bool | neighbour (const L1MuDTSecProcId &spid1, const L1MuDTSecProcId &spid2) |
find out if two Sector Processors are neighbours in the same wedge | |
Private Attributes | |
const L1MuDTTrackFinder & | m_tf |
std::vector< const L1MuDTTrack * > | m_TrackCands |
int | m_wsid |
A Wedge Sorter receives 2 muon candidates from each of the 6 Sector Processors of a wedge and forwards the 2 highest rank candidates per wedge to the DT Muon Sorter
N. Neumeister CERN EP
Definition at line 47 of file L1MuDTWedgeSorter.h.
L1MuDTWedgeSorter::L1MuDTWedgeSorter | ( | const L1MuDTTrackFinder & | tf, | |
int | id | |||
) |
constructor
Definition at line 52 of file L1MuDTWedgeSorter.cc.
References m_TrackCands.
00052 : 00053 m_tf(tf), m_wsid(id), m_TrackCands(2) { 00054 00055 m_TrackCands.reserve(2); 00056 00057 }
L1MuDTWedgeSorter::~L1MuDTWedgeSorter | ( | ) | [virtual] |
bool L1MuDTWedgeSorter::anyTrack | ( | ) | const [private] |
are there any non-empty muon candidates in the Wedge Sorter?
Definition at line 179 of file L1MuDTWedgeSorter.cc.
References iter, and m_TrackCands.
Referenced by print().
00179 { 00180 00181 vector<const L1MuDTTrack*>::const_iterator iter = m_TrackCands.begin(); 00182 while ( iter != m_TrackCands.end() ) { 00183 if ( *iter && !(*iter)->empty() ) return true; 00184 iter++; 00185 } 00186 00187 return false; 00188 00189 }
return Wedge Sorter identifier (0-11)
Definition at line 58 of file L1MuDTWedgeSorter.h.
References m_wsid.
00058 { return m_wsid; }
bool L1MuDTWedgeSorter::neighbour | ( | const L1MuDTSecProcId & | spid1, | |
const L1MuDTSecProcId & | spid2 | |||
) | [static, private] |
find out if two Sector Processors are neighbours in the same wedge
Definition at line 249 of file L1MuDTWedgeSorter.cc.
References L1MuDTSecProcId::sector(), and L1MuDTSecProcId::wheel().
00250 { 00251 00252 // neighbour definition: 00253 // wheel 1 : -2, -1, +1, +1, +2 00254 // wheel 2 : -3, -2, -1, +2, +3 00255 00256 bool neigh = false; 00257 00258 int sector1 = spid1.sector(); 00259 int wheel1 = spid1.wheel(); 00260 00261 int sector2 = spid2.sector(); 00262 int wheel2 = spid2.wheel(); 00263 00264 if ( sector1 == sector2 ) { 00265 00266 if ( ( wheel1 == -2 && wheel2 == -3 ) || 00267 ( wheel1 == -1 && wheel2 == -2 ) || 00268 ( wheel1 == +1 && wheel2 == -1 ) || 00269 ( wheel1 == +1 && wheel2 == +2 ) || 00270 ( wheel1 == +2 && wheel2 == +3 ) ) neigh = true; 00271 00272 } 00273 00274 return neigh; 00275 00276 }
print results after sorting
Definition at line 161 of file L1MuDTWedgeSorter.cc.
References anyTrack(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), iter, m_TrackCands, and m_wsid.
00161 { 00162 00163 if ( anyTrack() ) { 00164 cout << "Muon candidates found in Wedge Sorter " << m_wsid << " : " << endl; 00165 vector<const L1MuDTTrack*>::const_iterator iter = m_TrackCands.begin(); 00166 while ( iter != m_TrackCands.end() ) { 00167 if ( *iter ) cout << *(*iter) << " found in " 00168 << (*iter)->spid() << endl; 00169 iter++; 00170 } 00171 } 00172 00173 }
reset Wedge Sorter
Implements L1AbstractProcessor.
Definition at line 148 of file L1MuDTWedgeSorter.cc.
References iter, and m_TrackCands.
00148 { 00149 00150 vector<const L1MuDTTrack*>::iterator iter; 00151 for ( iter = m_TrackCands.begin(); iter != m_TrackCands.end(); iter++ ) { 00152 *iter = 0; 00153 } 00154 00155 }
run Wedge Sorter
Reimplemented from L1AbstractProcessor.
Definition at line 76 of file L1MuDTWedgeSorter.cc.
References L1MuDTTrack::address(), GenMuonPlsPt100GeV_cfg::cout, L1MuDTTFConfig::Debug(), L1MuDTTrack::empty(), lat::endl(), it, iter, m_tf, m_TrackCands, m_wsid, runCOL(), L1MuDTTrackFinder::sp(), L1MuDTSectorProcessor::track(), and muonGeometry::wheel.
00076 { 00077 00078 // get track candidates from Sector Processors 00079 vector<L1MuDTTrack*> wedgecands; 00080 wedgecands.reserve(12); 00081 00082 int sector = m_wsid; 00083 for ( int wheel = -3; wheel <= 3; wheel++ ) { 00084 if ( wheel == 0 ) continue; 00085 L1MuDTSecProcId tmpspid(wheel,sector); 00086 for ( int number = 0; number < 2; number++ ) { 00087 const L1MuDTTrack* cand = m_tf.sp(tmpspid)->track(number); 00088 if ( cand && !cand->empty() ) { 00089 // remove tracks which where found in wheel 0 and 00090 // which didn't cross wheel boundaries (SP -1) 00091 bool reject = false; 00092 if ( wheel == -1 ) { 00093 reject = true; 00094 for ( int stat = 2; stat <= 4; stat++ ) { 00095 int adr = cand->address(stat); 00096 // check addresses : 0,1,4,5,8,9 (own wheel) 00097 if ( adr != 15 ) reject &= ( (adr/2)%2 == 0 ); 00098 } 00099 } 00100 if ( !reject ) wedgecands.push_back(const_cast<L1MuDTTrack*>(cand)); 00101 } 00102 } 00103 } 00104 00105 // print input data 00106 if ( L1MuDTTFConfig::Debug(5) ) { 00107 cout << "Wedge Sorter " << m_wsid << " input: " 00108 << wedgecands.size() << endl; 00109 vector<L1MuDTTrack*>::const_iterator iter; 00110 for ( iter = wedgecands.begin(); iter != wedgecands.end(); iter++ ) { 00111 if (*iter ) (*iter)->print(); 00112 } 00113 } 00114 00115 // print input data 00116 runCOL(wedgecands); 00117 00118 // remove disabled candidates 00119 vector<L1MuDTTrack*>::iterator it = wedgecands.begin(); 00120 while ( it != wedgecands.end() ) { 00121 if ( *it && (*it)->empty() ) { 00122 wedgecands.erase(it); 00123 it = wedgecands.begin(); continue; 00124 } 00125 it++; 00126 } 00127 00128 // sort candidates by pt and quality and copy the 2 best candidates 00129 partial_sort_copy( wedgecands.begin(), wedgecands.end(), 00130 m_TrackCands.begin(), m_TrackCands.end(), 00131 L1MuDTTrack::Rank() ); 00132 00133 if ( L1MuDTTFConfig::Debug(4) ) { 00134 cout << "Wedge Sorter " << m_wsid << " output: " << endl; 00135 vector<const L1MuDTTrack*>::const_iterator iter; 00136 for ( iter = m_TrackCands.begin(); 00137 iter != m_TrackCands.end(); iter++ ) { 00138 if (*iter) (*iter)->print(); 00139 } 00140 } 00141 00142 }
void L1MuDTWedgeSorter::runCOL | ( | std::vector< L1MuDTTrack * > & | ) | const [private] |
const std::vector<const L1MuDTTrack*>& L1MuDTWedgeSorter::tracks | ( | void | ) | const [inline] |
return vector of muon candidates
Definition at line 70 of file L1MuDTWedgeSorter.h.
References m_TrackCands.
Referenced by L1MuDTMuonSorter::run().
00070 { return m_TrackCands; }
const L1MuDTTrackFinder& L1MuDTWedgeSorter::m_tf [private] |
std::vector<const L1MuDTTrack*> L1MuDTWedgeSorter::m_TrackCands [private] |
Definition at line 88 of file L1MuDTWedgeSorter.h.
Referenced by anyTrack(), L1MuDTWedgeSorter(), print(), reset(), run(), and tracks().
int L1MuDTWedgeSorter::m_wsid [private] |