CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1MuGMTPSB Class Reference

#include <L1MuGMTPSB.h>

Public Member Functions

const L1MuRegionalCandCSCMuon (int index) const
 get CSC muon More...
 
const L1MuRegionalCandDTBXMuon (int index) const
 get DTBX muon More...
 
bool empty () const
 are there any data in the PSB More...
 
const L1MuGMTMatrix< bool > & isolBits () const
 return isolation bits More...
 
 L1MuGMTPSB (const L1MuGlobalMuonTrigger &gmt, edm::ConsumesCollector &&iC)
 constructor More...
 
const L1MuGMTMatrix< bool > & mipBits () const
 return minimum ionizing bits More...
 
int numberCSC () const
 return number of non-empty CSC muons More...
 
int numberDTBX () const
 return number of non-empty DTBX muons More...
 
int numberRPC () const
 return number of non-empty RPC muons More...
 
void print () const
 print PSB More...
 
void receiveData (edm::Event &e, int bx)
 receive muon candidates More...
 
void reset ()
 clear PSB More...
 
const L1MuRegionalCandRPCMuon (int index) const
 get RPC muon More...
 
virtual ~L1MuGMTPSB ()
 destructor More...
 

Private Member Functions

void getCalo (edm::Event &e)
 get Calorimeter Trigger data More...
 
void getCSC (std::vector< L1MuRegionalCand > const *data, int bx)
 get muons from endcap Muon Trigger Track Finder More...
 
void getDTBX (std::vector< L1MuRegionalCand > const *data, int bx)
 get muons from barrel Muon Trigger Track Finder More...
 
void getRPCb (std::vector< L1MuRegionalCand > const *data, int bx)
 get muons from RPCb Trigger More...
 
void getRPCf (std::vector< L1MuRegionalCand > const *data, int bx)
 get muons from RPCf Trigger More...
 
void printCSC () const
 print CSC muons More...
 
void printDTBX () const
 print DTBX muons More...
 
void printRPCbarrel () const
 print barrel RPC muons More...
 
void printRPCendcap () const
 print endcap RPC muons More...
 

Private Attributes

std::vector< L1MuRegionalCandm_CscMuons
 
std::vector< L1MuRegionalCandm_DtbxMuons
 
const L1MuGlobalMuonTriggerm_gmt
 
L1MuGMTMatrix< bool > m_Isol
 
L1MuGMTMatrix< bool > m_Mip
 
std::vector< L1MuRegionalCandm_RpcMuons
 

Detailed Description

L1 Global Muon Trigger Pipelined Synchronising Buffer module.

          the PSB receives muon candidates
          from the barrel track finder, the endcap track finder
          and from the RPC trigger. In addition it gets
          isolation and mip bits from the 
          regional Calorimeter Trigger

Definition at line 49 of file L1MuGMTPSB.h.

Constructor & Destructor Documentation

L1MuGMTPSB::L1MuGMTPSB ( const L1MuGlobalMuonTrigger gmt,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 52 of file L1MuGMTPSB.cc.

References L1MuGMTConfig::getCSCInputTag(), L1MuGMTConfig::getDTInputTag(), L1MuGMTConfig::getMipIsoInputTag(), L1MuGMTConfig::getRPCbInputTag(), L1MuGMTConfig::getRPCfInputTag(), m_CscMuons, m_DtbxMuons, m_RpcMuons, L1MuGMTConfig::MAXCSC, L1MuGMTConfig::MAXDTBX, and L1MuGMTConfig::MAXRPC.

53  : m_gmt(gmt),
57  m_Isol(14, 18, false),
58  m_Mip(14, 18, false) {
62  iC.consumes<std::vector<L1MuRegionalCand> >(L1MuGMTConfig::getDTInputTag());
63  iC.consumes<std::vector<L1MuRegionalCand> >(L1MuGMTConfig::getCSCInputTag());
64  iC.consumes<std::vector<L1MuRegionalCand> >(L1MuGMTConfig::getRPCbInputTag());
65  iC.consumes<std::vector<L1MuRegionalCand> >(L1MuGMTConfig::getRPCfInputTag());
67 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
static edm::InputTag getRPCfInputTag()
Definition: L1MuGMTConfig.h:98
static edm::InputTag getRPCbInputTag()
Definition: L1MuGMTConfig.h:97
const L1MuGlobalMuonTrigger & m_gmt
Definition: L1MuGMTPSB.h:122
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
L1MuGMTMatrix< bool > m_Isol
Definition: L1MuGMTPSB.h:128
static edm::InputTag getMipIsoInputTag()
Definition: L1MuGMTConfig.h:99
L1MuGMTMatrix< bool > m_Mip
Definition: L1MuGMTPSB.h:129
std::vector< L1CaloRegion > L1CaloRegionCollection
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
static edm::InputTag getDTInputTag()
Definition: L1MuGMTConfig.h:95
static const unsigned int MAXRPC
Definition: L1MuGMTConfig.h:85
static edm::InputTag getCSCInputTag()
Definition: L1MuGMTConfig.h:96
L1MuGMTPSB::~L1MuGMTPSB ( )
virtual

destructor

Definition at line 72 of file L1MuGMTPSB.cc.

References m_CscMuons, m_DtbxMuons, m_RpcMuons, and reset().

72  {
73  reset();
74  m_RpcMuons.clear();
75  m_DtbxMuons.clear();
76  m_CscMuons.clear();
77 }
void reset()
clear PSB
Definition: L1MuGMTPSB.cc:191
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125

Member Function Documentation

const L1MuRegionalCand * L1MuGMTPSB::CSCMuon ( int  index) const

get CSC muon

Definition at line 238 of file L1MuGMTPSB.cc.

References m_CscMuons, and L1MuGMTConfig::MAXCSC.

Referenced by L1MuGMTMatcher::load(), L1MuGMTMerger::load(), and L1MuGMTMipIsoAU::load().

238  {
239  return (index < (int)L1MuGMTConfig::MAXCSC && index >= 0) ? &(m_CscMuons[index]) : nullptr;
240 }
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
const L1MuRegionalCand * L1MuGMTPSB::DTBXMuon ( int  index) const

get DTBX muon

Definition at line 231 of file L1MuGMTPSB.cc.

References m_DtbxMuons, and L1MuGMTConfig::MAXDTBX.

Referenced by L1MuGMTMatcher::load(), L1MuGMTMerger::load(), and L1MuGMTMipIsoAU::load().

231  {
232  return (index < (int)L1MuGMTConfig::MAXDTBX && index >= 0) ? &(m_DtbxMuons[index]) : nullptr;
233 }
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
bool L1MuGMTPSB::empty ( void  ) const

are there any data in the PSB

Definition at line 287 of file L1MuGMTPSB.cc.

References contentValuesFiles::number, numberCSC(), numberDTBX(), and numberRPC().

Referenced by printCSC(), printDTBX(), printRPCbarrel(), printRPCendcap(), L1MuGlobalMuonTrigger::produce(), and receiveData().

287  {
288  int number = numberRPC() + numberDTBX() + numberCSC();
289 
290  return (number == 0);
291 }
int numberDTBX() const
return number of non-empty DTBX muons
Definition: L1MuGMTPSB.cc:259
int numberRPC() const
return number of non-empty RPC muons
Definition: L1MuGMTPSB.cc:245
int numberCSC() const
return number of non-empty CSC muons
Definition: L1MuGMTPSB.cc:273
void L1MuGMTPSB::getCalo ( edm::Event e)
private

get Calorimeter Trigger data

Definition at line 417 of file L1MuGMTPSB.cc.

References L1MuGlobalMuonTrigger::currentReadoutRecord(), L1MuGMTConfig::Debug(), edm::Event::getByLabel(), L1MuGMTConfig::getMipIsoInputTag(), edm::HandleBase::isValid(), m_gmt, m_Isol, m_Mip, edm::Handle< T >::product(), L1MuGMTMatrix< T >::set(), L1MuGMTReadoutRecord::setMIPbit(), and L1MuGMTReadoutRecord::setQuietbit().

Referenced by receiveData().

417  {
420  if (calocoll_h.isValid()) {
421  L1CaloRegionCollection const* regions = calocoll_h.product();
422  L1CaloRegionCollection::const_iterator iter;
423 
424  // edm::LogVerbatim("GMT_PSB_info") << "MIP/QUIET bits rceived by the GMT :";
425 
426  for (iter = regions->begin(); iter != regions->end(); iter++) {
427  if ((*iter).id().ieta() < 4 || (*iter).id().ieta() > 17 || (*iter).id().iphi() > 17)
428  continue;
429  m_Isol.set((*iter).id().ieta() - 4, (*iter).id().iphi(), (*iter).quiet());
430  m_Mip.set((*iter).id().ieta() - 4, (*iter).id().iphi(), (*iter).mip());
431 
432  if ((*iter).quiet())
433  m_gmt.currentReadoutRecord()->setQuietbit((*iter).id().ieta() - 4, (*iter).id().iphi());
434 
435  if ((*iter).mip())
436  m_gmt.currentReadoutRecord()->setMIPbit((*iter).id().ieta() - 4, (*iter).id().iphi());
437 
438  // edm::LogVerbatim("GMT_PSB_info") << (*iter).id().ieta()-4 << " "
439  // << (*iter).id().iphi() << " "
440  // << (*iter).quiet() << " "
441  // << (*iter).mip();
442  }
443  } else {
444  if (L1MuGMTConfig::Debug(1)) {
445  edm::LogWarning("GlobalMuonTrigger")
446  << "\nWarning: GlobalMuonTrigger: input tag " << L1MuGMTConfig::getMipIsoInputTag()
447  << "\nrequested, but not found in the event." << std::endl;
448  }
449  }
450 }
void set(int r, int c, T v)
set matrix element
const L1MuGlobalMuonTrigger & m_gmt
Definition: L1MuGMTPSB.h:122
void setQuietbit(int eta, int phi)
set Quiet bit
void setMIPbit(int eta, int phi)
set MIP bit
static bool Debug()
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
L1MuGMTMatrix< bool > m_Isol
Definition: L1MuGMTPSB.h:128
T const * product() const
Definition: Handle.h:70
static edm::InputTag getMipIsoInputTag()
Definition: L1MuGMTConfig.h:99
L1MuGMTMatrix< bool > m_Mip
Definition: L1MuGMTPSB.h:129
std::vector< L1CaloRegion > L1CaloRegionCollection
Log< level::Warning, false > LogWarning
L1MuGMTReadoutRecord * currentReadoutRecord() const
return a reference to the current record in the ring buffer
void L1MuGMTPSB::getCSC ( std::vector< L1MuRegionalCand > const *  data,
int  bx 
)
private

get muons from endcap Muon Trigger Track Finder

Definition at line 353 of file L1MuGMTPSB.cc.

References makePileupJSON::bx, m_CscMuons, and L1MuGMTConfig::MAXCSC.

Referenced by receiveData().

353  {
354  int icsc = 0;
355  std::vector<L1MuRegionalCand>::const_iterator iter;
356  for (iter = data->begin(); iter != data->end(); iter++) {
357  if ((*iter).bx() != bx)
358  continue;
359  if (icsc < (int)L1MuGMTConfig::MAXCSC) {
360  m_CscMuons[icsc] = (*iter);
361  icsc++;
362  }
363  }
364 }
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void L1MuGMTPSB::getDTBX ( std::vector< L1MuRegionalCand > const *  data,
int  bx 
)
private

get muons from barrel Muon Trigger Track Finder

Definition at line 330 of file L1MuGMTPSB.cc.

References makePileupJSON::bx, L1MuGMTConfig::Debug(), m_DtbxMuons, and L1MuGMTConfig::MAXDTBX.

Referenced by receiveData().

330  {
331  // temporary hack with bxoffset - to be removed, trigger bx should be 0
332  int bxoffset = 0;
333  int idtbx = 0;
334  std::vector<L1MuRegionalCand>::const_iterator iter;
335  for (iter = data->begin(); iter != data->end(); iter++) {
336  if (L1MuGMTConfig::Debug(2))
337  edm::LogVerbatim("") << "DTTF BX: " << (*iter).bx() << " my bx: " << bx;
338  if ((*iter).bx() > 10)
339  bxoffset = 16;
340  if ((*iter).bx() != bx + bxoffset)
341  continue;
342  if (idtbx < (int)L1MuGMTConfig::MAXDTBX) {
343  m_DtbxMuons[idtbx] = (*iter);
344  m_DtbxMuons[idtbx].setBx(bx);
345  idtbx++;
346  }
347  }
348 }
static bool Debug()
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
void L1MuGMTPSB::getRPCb ( std::vector< L1MuRegionalCand > const *  data,
int  bx 
)
private

get muons from RPCb Trigger

Definition at line 296 of file L1MuGMTPSB.cc.

References makePileupJSON::bx, m_RpcMuons, and L1MuGMTConfig::MAXRPCbarrel.

Referenced by receiveData().

296  {
297  int irpcb = 0;
298  std::vector<L1MuRegionalCand>::const_iterator iter;
299  for (iter = data->begin(); iter != data->end(); iter++) {
300  if ((*iter).bx() != bx)
301  continue;
302  if (irpcb < (int)L1MuGMTConfig::MAXRPCbarrel) {
303  if (!(*iter).empty())
304  m_RpcMuons[irpcb] = (*iter);
305  irpcb++;
306  }
307  }
308 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
void L1MuGMTPSB::getRPCf ( std::vector< L1MuRegionalCand > const *  data,
int  bx 
)
private

get muons from RPCf Trigger

Definition at line 313 of file L1MuGMTPSB.cc.

References makePileupJSON::bx, m_RpcMuons, and L1MuGMTConfig::MAXRPCendcap.

Referenced by receiveData().

313  {
314  int irpcf = 0;
315  std::vector<L1MuRegionalCand>::const_iterator iter;
316  for (iter = data->begin(); iter != data->end(); iter++) {
317  if ((*iter).bx() != bx)
318  continue;
319  if (irpcf < (int)L1MuGMTConfig::MAXRPCendcap) {
320  if (!(*iter).empty())
321  m_RpcMuons[irpcf + 4] = (*iter);
322  irpcf++;
323  }
324  }
325 }
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:85
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
const L1MuGMTMatrix<bool>& L1MuGMTPSB::isolBits ( ) const
inline

return isolation bits

Definition at line 88 of file L1MuGMTPSB.h.

References m_Isol.

Referenced by L1MuGMTMipIsoAU::assignISO().

88 { return m_Isol; }
L1MuGMTMatrix< bool > m_Isol
Definition: L1MuGMTPSB.h:128
const L1MuGMTMatrix<bool>& L1MuGMTPSB::mipBits ( ) const
inline

return minimum ionizing bits

Definition at line 91 of file L1MuGMTPSB.h.

References m_Mip.

Referenced by L1MuGMTMipIsoAU::assignMIP().

91 { return m_Mip; }
L1MuGMTMatrix< bool > m_Mip
Definition: L1MuGMTPSB.h:129
int L1MuGMTPSB::numberCSC ( ) const

return number of non-empty CSC muons

Definition at line 273 of file L1MuGMTPSB.cc.

References submitPVResolutionJobs::count, and m_CscMuons.

Referenced by empty().

273  {
274  int count = 0;
275  std::vector<L1MuRegionalCand>::const_iterator iter = m_CscMuons.begin();
276  while (iter != m_CscMuons.end()) {
277  if (!(*iter).empty())
278  count++;
279  iter++;
280  }
281  return count;
282 }
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
int L1MuGMTPSB::numberDTBX ( ) const

return number of non-empty DTBX muons

Definition at line 259 of file L1MuGMTPSB.cc.

References submitPVResolutionJobs::count, and m_DtbxMuons.

Referenced by empty().

259  {
260  int count = 0;
261  std::vector<L1MuRegionalCand>::const_iterator iter = m_DtbxMuons.begin();
262  while (iter != m_DtbxMuons.end()) {
263  if (!(*iter).empty())
264  count++;
265  iter++;
266  }
267  return count;
268 }
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
int L1MuGMTPSB::numberRPC ( ) const

return number of non-empty RPC muons

Definition at line 245 of file L1MuGMTPSB.cc.

References submitPVResolutionJobs::count, and m_RpcMuons.

Referenced by empty().

245  {
246  int count = 0;
247  std::vector<L1MuRegionalCand>::const_iterator iter = m_RpcMuons.begin();
248  while (iter != m_RpcMuons.end()) {
249  if (!(*iter).empty())
250  count++;
251  iter++;
252  }
253  return count;
254 }
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
void L1MuGMTPSB::print ( void  ) const

print PSB

Definition at line 212 of file L1MuGMTPSB.cc.

References printCSC(), printDTBX(), printRPCbarrel(), and printRPCendcap().

Referenced by L1MuGlobalMuonTrigger::produce().

212  {
213  edm::LogVerbatim("GMT_PSB_info") << " ";
214  printDTBX();
215  printRPCbarrel();
216  printCSC();
217  printRPCendcap();
218  edm::LogVerbatim("GMT_PSB_info") << " ";
219 }
Log< level::Info, true > LogVerbatim
void printDTBX() const
print DTBX muons
Definition: L1MuGMTPSB.cc:393
void printRPCbarrel() const
print barrel RPC muons
Definition: L1MuGMTPSB.cc:369
void printCSC() const
print CSC muons
Definition: L1MuGMTPSB.cc:405
void printRPCendcap() const
print endcap RPC muons
Definition: L1MuGMTPSB.cc:381
void L1MuGMTPSB::printCSC ( ) const
private

print CSC muons

Definition at line 405 of file L1MuGMTPSB.cc.

References empty(), mps_fire::i, m_CscMuons, and L1MuGMTConfig::MAXCSC.

Referenced by print().

405  {
406  edm::LogVerbatim("GMT_PSB_info") << "CSC muons received by the GMT :";
407 
408  for (unsigned i = 0; i < L1MuGMTConfig::MAXCSC; i++) {
409  if (!m_CscMuons[i].empty())
410  m_CscMuons[i].print();
411  }
412 }
Log< level::Info, true > LogVerbatim
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
void L1MuGMTPSB::printDTBX ( ) const
private

print DTBX muons

Definition at line 393 of file L1MuGMTPSB.cc.

References empty(), mps_fire::i, m_DtbxMuons, and L1MuGMTConfig::MAXDTBX.

Referenced by print().

393  {
394  edm::LogVerbatim("GMT_PSB_info") << "DTBX muons received by the GMT :";
395 
396  for (unsigned i = 0; i < L1MuGMTConfig::MAXDTBX; i++) {
397  if (!m_DtbxMuons[i].empty())
398  m_DtbxMuons[i].print();
399  }
400 }
Log< level::Info, true > LogVerbatim
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
void L1MuGMTPSB::printRPCbarrel ( ) const
private

print barrel RPC muons

Definition at line 369 of file L1MuGMTPSB.cc.

References empty(), mps_fire::i, m_RpcMuons, and L1MuGMTConfig::MAXRPCbarrel.

Referenced by print().

369  {
370  edm::LogVerbatim("GMT_PSB_info") << "RPC barrel muons received by the GMT :";
371 
372  for (unsigned i = 0; i < L1MuGMTConfig::MAXRPCbarrel; i++) {
373  if (!m_RpcMuons[i].empty())
374  m_RpcMuons[i].print();
375  }
376 }
Log< level::Info, true > LogVerbatim
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
void L1MuGMTPSB::printRPCendcap ( ) const
private

print endcap RPC muons

Definition at line 381 of file L1MuGMTPSB.cc.

References empty(), mps_fire::i, m_RpcMuons, and L1MuGMTConfig::MAXRPCendcap.

Referenced by print().

381  {
382  edm::LogVerbatim("GMT_PSB_info") << "RPC endcap muons received by the GMT :";
383 
384  for (unsigned i = 0; i < L1MuGMTConfig::MAXRPCendcap; i++) {
385  if (!m_RpcMuons[i + 4].empty())
386  m_RpcMuons[i + 4].print();
387  }
388 }
Log< level::Info, true > LogVerbatim
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:85
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
void L1MuGMTPSB::receiveData ( edm::Event e,
int  bx 
)

receive muon candidates

Definition at line 86 of file L1MuGMTPSB.cc.

References makePileupJSON::bx, L1MuGlobalMuonTrigger::currentReadoutRecord(), L1MuGMTConfig::Debug(), empty(), L1MuRegionalCand::eta_packed(), edm::Event::getByLabel(), getCalo(), L1MuGMTConfig::getCaloTrigger(), getCSC(), L1MuGMTConfig::getCSCInputTag(), getDTBX(), L1MuGMTConfig::getDTInputTag(), L1MuGMTConfig::getGMTChanMask(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), L1MuTriggerPtScale::getPtScale(), L1MuTriggerScales::getRegionalEtaScale(), getRPCb(), L1MuGMTConfig::getRPCbInputTag(), getRPCf(), L1MuGMTConfig::getRPCfInputTag(), L1MuGMTChannelMask::getSubsystemMask(), L1MuGMTConfig::getTriggerPtScale(), L1MuGMTConfig::getTriggerScales(), mps_fire::i, edm::HandleBase::isValid(), label, m_CscMuons, m_DtbxMuons, m_gmt, m_RpcMuons, L1MuRegionalCand::phi_packed(), edm::Handle< T >::product(), L1MuRegionalCand::pt_packed(), L1MuRegionalCand::setEtaValue(), L1MuGMTReadoutRecord::setInputCand(), L1MuRegionalCand::setPhiValue(), L1MuRegionalCand::setPtValue(), and L1MuRegionalCand::type_idx().

Referenced by L1MuGlobalMuonTrigger::produce().

86  {
88 
90 
91  const L1MuGMTChannelMask* theChannelMask = L1MuGMTConfig::getGMTChanMask();
92  unsigned mask = theChannelMask->getSubsystemMask();
93 
94  if ((L1MuGMTConfig::getDTInputTag()).label() != "none" && !(mask & 1)) {
96  if (rc_handle.isValid()) {
97  getDTBX(rc_handle.product(), bx);
98  } else {
99  if (L1MuGMTConfig::Debug(1)) {
100  edm::LogWarning("GlobalMuonTrigger")
101  << "\nWarning: GlobalMuonTrigger: input tag " << L1MuGMTConfig::getDTInputTag()
102  << "\nrequested, but not found in the event." << std::endl;
103  }
104  }
105  }
106  if ((L1MuGMTConfig::getCSCInputTag()).label() != "none" && !(mask & 4)) {
108  if (rc_handle.isValid()) {
109  getCSC(rc_handle.product(), bx);
110  } else {
111  if (L1MuGMTConfig::Debug(1)) {
112  edm::LogWarning("GlobalMuonTrigger")
113  << "\nWarning: GlobalMuonTrigger: input tag " << L1MuGMTConfig::getCSCInputTag()
114  << "\nrequested, but not found in the event." << std::endl;
115  }
116  }
117  }
118  if ((L1MuGMTConfig::getRPCbInputTag()).label() != "none" && !(mask & 2)) {
120  if (rc_handle.isValid()) {
121  getRPCb(rc_handle.product(), bx);
122  } else {
123  if (L1MuGMTConfig::Debug(1)) {
124  edm::LogWarning("GlobalMuonTrigger")
125  << "\nWarning: GlobalMuonTrigger: input tag " << L1MuGMTConfig::getRPCbInputTag()
126  << "\nrequested, but not found in the event." << std::endl;
127  }
128  }
129  }
130  if ((L1MuGMTConfig::getRPCfInputTag()).label() != "none" && !(mask & 8)) {
132  if (rc_handle.isValid()) {
133  getRPCf(rc_handle.product(), bx);
134  } else {
135  if (L1MuGMTConfig::Debug(1)) {
136  edm::LogWarning("GlobalMuonTrigger")
137  << "\nWarning: GlobalMuonTrigger: input tag " << L1MuGMTConfig::getRPCfInputTag()
138  << "\nrequested, but not found in the event." << std::endl;
139  }
140  }
141  }
142 
144 
145  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
146  const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale();
147 
148  // store data in readout record
149  for (int i = 0; i < 4; i++) {
150  L1MuRegionalCand* cand = &(m_DtbxMuons[i]);
151  cand->setPhiValue(theTriggerScales->getPhiScale()->getLowEdge(cand->phi_packed()));
152  cand->setEtaValue(theTriggerScales->getRegionalEtaScale(cand->type_idx())->getCenter(cand->eta_packed()));
153  cand->setPtValue(theTriggerPtScale->getPtScale()->getLowEdge(cand->pt_packed()));
154  // cand->setPtValue( theTriggerScales->getPtScale()->getLowEdge(cand->pt_packed()) );
156  }
157  for (int i = 0; i < 4; i++) {
158  L1MuRegionalCand* cand = &(m_RpcMuons[i]);
159  cand->setPhiValue(theTriggerScales->getPhiScale()->getLowEdge(cand->phi_packed()));
160  cand->setEtaValue(theTriggerScales->getRegionalEtaScale(cand->type_idx())->getCenter(cand->eta_packed()));
161  cand->setPtValue(theTriggerPtScale->getPtScale()->getLowEdge(cand->pt_packed()));
162  // cand->setPtValue( theTriggerScales->getPtScale()->getLowEdge(cand->pt_packed()) );
163  m_gmt.currentReadoutRecord()->setInputCand(i + 4, *cand);
164  }
165  for (int i = 0; i < 4; i++) {
166  L1MuRegionalCand* cand = &(m_CscMuons[i]);
167  cand->setPhiValue(theTriggerScales->getPhiScale()->getLowEdge(cand->phi_packed()));
168  cand->setEtaValue(theTriggerScales->getRegionalEtaScale(cand->type_idx())->getCenter(cand->eta_packed()));
169  cand->setPtValue(theTriggerPtScale->getPtScale()->getLowEdge(cand->pt_packed()));
170  // cand->setPtValue( theTriggerScales->getPtScale()->getLowEdge(cand->pt_packed()) );
171  m_gmt.currentReadoutRecord()->setInputCand(i + 8, *cand);
172  }
173  for (int i = 0; i < 4; i++) {
174  L1MuRegionalCand* cand = &(m_RpcMuons[i + 4]);
175  cand->setPhiValue(theTriggerScales->getPhiScale()->getLowEdge(cand->phi_packed()));
176  cand->setEtaValue(theTriggerScales->getRegionalEtaScale(cand->type_idx())->getCenter(cand->eta_packed()));
177  cand->setPtValue(theTriggerPtScale->getPtScale()->getLowEdge(cand->pt_packed()));
178  // cand->setPtValue( theTriggerScales->getPtScale()->getLowEdge(cand->pt_packed()) );
179  m_gmt.currentReadoutRecord()->setInputCand(i + 12, *cand);
180  }
181 
182  // if there is at least one muon start the calorimeter trigger
183 
185  getCalo(e);
186 }
void getRPCf(std::vector< L1MuRegionalCand > const *data, int bx)
get muons from RPCf Trigger
Definition: L1MuGMTPSB.cc:313
void getCSC(std::vector< L1MuRegionalCand > const *data, int bx)
get muons from endcap Muon Trigger Track Finder
Definition: L1MuGMTPSB.cc:353
static edm::InputTag getRPCfInputTag()
Definition: L1MuGMTConfig.h:98
static edm::InputTag getRPCbInputTag()
Definition: L1MuGMTConfig.h:97
const L1MuScale * getPtScale() const
get the Pt scale
static bool getCaloTrigger()
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
void setInputCand(int nr, unsigned data)
set Input muon
unsigned getSubsystemMask() const
void getCalo(edm::Event &e)
get Calorimeter Trigger data
Definition: L1MuGMTPSB.cc:417
const L1MuGlobalMuonTrigger & m_gmt
Definition: L1MuGMTPSB.h:122
void setPtValue(float ptVal)
Set Pt Value.
char const * label
static bool Debug()
void setPhiValue(float phiVal)
Set Phi Value.
const L1MuScale * getPhiScale() const
get the phi scale
static const L1MuGMTChannelMask * getGMTChanMask()
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
unsigned eta_packed() const
return eta packed as in hardware
bool isValid() const
Definition: HandleBase.h:70
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
static const L1MuTriggerPtScale * getTriggerPtScale()
T const * product() const
Definition: Handle.h:70
static const L1MuTriggerScales * getTriggerScales()
void getRPCb(std::vector< L1MuRegionalCand > const *data, int bx)
get muons from RPCb Trigger
Definition: L1MuGMTPSB.cc:296
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
void getDTBX(std::vector< L1MuRegionalCand > const *data, int bx)
get muons from barrel Muon Trigger Track Finder
Definition: L1MuGMTPSB.cc:330
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
Log< level::Warning, false > LogWarning
unsigned pt_packed() const
return pt packed as in hardware
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
static edm::InputTag getDTInputTag()
Definition: L1MuGMTConfig.h:95
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
L1MuGMTReadoutRecord * currentReadoutRecord() const
return a reference to the current record in the ring buffer
unsigned phi_packed() const
return phi packed as in hardware
static edm::InputTag getCSCInputTag()
Definition: L1MuGMTConfig.h:96
void L1MuGMTPSB::reset ( void  )

clear PSB

Definition at line 191 of file L1MuGMTPSB.cc.

References m_CscMuons, m_DtbxMuons, m_Isol, m_Mip, m_RpcMuons, and L1MuGMTMatrix< T >::reset().

Referenced by L1MuGlobalMuonTrigger::reset(), and ~L1MuGMTPSB().

191  {
192  std::vector<L1MuRegionalCand>::iterator iter;
193  iter = m_RpcMuons.begin();
194  while (iter != m_RpcMuons.end())
195  (*(iter++)).reset();
196 
197  iter = m_DtbxMuons.begin();
198  while (iter != m_DtbxMuons.end())
199  (*(iter++)).reset();
200 
201  iter = m_CscMuons.begin();
202  while (iter != m_CscMuons.end())
203  (*(iter++)).reset();
204 
205  m_Isol.reset(false);
206  m_Mip.reset(false);
207 }
void reset()
clear PSB
Definition: L1MuGMTPSB.cc:191
void reset(T v)
reset all elements
std::vector< L1MuRegionalCand > m_CscMuons
Definition: L1MuGMTPSB.h:126
L1MuGMTMatrix< bool > m_Isol
Definition: L1MuGMTPSB.h:128
L1MuGMTMatrix< bool > m_Mip
Definition: L1MuGMTPSB.h:129
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
std::vector< L1MuRegionalCand > m_DtbxMuons
Definition: L1MuGMTPSB.h:125
const L1MuRegionalCand * L1MuGMTPSB::RPCMuon ( int  index) const

get RPC muon

Definition at line 224 of file L1MuGMTPSB.cc.

References m_RpcMuons, and L1MuGMTConfig::MAXRPC.

Referenced by L1MuGMTMatcher::load(), L1MuGMTMerger::load(), and L1MuGMTMipIsoAU::load().

224  {
225  return (index < (int)L1MuGMTConfig::MAXRPC && index >= 0) ? &(m_RpcMuons[index]) : nullptr;
226 }
std::vector< L1MuRegionalCand > m_RpcMuons
Definition: L1MuGMTPSB.h:124
static const unsigned int MAXRPC
Definition: L1MuGMTConfig.h:85

Member Data Documentation

std::vector<L1MuRegionalCand> L1MuGMTPSB::m_CscMuons
private
std::vector<L1MuRegionalCand> L1MuGMTPSB::m_DtbxMuons
private
const L1MuGlobalMuonTrigger& L1MuGMTPSB::m_gmt
private

Definition at line 122 of file L1MuGMTPSB.h.

Referenced by getCalo(), and receiveData().

L1MuGMTMatrix<bool> L1MuGMTPSB::m_Isol
private

Definition at line 128 of file L1MuGMTPSB.h.

Referenced by getCalo(), isolBits(), and reset().

L1MuGMTMatrix<bool> L1MuGMTPSB::m_Mip
private

Definition at line 129 of file L1MuGMTPSB.h.

Referenced by getCalo(), mipBits(), and reset().

std::vector<L1MuRegionalCand> L1MuGMTPSB::m_RpcMuons
private