57 auto temp = std::make_shared<L1MuDTTFConfig>(ps);
58 std::shared_ptr<L1MuDTTFConfig>
empty;
59 std::atomic_compare_exchange_strong(&m_config, &
empty,
temp);
62 if (m_config->Debug(1))
64 if (m_config->Debug(1))
65 cout <<
"**** entering L1MuDTTrackFinder ****" << endl;
66 if (m_config->Debug(1))
74 _cache.reserve(4 * 17);
75 _cache0.reserve(144 * 17);
87 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
88 while (it_ep != m_epvec.end()) {
94 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
95 while (it_ws != m_wsvec.end()) {
114 if (m_config->Debug(1))
116 if (m_config->Debug(1))
117 cout <<
"**** L1MuDTTrackFinder building ****" << endl;
118 if (m_config->Debug(1))
122 for (
int wh = -3; wh <= 3; wh++) {
125 for (
int sc = 0; sc < 12; sc++) {
128 if (m_config->Debug(2))
129 cout <<
"creating " << tmpspid << endl;
130 m_spmap->insert(tmpspid, sp);
135 for (
int sc = 0; sc < 12; sc++) {
137 if (m_config->Debug(2))
138 cout <<
"creating Eta Processor " << sc << endl;
139 m_epvec.push_back(
ep);
141 if (m_config->Debug(2))
142 cout <<
"creating Wedge Sorter " << sc << endl;
143 m_wsvec.push_back(
ws);
147 if (m_config->Debug(2))
148 cout <<
"creating DT Muon Sorter " << endl;
159 e.getByToken(m_DTDigiToken, dttrig);
163 if (m_config->Debug(2))
165 if (m_config->Debug(2))
166 cout <<
"**** L1MuDTTrackFinder processing ****" << endl;
167 if (m_config->Debug(2))
170 int bx_min = m_config->getBxMin();
171 int bx_max = m_config->getBxMax();
173 for (
int bx = bx_min;
bx <= bx_max;
bx++) {
177 if (m_config->Debug(2))
178 cout <<
"L1MuDTTrackFinder processing bunch-crossing : " <<
bx << endl;
185 while (it_sp != m_spmap->end()) {
186 if (m_config->Debug(2))
187 cout <<
"running " << (*it_sp).second->id() << endl;
189 (*it_sp).second->run(
bx,
e,
c);
190 if (m_config->Debug(2) && (*it_sp).second)
191 (*it_sp).second->print();
196 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
197 while (it_ep != m_epvec.end()) {
198 if (m_config->Debug(2))
199 cout <<
"running Eta Processor " << (*it_ep)->id() << endl;
201 (*it_ep)->run(
bx,
e,
c);
202 if (m_config->Debug(2) && *it_ep)
208 it_sp = m_spmap->begin();
209 while (it_sp != m_spmap->end()) {
210 if (m_config->Debug(2))
211 cout <<
"reading " << (*it_sp).second->id() << endl;
217 cand->spid().wheel(),
218 cand->spid().sector(),
230 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
231 while (it_ws != m_wsvec.end()) {
232 if (m_config->Debug(2))
233 cout <<
"running Wedge Sorter " << (*it_ws)->id() << endl;
236 if (m_config->Debug(2) && *it_ws)
242 if (m_config->Debug(2))
243 cout <<
"running DT Muon Sorter" << endl;
246 if (m_config->Debug(2) && m_ms)
250 if (m_ms->numberOfTracks() > 0) {
251 const vector<const L1MuDTTrack*>& mttf_cont = m_ms->tracks();
252 vector<const L1MuDTTrack*>::const_iterator iter;
253 for (iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++) {
266 while (it_sp != m_spmap->end()) {
268 (*it_sp).second->reset();
272 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
273 while (it_ep != m_epvec.end()) {
279 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
280 while (it_ws != m_wsvec.end()) {
315 if ((*it).bx() ==
bx)
TFtracks_const_iter begin()
TFtracks_const_iter end()
static std::shared_ptr< L1MuDTTFConfig > m_config
Track Finder configuration.
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
void setup(edm::ConsumesCollector &&iC)
build the structure of the barrel MTTF
virtual ~L1MuDTTrackFinder()
destructor
void reset()
reset the barrel MTTF
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
L1MuDTTrackFinder(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
constructor
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
bool bxEmpty(int step) const
Phi_Container const * getContainer() const
SPmap::iterator SPmap_iter
std::vector< L1MuRegionalCand >::const_iterator TFtracks_const_iter
container for muon candidates
void reset(double vett[256])