52 throw cms::Exception(
"DTTPG") <<
"===> ConfigTraco constructor : not a TRACO string!" << std::endl;
56 unsigned short int memory_traco[38];
58 for(
int i=0;
i<38;
i++){
59 memory_traco[
i] = buffer[
i+5];
62 int btic = memory_traco[0] & 0x3f ;
63 int rad = ( ( memory_traco[0] & 0xc0 ) >> 6 ) | ( ( memory_traco[1] & 0x7 ) << 2 ) ;
64 int dd = ( memory_traco[1] & 0xf8 ) >> 3 ;
65 int fprgcomp = memory_traco[2] & 0x3 ;
66 int sprgcomp = memory_traco[3] & 0x3 ;
67 int fhism = ( memory_traco[2] & 0x4 ) != 0 ;
68 int fhtprf = ( memory_traco[2] & 0x8 ) != 0 ;
69 int fslmsk = ( memory_traco[2] & 0x10 ) != 0 ;
70 int fltmsk = ( memory_traco[2] & 0x20 ) != 0 ;
71 int fhtmsk = ( memory_traco[2] & 0x40 ) != 0 ;
72 int shism = ( memory_traco[3] & 0x4 ) != 0 ;
73 int shtprf = ( memory_traco[3] & 0x8 ) != 0 ;
74 int sslmsk = ( memory_traco[3] & 0x10 ) != 0 ;
75 int sltmsk = ( memory_traco[3] & 0x20 ) != 0 ;
76 int shtmsk = ( memory_traco[3] & 0x40 ) != 0 ;
77 int reusei = ( memory_traco[2] & 0x80 ) != 0 ;
78 int reuseo = ( memory_traco[3] & 0x80 ) != 0 ;
79 int ltf = ( memory_traco[4] & 1 ) != 0 ;
80 int lts = ( memory_traco[4] & 2 ) != 0 ;
81 int prgdel = ( memory_traco[4] & 0x1c ) >> 2 ;
82 int snapcor = ( memory_traco[4] & 0xe0 ) >> 5 ;
84 for(
int it=0; it<2; it++)
86 trgenb[0+it*8] = memory_traco[5+it] & 0x01;
87 trgenb[1+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
88 trgenb[2+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
89 trgenb[3+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
90 trgenb[4+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
91 trgenb[5+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
92 trgenb[6+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
93 trgenb[7+it*8] = (memory_traco[5+it] >> 1 ) & 0x01;
95 int trgadel = memory_traco[7] & 0x3 ;
96 int ibtioff = ( memory_traco[7] & 0xfc ) >> 2 ;
97 int kprgcom = ( memory_traco[8] & 0xff ) ;
98 int testmode = ( memory_traco[9] & 1 ) != 0 ;
99 int starttest = ( memory_traco[9] & 2 ) != 0 ;
100 int prvsignmux = ( memory_traco[9] & 4 ) != 0 ;
101 int lth = ( memory_traco[9] & 8 ) != 0 ;
108 <<
" fprgcomp=" << fprgcomp
109 <<
" sprgcomp=" << sprgcomp
110 <<
" fhism=" << fhism
111 <<
" fhtprf=" << fhtprf
112 <<
" fslmsk=" << fslmsk
113 <<
" fltmsk=" << fltmsk
114 <<
" fhtmsk=" << fhtmsk
115 <<
" shism=" << shism
116 <<
" shtprf=" << shtprf
117 <<
" sslmsk=" << sslmsk
118 <<
" sltmsk=" << sltmsk
119 <<
" shtmsk=" << shtmsk
120 <<
" reusei=" << reusei
121 <<
" reuseo=" << reuseo
124 <<
" prgdel=" << prgdel
125 <<
" snapcor=" << snapcor
127 for(
int t=0;
t<16;
t++)
130 <<
" ibtioff=" << ibtioff
131 <<
" kprgcom=" << kprgcom
132 <<
" testmode=" << testmode
133 <<
" starttest=" << starttest
134 <<
" prvsignmux=" << prvsignmux
135 <<
" lth=" << lth << std::endl;
163 for(
int t=0;
t<16;
t++)
229 for(
int b=0;
b<16;
b++)
231 std::string
label =
"TRGENB";
232 char p0 = (
b/10)+
'0';
233 char p1 = (
b%10)+
'0';
253 std::cout <<
"******************************************************************************" << std::endl;
254 std::cout <<
"* DTTrigger configuration : TRACO chips *" << std::endl;
255 std::cout <<
"******************************************************************************" << std::endl;
258 std::cout <<
"KRAD traco parameter : " <<
KRAD() << std::endl;
259 std::cout <<
"BTIC traco parameter : " <<
BTIC() << std::endl;
260 std::cout <<
"DD traco parameter : " <<
DD() << std::endl;
270 std::cout <<
"Connected bti in traco - bti mask : ";
271 for(
int b=1;
b<=16;
b++)
277 std::cout <<
"******************************************************************************" << std::endl;
T getParameter(std::string const &) const
DTConfigTraco()
Constructor.
T getUntrackedParameter(std::string const &, T const &) const
void print() const
Print the setup.
void setPrefInner(int i, int prefInner)
Set Preference to inner on first/second tracks: F(S)SLMSK.
void setBTIC(int BTIC)
Set BTIC traco parameter: must be equal to Btis ST parameter.
void setDefaults(const edm::ParameterSet &ps)
Set default parameters.
void setSingleLenab(int i, int singleLenab)
Set Single LTRIG accept enabling on first/second tracks LTF.
int KRAD() const
KRAD traco parameter.
int prefHtrig(int i) const
Preference to HTRIG on first/second tracks: F(S)HTPRF.
int LVALIDIFH() const
Flag for Low validation parameter.
void setSortKascend(int i, int sortKascend)
Set Ascend. order for K sorting first/second tracks: F(S)HISM.
int singleLenab(int i) const
Single LTRIG accept enabling on first/second tracks LTF.
void setIBTIOFF(int IBTIOFF)
Set IBTIOFF traco parameter.
int BTIC() const
BTIC traco parameter: must be equal to Btis ST parameter.
void setUsedBti(int bti, int mask)
Set Connected bti in traco: bti mask.
void setDD(int DD)
Set DD traco parameter: this is fixed.
void setPrefHtrig(int i, int prefHtrig)
Set Preference to HTRIG on first/second tracks: F(S)HTPRF.
int BendingAngleCut() const
Bending angle cut for all stations and triggers : KPRGCOM.
void setBendingAngleCut(int BendingAngleCut)
Set Bending angle cut for all stations and triggers : KPRGCOM.
void setTcKToll(int i, int TcKToll)
Set K tollerance for correlation in TRACO: F(S)PRGCOMP.
void setSingleHflag(int i, int singleHflag)
Set Single HTRIG enabling on first/second tracks F(S)HTMSK.
int TcBxLts() const
Suppr. of LTRIG in 4 BX before HTRIG: LTS.
~DTConfigTraco()
Destructor.
void setTcReuse(int i, int TcReuse)
Set Recycling of TRACO cand. in inner/outer SL : REUSEI/REUSEO.
int singleHflag(int i) const
Single HTRIG enabling on first/second tracks F(S)HTMSK.
int TcKToll(int i) const
K tollerance for correlation in TRACO: F(S)PRGCOMP.
int prefInner(int i) const
Preference to inner on first/second tracks: F(S)SLMSK.
void setKRAD(int KRAD)
Set KRAD traco parameter.
void setSingleLflag(int i, int singleLflag)
Set Single LTRIG enabling on first/second tracks: F(S)LTMSK.
int usedBti(int bti) const
Connected bti in traco: bti mask.
void setTcBxLts(int TcBxLts)
Set Suppr. of LTRIG in 4 BX before HTRIG: LTS.
int DD() const
DD traco parameter: this is fixed.
int singleLflag(int i) const
Single LTRIG enabling on first/second tracks: F(S)LTMSK.
void setLVALIDIFH(int LVALIDIFH)
Set Flag for Low validation parameter.
int TcReuse(int i) const
Recycling of TRACO cand. in inner/outer SL : REUSEI/REUSEO.
int debug() const
Debug flag.
int sortKascend(int i) const
Ascend. order for K sorting first/second tracks: F(S)HISM.
int IBTIOFF() const
IBTIOFF traco parameter.