CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1MuBMERS Class Reference

#include <L1MuBMERS.h>

Inheritance diagram for L1MuBMERS:
L1AbstractProcessor

Public Member Functions

unsigned short int address (int id) const
 return extrapolation address; (address = 15 indicates negative ext. result) More...
 
 L1MuBMERS (const L1MuBMSEU &)
 constructor More...
 
unsigned int quality (int id) const
 return extrapolation quality More...
 
void reset () override
 reset ERS More...
 
void run () override
 run L1MuBMERS More...
 
std::pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > ts (int id) const
 return pointer to start and target track segment More...
 
 ~L1MuBMERS () override
 destructor More...
 
- Public Member Functions inherited from L1AbstractProcessor
virtual void run (const edm::EventSetup &c)
 
virtual void run (const edm::EventSetup &c)
 
virtual ~L1AbstractProcessor ()
 destructor More...
 
virtual ~L1AbstractProcessor ()
 destructor More...
 

Private Attributes

unsigned short int m_address [2]
 
unsigned short int m_quality [2]
 
const L1MuBMSEUm_seu
 
const L1MuBMTrackSegPhim_start [2]
 
const L1MuBMTrackSegPhim_target [2]
 

Detailed Description

Extrapolation Result Selector (Quality Sorter Unit):

selects the 2 best (highest target quality) out of the 12 (6) extrapolations performed per start track segment

N. Neumeister CERN EP

Definition at line 43 of file L1MuBMERS.h.

Constructor & Destructor Documentation

◆ L1MuBMERS()

L1MuBMERS::L1MuBMERS ( const L1MuBMSEU seu)

constructor

Definition at line 46 of file L1MuBMERS.cc.

46 : m_seu(seu) { reset(); }

References reset().

◆ ~L1MuBMERS()

L1MuBMERS::~L1MuBMERS ( )
override

destructor

Definition at line 52 of file L1MuBMERS.cc.

52 {}

Member Function Documentation

◆ address()

unsigned short int L1MuBMERS::address ( int  id) const
inline

return extrapolation address; (address = 15 indicates negative ext. result)

Definition at line 61 of file L1MuBMERS.h.

61 { return m_address[id]; }

References triggerObjects_cff::id, and m_address.

◆ quality()

unsigned int L1MuBMERS::quality ( int  id) const
inline

return extrapolation quality

Definition at line 58 of file L1MuBMERS.h.

58 { return m_quality[id]; }

References triggerObjects_cff::id, and m_quality.

◆ reset()

void L1MuBMERS::reset ( void  )
overridevirtual

reset ERS

Implements L1AbstractProcessor.

Definition at line 96 of file L1MuBMERS.cc.

96  {
97  for (int id = 0; id < 2; id++) {
98  m_quality[id] = 0;
99  m_address[id] = 15;
100  m_start[id] = nullptr;
101  m_target[id] = nullptr;
102  }
103 }

References triggerObjects_cff::id, m_address, m_quality, m_start, and m_target.

Referenced by L1MuBMERS(), and L1MuBMSEU::reset().

◆ run()

void L1MuBMERS::run ( )
overridevirtual

run L1MuBMERS

Reimplemented from L1AbstractProcessor.

Definition at line 61 of file L1MuBMERS.cc.

61  {
62  int n_ext = m_seu.numberOfExt();
63  if (n_ext > 0) {
64  vector<L1MuBMEUX*>::const_iterator first = m_seu.eux().begin();
65  vector<L1MuBMEUX*>::const_iterator last = m_seu.eux().end();
66  vector<L1MuBMEUX*>::const_iterator first_max;
67  vector<L1MuBMEUX*>::const_iterator second_max;
68 
69  // find the best extrapolation
70  first_max = max_element(first, last, L1MuBMEUX::EUX_Comp());
71  m_address[0] = (*first_max)->address();
72  m_quality[0] = (*first_max)->quality();
73  m_start[0] = (*first_max)->ts().first;
74  m_target[0] = (*first_max)->ts().second;
75 
76  if (n_ext > 1) {
77  // find the second best extrapolation
78  second_max = max_element(first, last, L1MuBMEUX::EUX_Comp(*first_max));
79  m_address[1] = (*second_max)->address();
80  m_quality[1] = (*second_max)->quality();
81  m_start[1] = (*second_max)->ts().first;
82  m_target[1] = (*second_max)->ts().second;
83  }
84 
85  if (L1MuBMTFConfig::Debug(4)) {
86  cout << "ERS : " << endl;
87  cout << "\t first : " << m_address[0] << '\t' << m_quality[0] << endl;
88  cout << "\t second : " << m_address[1] << '\t' << m_quality[1] << endl;
89  }
90  }
91 }

References gather_cfg::cout, L1MuBMTFConfig::Debug(), L1MuBMSEU::eux(), first, dqmdumpme::last, m_address, m_quality, m_seu, m_start, m_target, and L1MuBMSEU::numberOfExt().

Referenced by L1MuBMSEU::run().

◆ ts()

pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > L1MuBMERS::ts ( int  id) const

return pointer to start and target track segment

Definition at line 108 of file L1MuBMERS.cc.

108  {
109  return pair<const L1MuBMTrackSegPhi*, const L1MuBMTrackSegPhi*>(m_start[id], m_target[id]);
110 }

References m_start, and m_target.

Member Data Documentation

◆ m_address

unsigned short int L1MuBMERS::m_address[2]
private

Definition at line 70 of file L1MuBMERS.h.

Referenced by address(), reset(), and run().

◆ m_quality

unsigned short int L1MuBMERS::m_quality[2]
private

Definition at line 69 of file L1MuBMERS.h.

Referenced by quality(), reset(), and run().

◆ m_seu

const L1MuBMSEU& L1MuBMERS::m_seu
private

Definition at line 67 of file L1MuBMERS.h.

Referenced by run().

◆ m_start

const L1MuBMTrackSegPhi* L1MuBMERS::m_start[2]
private

Definition at line 72 of file L1MuBMERS.h.

Referenced by reset(), run(), and ts().

◆ m_target

const L1MuBMTrackSegPhi* L1MuBMERS::m_target[2]
private

Definition at line 73 of file L1MuBMERS.h.

Referenced by reset(), run(), and ts().

L1MuBMERS::m_seu
const L1MuBMSEU & m_seu
Definition: L1MuBMERS.h:67
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuBMERS::m_start
const L1MuBMTrackSegPhi * m_start[2]
Definition: L1MuBMERS.h:72
L1MuBMERS::m_target
const L1MuBMTrackSegPhi * m_target[2]
Definition: L1MuBMERS.h:73
L1MuBMSEU::eux
const std::vector< L1MuBMEUX * > & eux() const
return pointer to an Extrapolator
Definition: L1MuBMSEU.h:90
L1MuBMERS::m_quality
unsigned short int m_quality[2]
Definition: L1MuBMERS.h:69
dqmdumpme.last
last
Definition: dqmdumpme.py:56
L1MuBMERS::m_address
unsigned short int m_address[2]
Definition: L1MuBMERS.h:70
L1MuBMTFConfig::Debug
static bool Debug()
Definition: L1MuBMTFConfig.h:52
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
L1MuBMERS::reset
void reset() override
reset ERS
Definition: L1MuBMERS.cc:96
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
L1MuBMEUX::EUX_Comp
helper class for finding the best and second best extrapolation
Definition: L1MuBMEUX.h:76
L1MuBMSEU::numberOfExt
int numberOfExt() const
return number of successful extrapolations
Definition: L1MuBMSEU.cc:173