test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
virtual void reset ()
 reset ERS More...
 
virtual void run ()
 run L1MuBMERS More...
 
std::pair< const
L1MuBMTrackSegPhi *, const
L1MuBMTrackSegPhi * > 
ts (int id) const
 return pointer to start and target track segment More...
 
virtual ~L1MuBMERS ()
 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 ( const L1MuBMSEU seu)

constructor

Definition at line 46 of file L1MuBMERS.cc.

References reset().

46  : m_seu(seu) {
47 
48  reset();
49 
50 }
const L1MuBMSEU & m_seu
Definition: L1MuBMERS.h:70
virtual void reset()
reset ERS
Definition: L1MuBMERS.cc:107
L1MuBMERS::~L1MuBMERS ( )
virtual

destructor

Definition at line 57 of file L1MuBMERS.cc.

57 {}

Member Function Documentation

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

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

Definition at line 63 of file L1MuBMERS.h.

References m_address.

63 { return m_address[id]; }
unsigned short int m_address[2]
Definition: L1MuBMERS.h:73
unsigned int L1MuBMERS::quality ( int  id) const
inline

return extrapolation quality

Definition at line 60 of file L1MuBMERS.h.

References m_quality.

60 { return m_quality[id]; }
unsigned short int m_quality[2]
Definition: L1MuBMERS.h:72
void L1MuBMERS::reset ( void  )
virtual

reset ERS

Implements L1AbstractProcessor.

Definition at line 107 of file L1MuBMERS.cc.

References m_address, m_quality, m_start, and m_target.

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

107  {
108 
109  for ( int id = 0; id < 2; id++ ) {
110  m_quality[id] = 0;
111  m_address[id] = 15;
112  m_start[id] = 0;
113  m_target[id] = 0;
114  }
115 
116 }
unsigned short int m_quality[2]
Definition: L1MuBMERS.h:72
const L1MuBMTrackSegPhi * m_target[2]
Definition: L1MuBMERS.h:76
const L1MuBMTrackSegPhi * m_start[2]
Definition: L1MuBMERS.h:75
unsigned short int m_address[2]
Definition: L1MuBMERS.h:73
void L1MuBMERS::run ( void  )
virtual

run L1MuBMERS

Reimplemented from L1AbstractProcessor.

Definition at line 67 of file L1MuBMERS.cc.

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

Referenced by L1MuBMSEU::run().

67  {
68 
69  int n_ext = m_seu.numberOfExt();
70  if ( n_ext > 0 ) {
71  vector<L1MuBMEUX*>::const_iterator first = m_seu.eux().begin();
72  vector<L1MuBMEUX*>::const_iterator last = m_seu.eux().end();
73  vector<L1MuBMEUX*>::const_iterator first_max;
74  vector<L1MuBMEUX*>::const_iterator second_max;
75 
76  // find the best extrapolation
77  first_max = max_element(first, last, L1MuBMEUX::EUX_Comp() );
78  m_address[0] = (*first_max)->address();
79  m_quality[0] = (*first_max)->quality();
80  m_start[0] = (*first_max)->ts().first;
81  m_target[0] = (*first_max)->ts().second;
82 
83 
84  if ( n_ext > 1 ) {
85  // find the second best extrapolation
86  second_max = max_element(first, last, L1MuBMEUX::EUX_Comp(*first_max) );
87  m_address[1] = (*second_max)->address();
88  m_quality[1] = (*second_max)->quality();
89  m_start[1] = (*second_max)->ts().first;
90  m_target[1] = (*second_max)->ts().second;
91  }
92 
93  if ( L1MuBMTFConfig::Debug(4) ) {
94  cout << "ERS : " << endl;
95  cout << "\t first : " << m_address[0] << '\t' << m_quality[0] << endl;
96  cout << "\t second : " << m_address[1] << '\t' << m_quality[1] << endl;
97  }
98 
99  }
100 
101 }
int numberOfExt() const
return number of successful extrapolations
Definition: L1MuBMSEU.cc:187
unsigned short int m_quality[2]
Definition: L1MuBMERS.h:72
const std::vector< L1MuBMEUX * > & eux() const
return pointer to an Extrapolator
Definition: L1MuBMSEU.h:92
const L1MuBMTrackSegPhi * m_target[2]
Definition: L1MuBMERS.h:76
const L1MuBMSEU & m_seu
Definition: L1MuBMERS.h:70
static bool Debug()
helper class for finding the best and second best extrapolation
Definition: L1MuBMEUX.h:74
tuple cout
Definition: gather_cfg.py:145
const L1MuBMTrackSegPhi * m_start[2]
Definition: L1MuBMERS.h:75
unsigned short int m_address[2]
Definition: L1MuBMERS.h:73
pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > L1MuBMERS::ts ( int  id) const

return pointer to start and target track segment

Definition at line 122 of file L1MuBMERS.cc.

References m_start, and m_target.

122  {
123 
124  return pair<const L1MuBMTrackSegPhi*,const L1MuBMTrackSegPhi*>(m_start[id],m_target[id]);
125 
126 }
const L1MuBMTrackSegPhi * m_target[2]
Definition: L1MuBMERS.h:76
const L1MuBMTrackSegPhi * m_start[2]
Definition: L1MuBMERS.h:75

Member Data Documentation

unsigned short int L1MuBMERS::m_address[2]
private

Definition at line 73 of file L1MuBMERS.h.

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

unsigned short int L1MuBMERS::m_quality[2]
private

Definition at line 72 of file L1MuBMERS.h.

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

const L1MuBMSEU& L1MuBMERS::m_seu
private

Definition at line 70 of file L1MuBMERS.h.

Referenced by run().

const L1MuBMTrackSegPhi* L1MuBMERS::m_start[2]
private

Definition at line 75 of file L1MuBMERS.h.

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

const L1MuBMTrackSegPhi* L1MuBMERS::m_target[2]
private

Definition at line 76 of file L1MuBMERS.h.

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