75 vector<LUT>::iterator
iter;
107 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
108 string pta_dir =
"L1TriggerData/DTTrackFinder/Ass/";
120 case PT12L : { pta_str =
"pta12l";
break; }
121 case PT12H : { pta_str =
"pta12h";
break; }
122 case PT13L : { pta_str =
"pta13l";
break; }
123 case PT13H : { pta_str =
"pta13h";
break; }
124 case PT14L : { pta_str =
"pta14l";
break; }
125 case PT14H : { pta_str =
"pta14h";
break; }
126 case PT23L : { pta_str =
"pta23l";
break; }
127 case PT23H : { pta_str =
"pta23h";
break; }
128 case PT24L : { pta_str =
"pta24l";
break; }
129 case PT24H : { pta_str =
"pta24h";
break; }
130 case PT34L : { pta_str =
"pta34l";
break; }
131 case PT34H : { pta_str =
"pta34h";
break; }
132 case PT12LO : { pta_str =
"pta12l_ovl";
break; }
133 case PT12HO : { pta_str =
"pta12h_ovl";
break; }
134 case PT13LO : { pta_str =
"pta13l_ovl";
break; }
135 case PT13HO : { pta_str =
"pta13h_ovl";
break; }
136 case PT14LO : { pta_str =
"pta14l_ovl";
break; }
137 case PT14HO : { pta_str =
"pta14h_ovl";
break; }
138 case PT23LO : { pta_str =
"pta23l_ovl";
break; }
139 case PT23HO : { pta_str =
"pta23h_ovl";
break; }
140 case PT24LO : { pta_str =
"pta24l_ovl";
break; }
141 case PT24HO : { pta_str =
"pta24h_ovl";
break; }
142 case PT34LO : { pta_str =
"pta34l_ovl";
break; }
143 case PT34HO : { pta_str =
"pta34h_ovl";
break; }
144 case PT15LO : { pta_str =
"pta15l_ovl";
break; }
145 case PT15HO : { pta_str =
"pta15h_ovl";
break; }
146 case PT25LO : { pta_str =
"pta25l_ovl";
break; }
147 case PT25HO : { pta_str =
"pta25h_ovl";
break; }
156 if ( file.
open() != 0 )
return -1;
162 int adr_old = -2048 >>
shift;
175 while ( file.
good() ) {
182 if ( adr != adr_old ) {
184 tmplut.insert(make_pair( adr_old, (sum_pt/number) ));
211 cout <<
"L1 barrel Track Finder Pt-Assignment look-up tables :" << endl;
212 cout <<
"=====================================================" << endl;
214 cout <<
"Precision : " << endl;
215 cout <<
'\t' << setw(2) <<
nbit_phi <<
" bits are used for phi " << endl;
221 cout <<
"Pt-Assignment Method : " <<
static_cast<PtAssMethod>(pam) << endl;
222 cout <<
"============================" << endl;
230 for (
int i = 0;
i < maxbits;
i++ )
cout <<
' ';
231 cout <<
" value" << endl;
232 for (
int i = 0;
i < maxbits;
i++ )
cout <<
'-';
233 cout <<
"-------------------------" << endl;
237 int address = (*iter).first;
238 int value = (*iter).second;
245 cout.setf(ios::right,ios::adjustfield);
246 cout <<
" " << setbase(10) << setw(5) << address <<
" (";
247 for (
int i = maxbits-1;
i >= 0;
i-- )
cout << b_address[
i];
248 cout <<
") " << setw(3) << value <<
" (";
267 LUT::const_iterator
iter =
pta_lut[pta_ind].find(address);
269 return (*iter).second;
272 cerr <<
"PtaLut::getPt : can not find address " << address << endl;
288 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
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
std::string fullPath() const