70 vector<LUT>::iterator iter;
71 for ( iter = phi_lut.begin(); iter != phi_lut.end(); iter++ ) {
100 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
101 string phi_dir =
"L1TriggerData/DTTrackFinder/Ass/";
107 int sh_phi = 12 - nbit_phi;
108 int sh_phib = 10 - nbit_phib;
113 case 0 : { phi_str =
"phi12";
break; }
114 case 1 : { phi_str =
"phi42";
break; }
123 if ( file.
open() != 0 )
return -1;
130 int adr_old = -512 >> sh_phib;
134 while ( file.
good() ) {
141 if ( adr != adr_old ) {
143 tmplut.insert(make_pair( adr_old, ((sum_phi/number) >> sh_phi) ));
157 phi_lut.push_back(tmplut);
170 cout <<
"L1 barrel Track Finder Phi-Assignment look-up tables :" << endl;
171 cout <<
"======================================================" << endl;
173 cout <<
"Precision : " << endl;
174 cout <<
'\t' << setw(2) << nbit_phi <<
" bits are used for phi " << endl;
175 cout <<
'\t' << setw(2) << nbit_phib <<
" bits are used for phib " << endl;
181 if (
idx == 0 )
cout <<
"Phi-Assignment Method : " <<
"PHI12" << endl;
182 if (
idx == 1 )
cout <<
"Phi-Assignment Method : " <<
"PHI42" << endl;
183 cout <<
"=============================" << endl;
187 for (
int i = 0;
i < nbit_phib;
i++ )
cout <<
' ';
188 cout <<
" value" << endl;
189 for (
int i = 0;
i < nbit_phi + nbit_phib;
i++ )
cout <<
'-';
190 cout <<
"----------------------" << endl;
192 LUT::const_iterator iter = phi_lut[
idx].begin();
193 while ( iter != phi_lut[
idx].
end() ) {
194 int address = (*iter).first;
195 int value = (*iter).second;
203 cout.setf(ios::right,ios::adjustfield);
204 cout <<
" " << setbase(10) << setw(5) << address <<
" (";
205 for (
int i = nbit_phib-1;
i >= 0;
i-- )
cout << b_address[
i];
206 cout <<
") " << setw(5) << value <<
" (";
207 for (
int i = nbit_phi-1;
i >= 0;
i-- )
cout << b_value[
i];
208 cout <<
") " << endl;
225 LUT::const_iterator iter = phi_lut[
idx].find(address);
226 if ( iter != phi_lut[idx].
end() ) {
227 return (*iter).second;
230 cerr <<
"PhiLut::getDeltaPhi : can not find address " << address << endl;
253 return pair<unsigned short, unsigned short>(nbit_phi,nbit_phib);
DTTFBitArray< N > twoComplement() const
L1MuDTPhiLut()
constructor
bool good()
return status of file stream
std::map< short, short, std::less< short > > LUT
virtual ~L1MuDTPhiLut()
destructor
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
Abs< T >::type abs(const T &t)
void print() const
print phi-assignment look-up tables
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
int load()
load phi-assignment look-up tables
Geom::Phi< T > phi() const
int readInteger()
read one integer from file
void setPrecision()
set precision for look-up tables
std::pair< unsigned short, unsigned short > getPrecision() const
get precision for look-up tables
std::string fullPath() const
void reset()
reset phi-assignment look-up tables