CMS 3D CMS Logo

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

#include <L1MuDTERS.h>

Public Member Functions

unsigned short int address (int id) const
 return extrapolation address; (address = 15 indicates negative ext. result) More...
 
 L1MuDTERS (const L1MuDTSEU &)
 constructor More...
 
unsigned int quality (int id) const
 return extrapolation quality More...
 
void reset ()
 reset ERS More...
 
void run ()
 run L1MuDTERS More...
 
std::pair< const L1MuDTTrackSegPhi *, const L1MuDTTrackSegPhi * > ts (int id) const
 return pointer to start and target track segment More...
 
 ~L1MuDTERS ()
 destructor More...
 

Private Attributes

unsigned short int m_address [2]
 
unsigned short int m_quality [2]
 
const L1MuDTSEUm_seu
 
const L1MuDTTrackSegPhim_start [2]
 
const L1MuDTTrackSegPhim_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 41 of file L1MuDTERS.h.

Constructor & Destructor Documentation

◆ L1MuDTERS()

L1MuDTERS::L1MuDTERS ( const L1MuDTSEU seu)

constructor

Definition at line 46 of file L1MuDTERS.cc.

References reset().

46 : m_seu(seu) { reset(); }
void reset()
reset ERS
Definition: L1MuDTERS.cc:96
const L1MuDTSEU & m_seu
Definition: L1MuDTERS.h:65

◆ ~L1MuDTERS()

L1MuDTERS::~L1MuDTERS ( )

destructor

Definition at line 52 of file L1MuDTERS.cc.

52 {}

Member Function Documentation

◆ address()

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

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

Definition at line 59 of file L1MuDTERS.h.

References triggerObjects_cff::id, and m_address.

59 { return m_address[id]; }
unsigned short int m_address[2]
Definition: L1MuDTERS.h:68

◆ quality()

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

return extrapolation quality

Definition at line 56 of file L1MuDTERS.h.

References triggerObjects_cff::id, and m_quality.

56 { return m_quality[id]; }
unsigned short int m_quality[2]
Definition: L1MuDTERS.h:67

◆ reset()

void L1MuDTERS::reset ( void  )

reset ERS

Definition at line 96 of file L1MuDTERS.cc.

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

Referenced by L1MuDTERS(), and L1MuDTSEU::reset().

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 }
const L1MuDTTrackSegPhi * m_start[2]
Definition: L1MuDTERS.h:70
unsigned short int m_address[2]
Definition: L1MuDTERS.h:68
const L1MuDTTrackSegPhi * m_target[2]
Definition: L1MuDTERS.h:71
unsigned short int m_quality[2]
Definition: L1MuDTERS.h:67

◆ run()

void L1MuDTERS::run ( )

run L1MuDTERS

Definition at line 61 of file L1MuDTERS.cc.

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

Referenced by L1MuDTSEU::run().

61  {
62  int n_ext = m_seu.numberOfExt();
63  if (n_ext > 0) {
64  vector<L1MuDTEUX*>::const_iterator first = m_seu.eux().begin();
65  vector<L1MuDTEUX*>::const_iterator last = m_seu.eux().end();
66  vector<L1MuDTEUX*>::const_iterator first_max;
67  vector<L1MuDTEUX*>::const_iterator second_max;
68 
69  // find the best extrapolation
70  first_max = max_element(first, last, L1MuDTEUX::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, L1MuDTEUX::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 (L1MuDTTFConfig::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 }
const L1MuDTTrackSegPhi * m_start[2]
Definition: L1MuDTERS.h:70
int numberOfExt() const
return number of successful extrapolations
Definition: L1MuDTSEU.cc:173
const std::vector< L1MuDTEUX * > & eux() const
return pointer to an Extrapolator
Definition: L1MuDTSEU.h:90
unsigned short int m_address[2]
Definition: L1MuDTERS.h:68
static bool Debug()
helper class for finding the best and second best extrapolation
Definition: L1MuDTEUX.h:72
const L1MuDTTrackSegPhi * m_target[2]
Definition: L1MuDTERS.h:71
const L1MuDTSEU & m_seu
Definition: L1MuDTERS.h:65
unsigned short int m_quality[2]
Definition: L1MuDTERS.h:67

◆ ts()

pair< const L1MuDTTrackSegPhi *, const L1MuDTTrackSegPhi * > L1MuDTERS::ts ( int  id) const

return pointer to start and target track segment

Definition at line 108 of file L1MuDTERS.cc.

References triggerObjects_cff::id, m_start, and m_target.

108  {
109  return pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*>(m_start[id], m_target[id]);
110 }
const L1MuDTTrackSegPhi * m_start[2]
Definition: L1MuDTERS.h:70
const L1MuDTTrackSegPhi * m_target[2]
Definition: L1MuDTERS.h:71

Member Data Documentation

◆ m_address

unsigned short int L1MuDTERS::m_address[2]
private

Definition at line 68 of file L1MuDTERS.h.

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

◆ m_quality

unsigned short int L1MuDTERS::m_quality[2]
private

Definition at line 67 of file L1MuDTERS.h.

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

◆ m_seu

const L1MuDTSEU& L1MuDTERS::m_seu
private

Definition at line 65 of file L1MuDTERS.h.

Referenced by run().

◆ m_start

const L1MuDTTrackSegPhi* L1MuDTERS::m_start[2]
private

Definition at line 70 of file L1MuDTERS.h.

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

◆ m_target

const L1MuDTTrackSegPhi* L1MuDTERS::m_target[2]
private

Definition at line 71 of file L1MuDTERS.h.

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