![]() |
![]() |
#include <L1Trigger/DTTrackFinder/src/L1MuDTEUX.h>
Public Member Functions | |
unsigned short int | address () const |
return extrapolation address (0-11) (address = 15 indicates negative ext. result) | |
int | id () const |
return Extrapolation identifier | |
L1MuDTEUX (const L1MuDTSEU &seu, int id) | |
constructor | |
void | load (const L1MuDTTrackSegPhi *start_ts, const L1MuDTTrackSegPhi *target_ts) |
load data into EUX | |
bool | operator== (const L1MuDTEUX &) const |
equal operator | |
unsigned int | quality () const |
return extrapolation quality | |
virtual void | reset () |
reset Extrapolator | |
bool | result () const |
return extrapolation result | |
virtual void | run (const edm::EventSetup &c) |
run Extrapolator | |
std::pair< const L1MuDTTrackSegPhi *, const L1MuDTTrackSegPhi * > | ts () const |
return pointer to start and target track segment | |
virtual | ~L1MuDTEUX () |
destructor | |
Static Public Member Functions | |
static void | setPrecision () |
set precision of phi and phib | |
Private Member Functions | |
int | sec_mod (int) const |
output sector numbers in the range -6 to +5 | |
Private Attributes | |
unsigned short int | m_address |
int | m_id |
unsigned short int | m_quality |
bool | m_result |
const L1MuDTSEU & | m_seu |
const L1MuDTTrackSegPhi * | m_start |
const L1MuDTTrackSegPhi * | m_target |
edm::ESHandle< L1MuDTExtLut > | theExtLUTs |
Static Private Attributes | |
static unsigned short | nbit_phi = 12 |
static unsigned short | nbit_phib = 10 |
static int | theExtFilter = 1 |
Classes | |
class | EUX_Comp |
helper class for finding the best and second best extrapolation More... |
The Extrapolator receives a start and a target track segment and performs the actual extrapolation
N. Neumeister CERN EP
Definition at line 48 of file L1MuDTEUX.h.
constructor
Definition at line 49 of file L1MuDTEUX.cc.
References setPrecision().
00049 : 00050 m_seu(seu), m_id(id), 00051 m_result(false), m_quality(0), m_address(15), 00052 m_start(0), m_target(0) { 00053 00054 setPrecision(); 00055 00056 }
L1MuDTEUX::~L1MuDTEUX | ( | ) | [virtual] |
return extrapolation address (0-11) (address = 15 indicates negative ext. result)
Definition at line 100 of file L1MuDTEUX.h.
References m_address.
Referenced by operator==().
00100 { return m_address; }
return Extrapolation identifier
Definition at line 91 of file L1MuDTEUX.h.
References m_id.
Referenced by operator==().
00091 { return m_id; }
void L1MuDTEUX::load | ( | const L1MuDTTrackSegPhi * | start_ts, | |
const L1MuDTTrackSegPhi * | target_ts | |||
) |
load data into EUX
Definition at line 183 of file L1MuDTEUX.cc.
References funct::abs(), EX21, EX34, L1MuDTSEU::ext(), m_seu, m_start, m_target, and L1MuDTTrackSegPhi::wheel().
00184 { 00185 00186 m_start = start_ts; 00187 m_target = target_ts; 00188 00189 // in case of EX34 and EX21 exchange start and target 00190 if ( ( m_seu.ext() == EX34 && abs(target_ts->wheel()) != 3 ) || ( m_seu.ext() == EX21 ) ) { 00191 m_start = target_ts; 00192 m_target = start_ts; 00193 } 00194 00195 }
equal operator
Definition at line 73 of file L1MuDTEUX.cc.
References address(), id(), m_address, m_id, m_quality, m_result, quality(), and result().
00073 { 00074 00075 if ( m_id != eux.id() ) return false; 00076 if ( m_result != eux.result() ) return false; 00077 if ( m_quality != eux.quality() ) return false; 00078 if ( m_address != eux.address() ) return false; 00079 return true; 00080 00081 }
return extrapolation quality
Definition at line 97 of file L1MuDTEUX.h.
References m_quality.
Referenced by L1MuDTEUX::EUX_Comp::operator()(), and operator==().
00097 { return m_quality; }
reset Extrapolator
Implements L1AbstractProcessor.
Definition at line 202 of file L1MuDTEUX.cc.
References m_address, m_quality, m_result, m_start, and m_target.
00202 { 00203 00204 m_result = false; 00205 m_quality = 0; 00206 m_address = 15; 00207 00208 m_start = 0; 00209 m_target = 0; 00210 00211 }
bool L1MuDTEUX::result | ( | ) | const [inline] |
return extrapolation result
Definition at line 94 of file L1MuDTEUX.h.
References m_result.
Referenced by L1MuDTEUX::EUX_Comp::operator()(), and operator==().
00094 { return m_result; }
void L1MuDTEUX::run | ( | const edm::EventSetup & | c | ) | [virtual] |
run Extrapolator
Reimplemented from L1AbstractProcessor.
Definition at line 87 of file L1MuDTEUX.cc.
References funct::abs(), GenMuonPlsPt100GeV_cfg::cout, L1MuDTTFConfig::Debug(), diff, lat::endl(), EX13, EX14, EX15, EX16, EX21, EX23, EX24, EX25, EX26, EX34, EX56, L1MuDTSEU::ext(), edm::EventSetup::get(), L1MuDTTFConfig::getopenLUTs(), WenuSkim_TriggerBit_cff::high, m_address, m_id, m_quality, m_result, m_seu, m_start, m_target, nbit_phi, nbit_phib, offset, L1MuDTTrackSegPhi::phi(), L1MuDTTrackSegPhi::phib(), L1MuDTTrackSegPhi::quality(), sec_mod(), L1MuDTTrackSegPhi::sector(), theExtFilter, theExtLUTs, and L1MuDTTrackSegPhi::wheel().
00087 { 00088 00089 c.get< L1MuDTExtLutRcd >().get( theExtLUTs ); 00090 00091 if ( L1MuDTTFConfig::Debug(4) ) cout << "Run EUX " << m_id << endl; 00092 if ( L1MuDTTFConfig::Debug(4) ) cout << "start : " << *m_start << endl; 00093 if ( L1MuDTTFConfig::Debug(4) ) cout << "target : " << *m_target << endl; 00094 00095 if ( m_start == 0 || m_target == 0 ) { 00096 cout << "Error: EUX has no data loaded" << endl; 00097 return; 00098 } 00099 00100 // start sector 00101 int sector_st = m_start->sector(); 00102 00103 // target sector 00104 int sector_ta = m_target->sector(); 00105 00106 // get index of look-up table 00107 int lut_idx = m_seu.ext(); 00108 if ( abs(m_target->wheel()) == 3 ) { 00109 00110 switch ( m_seu.ext() ) { 00111 case EX13 : { lut_idx = EX15; break; } 00112 case EX14 : { lut_idx = EX16; break; } 00113 case EX23 : { lut_idx = EX25; break; } 00114 case EX24 : { lut_idx = EX26; break; } 00115 case EX34 : { lut_idx = EX56; break; } 00116 default : { lut_idx = m_seu.ext(); break; } 00117 } 00118 00119 } 00120 00121 if ( L1MuDTTFConfig::Debug(5) ) cout << "EUX : using look-up table : " 00122 << static_cast<Extrapolation>(lut_idx) 00123 << endl; 00124 00125 // Extrapolation TS quality filter 00126 switch ( theExtFilter ) { 00127 default : { break; } 00128 } 00129 00130 // calculate bit shift 00131 int sh_phi = 12 - nbit_phi; 00132 int sh_phib = 10 - nbit_phib; 00133 00134 int phi_target = m_target->phi() >> sh_phi; 00135 int phi_start = m_start->phi() >> sh_phi; 00136 int phib_start = (m_start->phib() >> sh_phib) << sh_phib; 00137 if ( phib_start < 0 ) phib_start += (1 << sh_phib) -1; 00138 00139 // compute difference in phi 00140 int diff = phi_target - phi_start; 00141 00142 // get low and high values from look-up table 00143 // and add offset (30 degrees ) for extrapolation to adjacent sector 00144 int offset = -2144 >> sh_phi; 00145 offset *= sec_mod(sector_ta - sector_st); 00146 int low = theExtLUTs->getLow(lut_idx,phib_start ); 00147 int high = theExtLUTs->getHigh(lut_idx,phib_start ); 00148 if ( low < 0 ) low += (1 << sh_phi) - 1; 00149 if ( high < 0 ) high += (1 << sh_phi) - 1; 00150 low = (low >> sh_phi) + offset; 00151 high = (high >> sh_phi) + offset; 00152 00153 int phi_offset = phi_target - offset; 00154 if ( ( lut_idx == EX34 ) || ( lut_idx == EX21 ) ) 00155 phi_offset = phi_start + offset; 00156 if ( phi_offset >= (1 << (nbit_phi-1)) -1 ) return; 00157 if ( phi_offset < -(1 << (nbit_phi-1)) +1 ) return; 00158 00159 // is phi-difference within the extrapolation window? 00160 if (( diff >= low && diff <= high ) || L1MuDTTFConfig::getopenLUTs() ) { 00161 m_result = true; 00162 int qual_st = m_start->quality(); 00163 int qual_ta = m_target->quality(); 00164 if ( m_seu.ext() == EX34 || m_seu.ext() == EX21 ) { 00165 m_quality = ( qual_st == 7 ) ? 0 : qual_st + 1; 00166 } 00167 else { 00168 m_quality = ( qual_ta == 7 ) ? 0 : qual_ta + 1; 00169 } 00170 m_address = m_id; 00171 } 00172 00173 if ( L1MuDTTFConfig::Debug(5) ) cout << "diff : " << low << " " 00174 << diff << " " << high << " : " 00175 << m_result << " " << endl; 00176 00177 }
output sector numbers in the range -6 to +5
Definition at line 228 of file L1MuDTEUX.cc.
Referenced by run().
00228 { 00229 00230 int new_sector = sector%12; 00231 if ( new_sector >= 6 ) 00232 new_sector = new_sector - 12; 00233 if ( new_sector < -6 ) 00234 new_sector = new_sector + 12; 00235 00236 return new_sector; 00237 00238 }
void L1MuDTEUX::setPrecision | ( | ) | [static] |
set precision of phi and phib
Definition at line 245 of file L1MuDTEUX.cc.
References L1MuDTTFConfig::getExtTSFilter(), L1MuDTTFConfig::getNbitsExtPhi(), L1MuDTTFConfig::getNbitsExtPhib(), nbit_phi, nbit_phib, and theExtFilter.
Referenced by L1MuDTEUX().
00245 { 00246 00247 nbit_phi = L1MuDTTFConfig::getNbitsExtPhi(); 00248 nbit_phib = L1MuDTTFConfig::getNbitsExtPhib(); 00249 00250 theExtFilter = L1MuDTTFConfig::getExtTSFilter(); 00251 00252 }
pair< const L1MuDTTrackSegPhi *,const L1MuDTTrackSegPhi * > L1MuDTEUX::ts | ( | ) | const |
return pointer to start and target track segment
Definition at line 217 of file L1MuDTEUX.cc.
References m_start, and m_target.
00217 { 00218 00219 return pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*>(m_start,m_target); 00220 00221 }
unsigned short int L1MuDTEUX::m_address [private] |
Definition at line 114 of file L1MuDTEUX.h.
Referenced by address(), operator==(), reset(), and run().
int L1MuDTEUX::m_id [private] |
unsigned short int L1MuDTEUX::m_quality [private] |
Definition at line 113 of file L1MuDTEUX.h.
Referenced by operator==(), quality(), reset(), and run().
bool L1MuDTEUX::m_result [private] |
Definition at line 112 of file L1MuDTEUX.h.
Referenced by operator==(), reset(), result(), and run().
const L1MuDTSEU& L1MuDTEUX::m_seu [private] |
const L1MuDTTrackSegPhi* L1MuDTEUX::m_start [private] |
const L1MuDTTrackSegPhi* L1MuDTEUX::m_target [private] |
unsigned short int L1MuDTEUX::nbit_phi = 12 [static, private] |
unsigned short int L1MuDTEUX::nbit_phib = 10 [static, private] |
int L1MuDTEUX::theExtFilter = 1 [static, private] |
edm::ESHandle< L1MuDTExtLut > L1MuDTEUX::theExtLUTs [private] |