69 vector<LUT>::iterator iter;
95 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
96 string pta_dir =
"L1TriggerData/DTTrackFinder/Ass/";
157 pta_str =
"pta12l_ovl";
161 pta_str =
"pta12h_ovl";
165 pta_str =
"pta13l_ovl";
169 pta_str =
"pta13h_ovl";
173 pta_str =
"pta14l_ovl";
177 pta_str =
"pta14h_ovl";
181 pta_str =
"pta23l_ovl";
185 pta_str =
"pta23h_ovl";
189 pta_str =
"pta24l_ovl";
193 pta_str =
"pta24h_ovl";
197 pta_str =
"pta34l_ovl";
201 pta_str =
"pta34h_ovl";
205 pta_str =
"pta15l_ovl";
209 pta_str =
"pta15h_ovl";
213 pta_str =
"pta25l_ovl";
217 pta_str =
"pta25h_ovl";
228 if (file.
open() != 0)
235 int adr_old = -2048 >>
shift;
248 while (file.
good()) {
254 if (adr != adr_old) {
256 tmplut.insert(make_pair(adr_old, (sum_pt / number)));
280 cout <<
"L1 barrel Track Finder Pt-Assignment look-up tables :" << endl;
281 cout <<
"=====================================================" << endl;
283 cout <<
"Precision : " << endl;
284 cout <<
'\t' << setw(2) <<
nbit_phi <<
" bits are used for phi " << endl;
289 cout <<
"Pt-Assignment Method : " <<
static_cast<PtAssMethod>(pam) << endl;
290 cout <<
"============================" << endl;
298 for (
int i = 0;
i < maxbits;
i++)
300 cout <<
" value" << endl;
301 for (
int i = 0;
i < maxbits;
i++)
303 cout <<
"-------------------------" << endl;
305 LUT::const_iterator iter =
pta_lut[pam].begin();
307 int address = (*iter).first;
308 int value = (*iter).second;
316 cout.setf(ios::right, ios::adjustfield);
317 cout <<
" " << setbase(10) << setw(5) << address <<
" (";
318 for (
int i = maxbits - 1;
i >= 0;
i--)
319 cout << b_address[
i];
320 cout <<
") " << setw(3) << value <<
" (";
335 LUT::const_iterator iter =
pta_lut[pta_ind].find(address);
337 return (*iter).second;
339 cerr <<
"PtaLut::getPt : can not find address " << address << endl;
351 cerr <<
"PtaLut::getPtLutThreshold : can not find threshold " << pta_ind << endl;
std::vector< LUT > pta_lut
std::vector< int > pta_threshold
int getPt(int pta_ind, int address) const
get pt-value for a given address
std::ostream & print(std::ostream &o=std::cout) const
int load()
load pt-assignment look-up tables
void reset()
reset pt-assignment look-up tables
void print() const
print pt-assignment look-up tables
DTTFBitArray< N > twoComplement() const
virtual ~L1MuDTPtaLut()
destructor
bool good()
return status of file stream
void setPrecision()
set precision for look-up tables
Abs< T >::type abs(const T &t)
L1MuDTPtaLut()
constructor
std::map< short, short, std::less< short > > LUT
int readInteger()
read one integer from file
unsigned short int nbit_phi
static unsigned int const shift
std::string fullPath() const
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold