|
ATLAS Offline Software
|
#include <Matrix.h>
|
| Matrix (int run, int event, CMAword debug, int subsys, int proj, int sect, int padadd, int lowhig, int add[2], int locadd, int NOBXS, int BCZERO) |
|
| ~Matrix () |
|
void | deleteRPCdata () |
|
void | reset () |
|
void | initRegisters () |
|
void | initPointers () |
|
void | initRPCpointers () |
|
void | initDat () |
|
void | putData (int sidemat, int layer, int stripaddress, float time) |
|
void | putPatt (const Matrix *p) |
|
void | setDefaultConfiguration () |
|
void | setRunEvent (int runNum, int eventNum) |
|
void | setBCzero (ubit16 offset) |
|
void | setDeadTime (ubit16 deadt) |
|
void | setDeadTime (ubit16 iside, ubit16 ilayer, ubit16 deadt) |
|
void | setDeadTime (ubit16 iside, ubit16 ilayer, ubit16 igroup, ubit16 deadt) |
|
void | setDelay (ubit16 iside, ubit16 ilayer, ubit16 delay) |
|
void | setDelay (ubit16 iside, ubit16 ilayer, ubit16 igroup, ubit16 delay) |
|
void | setPulseWidth (ubit16 length) |
|
void | setPulseWidth (ubit16 iside, ubit16 ilayer, ubit16 length) |
|
void | setPulseWidth (ubit16 iside, ubit16 ilayer, ubit16 igroup, ubit16 length) |
|
void | setMask0 (ubit16 iside, ubit16 ilayer, ubit16 ichannel) |
|
void | setMask1 (ubit16 ithreshold, ubit16 iside, ubit16 imajority, ubit16 ichannel) |
|
void | setMask1 (ubit16 ithreshold, ubit16 iside, ubit16 imajority) |
|
void | setMask1 (ubit16 ithreshold, ubit16 iside) |
|
void | setMaskReadOut (ubit16 iside, ubit16 ilayer, ubit16 ichannel) |
|
void | setMaskReadOut (ubit16 iside, ubit16 ilayer, ubit16 ichannel, ubit16 nchannels) |
|
void | setConfig (int *l, ubit16 *p1, int *k, CMAword *p2, int *q, CMAword *o, sbit32 *g) |
|
void | setLocalDirection (ubit16 add, int content) |
|
void | setKReadOut (int kToReadout) |
|
void | setOverlaThres (int overthres) |
|
void | setMajority (ubit16 add, int content) |
|
void | setRoad (ubit16 addThres, ubit16 addChn, ubit16 add64, CMAword content) |
|
void | setRoad (ubit16 addThres, ubit16 addChn, char road[17]) |
|
void | setMatOverlap (ubit16 add, CMAword content) |
|
void | setTrigDeadTime (ubit16 deadt) |
|
void | setTrigDeadTime (ubit16 igroup, ubit16 deadt) |
|
void | setDiagonal (ubit16 add, sbit32 content) |
|
int | getMajority (ubit16 add) const |
|
CMAword | getRoad (ubit16 addThres, ubit16 addChn, ubit16 add64) const |
|
CMAword | getMatOverlap (ubit16 add) const |
|
void | execute () |
|
int | getSubsystem () const |
|
int | getProjection () const |
|
int | getSector () const |
|
int | getPad () const |
|
int | getLowHigh () const |
|
int | getAddress0 () const |
|
int | getAddress1 () const |
|
int | getLocalAdd () const |
|
ubit16 | getParams () const |
|
ubit16 | getOutputThres (ubit16 bunch) const |
|
ubit16 | getOutputOverl (ubit16 bunch) const |
|
sbit16 | getBunchPhase () const |
|
sbit16 | getBunchOffset () const |
|
void | display () const |
|
void | dispWind () const |
|
void | dispWind (ubit16 thres) const |
|
void | dispDefaultConfiguration () const |
|
ubit16 | char2int (const char *str, CMAword the32[2]) |
|
ObjectType | tag () const |
|
const std::string & | name () const |
|
virtual void | Print (std::ostream &, bool) const |
|
|
void | storeDeadtime () |
|
void | masking () |
|
void | delay () |
|
void | load () |
|
void | copyDataToReadOut () |
|
void | prepro () |
|
void | coincide () |
|
void | maskTo1 () |
|
void | deadTime () |
|
void | pulse_width () |
|
void | declus () |
|
void | majori () |
|
void | reduce (ubit16 ia, ubit16 ja, ubit16 ka, ubit16 la, ubit16 nup, ubit16 first) |
|
void | shift (CMAword *buffi, CMAword *buffo, ubit16 i) const |
|
void | makeOut () |
|
void | makeTestPattern (ubit16 mode, ubit16 ktimes) |
|
void | makeOutPattern () |
|
ubit16 | config (ubit16 i, ubit16 *arr) const |
|
void | set_to_0 (CMAword *p, sbit16 channel) const |
|
void | set_to_1 (CMAword *p, sbit16 channel) const |
|
CMAword | intPow (const ubit16 base, const ubit16 expo) const |
|
void | wind () const |
|
void | show_attributes () const |
|
void | disp_CMAreg (ubit16 id) const |
|
void | dispRegister (const CMAword *p, ubit16 side) const |
|
void | dispTrigger (const CMAword *p) const |
|
void | dispBinary (const CMAword *p, std::ostringstream &strdisp) const |
|
◆ Matrix()
Matrix::Matrix |
( |
int |
run, |
|
|
int |
event, |
|
|
CMAword |
debug, |
|
|
int |
subsys, |
|
|
int |
proj, |
|
|
int |
sect, |
|
|
int |
padadd, |
|
|
int |
lowhig, |
|
|
int |
add[2], |
|
|
int |
locadd, |
|
|
int |
NOBXS, |
|
|
int |
BCZERO |
|
) |
| |
Definition at line 53 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
64 cout <<
"=============================================" << endl
65 <<
"Constructor of Matrix called with parameters:" << endl
66 << subsys <<
" " <<
proj <<
" " << sect <<
" " << lowhig <<
" " <<
add[0] <<
add[1] << endl
67 <<
"=============================================" << endl;
◆ ~Matrix()
◆ char2int()
Definition at line 2017 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
2022 if (stringLength > 16) {
2025 for (
ubit16 i = 0;
i < stringLength;
i++) {
2027 if (*(
str + stringLength - 1 -
i) ==
'0')
2028 the32[
i / 8] = the32[
i / 8] + 0;
2029 else if (*(
str + stringLength - 1 -
i) ==
'1')
2030 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 1;
2031 else if (*(
str + stringLength - 1 -
i) ==
'2')
2032 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 2;
2033 else if (*(
str + stringLength - 1 -
i) ==
'3')
2034 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 3;
2035 else if (*(
str + stringLength - 1 -
i) ==
'4')
2036 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 4;
2037 else if (*(
str + stringLength - 1 -
i) ==
'5')
2038 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 5;
2039 else if (*(
str + stringLength - 1 -
i) ==
'6')
2040 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 6;
2041 else if (*(
str + stringLength - 1 -
i) ==
'7')
2042 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 7;
2043 else if (*(
str + stringLength - 1 -
i) ==
'8')
2044 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 8;
2045 else if (*(
str + stringLength - 1 -
i) ==
'9')
2046 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 9;
2047 else if (*(
str + stringLength - 1 -
i) ==
'a' || *(
str + stringLength - 1 -
i) ==
'A')
2048 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 10;
2049 else if (*(
str + stringLength - 1 -
i) ==
'b' || *(
str + stringLength - 1 -
i) ==
'B')
2050 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 11;
2051 else if (*(
str + stringLength - 1 -
i) ==
'c' || *(
str + stringLength - 1 -
i) ==
'C')
2052 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 12;
2053 else if (*(
str + stringLength - 1 -
i) ==
'd' || *(
str + stringLength - 1 -
i) ==
'D')
2054 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 13;
2055 else if (*(
str + stringLength - 1 -
i) ==
'e' || *(
str + stringLength - 1 -
i) ==
'E')
2056 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 14;
2057 else if (*(
str + stringLength - 1 -
i) ==
'f' || *(
str + stringLength - 1 -
i) ==
'F')
2058 the32[
i / 8] = the32[
i / 8] + (
intPow(16,
i % 8)) * 15;
◆ coincide()
void Matrix::coincide |
( |
| ) |
|
|
private |
Definition at line 1017 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1029 for (
i = 0;
i < 4;
i++) {
1030 for (j = 0; j < 2; j++) {
conf[
i][j] = 0; }
1034 cout <<
"--------------------" << endl <<
"| matrix: coincide |" << endl <<
"--------------------" << endl;
1043 cout <<
" Matrix::coincidence; lowhigh= " <<
m_lowhigh << endl
1044 <<
" Matrix::coincidence; majority array ="
1049 for (thres = 0; thres <
s_nthres; thres++) {
1062 for (
l = 0;
l < nconf;
l++) {
1063 for (j = 0; j <
s_nchan[0]; j++) {
1082 cout <<
"coincidence!!!"
1083 <<
" clock=" <<
i <<
" xchan=" << j << endl;
1088 if (BCaddress >= 0 && BCaddress <
m_Nbunch)
1111 for (thres = 0; thres <
s_nthres; thres++) {
1113 previousTime = bitstatus(&
m_trigg[thres][
i - 1],
chan);
1122 for (thres = 0; thres <
s_nthres; thres++) {
1137 for (thres = 0; thres <
s_nthres; thres++) {
1143 if (BCaddress >= 0 && BCaddress <
m_Nbunch) {
1157 for (
m = 0;
m < 2;
m++) {
1160 if (BCaddress >= 0 && BCaddress <
m_Nbunch) {
1172 for (
m = 0;
m < 2;
m++) {
1180 for (
m = 0;
m < 2;
m++) {
◆ config()
◆ copyDataToReadOut()
void Matrix::copyDataToReadOut |
( |
| ) |
|
|
private |
◆ deadTime()
void Matrix::deadTime |
( |
| ) |
|
|
private |
◆ declus()
◆ delay()
◆ deleteRPCdata()
void Matrix::deleteRPCdata |
( |
| ) |
|
◆ disp_CMAreg()
void Matrix::disp_CMAreg |
( |
ubit16 |
id | ) |
const |
|
private |
Definition at line 1868 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1874 for (
i = 0;
i < 2;
i++) {
1875 cout <<
" CMA Side (0=side-x; 1=side-y) " <<
i << endl;
1876 for (j = 0; j < 2; j++) {
1879 cout <<
" Layer " << j << endl;
1883 cout <<
" Layer " << j << endl;
1886 default: cout <<
" Matrix::disp_CMAreg id value " <<
id <<
" not foreseen " << endl;
1895 cout <<
" Threshold address " <<
i << endl;
1896 for (j = 0; j < 2; j++) {
1897 cout <<
" CMA Side (0=side-x; 1=side-y) " << j << endl;
1898 for (
k = 0;
k < 2;
k++) {
1899 cout <<
" Majority type (0=1/2; 1=2/2) " <<
k << endl;
1907 cout <<
" Trigger Threshold address " <<
i << endl;
1910 cout <<
" ReadOut Buffer " << endl;
1913 default: cout <<
" Matrix::disp_CMAreg id value " <<
id <<
" not foreseen " << endl;
1917 cout <<
" " << endl;
◆ dispBinary()
void Matrix::dispBinary |
( |
const CMAword * |
p, |
|
|
std::ostringstream & |
strdisp |
|
) |
| const |
|
private |
◆ dispDefaultConfiguration()
void Matrix::dispDefaultConfiguration |
( |
| ) |
const |
Definition at line 319 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
324 cout <<
"=================================" << std::endl
325 <<
"Matrix::dispDefaultConfiguration:" << std::endl
326 <<
"=================================" << std::endl;
327 cout <<
"--------------------------------" << std::endl <<
"+ Coincidence Windows: " << std::endl;
329 cout <<
" + Threshold address:" <<
i << std::endl;
330 for (j = 0; j <
s_nchan[0]; j++) {
331 cout <<
" -Channel address:" << j <<
" Window 63-32 " << std::hex <<
m_trigRoad[
i][j][1] <<
" Window 31-00 "
338 cout <<
"--------------------------------" << std::endl
339 <<
"+ Majority addresses: " << std::endl
340 <<
"--------------------------------" << std::endl;
346 cout <<
"--------------------------------" << std::endl
347 <<
"+ Threshold address low-to-high: " <<
m_lowtohigh << std::endl
348 <<
"+ Threshold address low-to-readout: " <<
m_toreadout << std::endl
349 <<
"+ Threshold address for overlap: " <<
m_overlapthres << std::endl;
353 cout <<
"--------------------------------" << std::endl
354 <<
"+ Local coincidence setting: " << std::endl
356 <<
" -Coincidence Plane: " <<
m_localDirec[1] << std::endl;
360 cout <<
"--------------------------------" << std::endl
361 <<
"+ Overlap mask setting: " << std::endl
363 <<
" -`left ' address " <<
m_matOverlap[1] << std::endl;
367 cout <<
"-----------------------------------------------" << std::endl
368 <<
"+ Channel pulse-width, delay and deadtime : " << std::endl;
369 for (
i = 0;
i < 2;
i++) {
371 cout <<
" +Pivot Plane " << std::endl;
373 cout <<
" +Coincidence Plane " << std::endl;
375 for (j = 0; j < 2; j++) {
376 cout <<
" +Layer " << j << std::endl;
378 cout <<
" -group " <<
k <<
" pulsewidth " <<
m_pulseWidth[
i][j][
k] << std::endl;
381 cout <<
" -group " <<
k <<
" delay " <<
m_channDelay[
i][j][
k] << std::endl;
384 cout <<
" -group " <<
k <<
" deadtime " <<
m_channDeadT[
i][j][
k] << std::endl;
391 cout <<
"-----------------------------------------------" << std::endl <<
"+ Map of the masked-to-0 channels : " << std::endl;
392 for (
i = 0;
i < 2;
i++) {
394 cout <<
" +Pivot Plane " << std::endl;
396 cout <<
" +Coincidence Plane " << std::endl;
398 for (j = 0; j < 2; j++) {
399 cout <<
" +Layer " << j << std::endl;
408 cout <<
"-----------------------------------------------" << std::endl <<
"+ Trigger Dead Time " << std::endl;
410 cout <<
" -group " <<
k <<
" Trigger DeadTime " <<
m_trigDeadTime[
k] << std::endl;
415 cout <<
"-----------------------------------------------" << std::endl
416 <<
"+ Simulation parameters to align with the hardware (not used in CM)" << std::endl;
421 <<
" BunchPhase = 0 : to be used for standard ATLAS LVL1 simulation" << std::endl
422 <<
" BunchPhase = -1 : to be used to compare with the hardware; " << std::endl
423 <<
" this value fixed with VHDL comparison 1-7 august 2004." << std::endl
425 <<
" BunchOffset = 0 : to test with hardware; use this setting with setBCzero(0)." << std::endl;
429 cout <<
"======================================" << std::endl
430 <<
"Matrix::dispDefaultConfiguration: Done" << std::endl
431 <<
"======================================" << std::endl;
◆ display()
void Matrix::display |
( |
| ) |
const |
Definition at line 1814 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1820 cout <<
"=======================" << endl <<
"|| Matrix Display ||" << endl <<
"=======================" << endl << endl;
1823 cout << endl <<
" All raw data " << endl;
1824 for (
i = 0;
i < 2;
i++) {
1825 cout <<
" Matrix Side is " <<
i << endl;
1828 cout <<
" Layer= " << rpcpnt->
layer <<
" stripadd= " << rpcpnt->stripadd <<
" time= " << rpcpnt->time
1829 <<
" mask= " << rpcpnt->masked <<
" BC= " << rpcpnt->BC <<
" DLL= " << rpcpnt->DLL <<
" delay= " << rpcpnt->delay << endl;
1830 rpcpnt = rpcpnt->next;
1835 cout <<
" Display Matrix Input " << endl;
1841 cout <<
" Display Matrix Preprocessing " << endl;
1846 cout <<
" Display Matrix Majority " << endl;
1851 cout <<
" Display Trigger " << endl;
◆ dispRegister()
Definition at line 1920 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1925 std::ostringstream strdisp;
1929 for (j = 0; j <
s_nchan[
side]; j += 2) { strdisp <<
" " << j % 10; }
1930 strdisp <<
" " << endl;
1932 strdisp <<
" " << j % 10 <<
" ";
1933 for (
k = 0;
k <
n;
k++) {
1936 strdisp <<
" " << endl;
1940 cout << strdisp.str() << endl;
◆ dispTrigger()
Definition at line 1943 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1949 std::ostringstream strdisp;
1952 for (j = 0; j <
s_nchan[0]; j += 2) { strdisp <<
" " << j % 10; }
1953 strdisp <<
" " << endl;
1955 strdisp <<
" " << j % 10 <<
" ";
1957 strdisp <<
" " << endl;
1960 cout << strdisp.str() << endl;
◆ dispWind() [1/2]
void Matrix::dispWind |
( |
| ) |
const |
◆ dispWind() [2/2]
void Matrix::dispWind |
( |
ubit16 |
thres | ) |
const |
Definition at line 1981 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1982 std::ostringstream strdisp;
1985 <<
" =========================" << endl
1987 <<
" = Matrix::dispWind =" << endl
1988 <<
" = Threshold address " << thres <<
" =" << endl
1990 <<
" =========================" << endl
1997 strdisp <<
" " << j <<
" ";
1999 strdisp << j <<
" ";
2008 strdisp <<
" " << endl;
2010 strdisp <<
" " << endl;
2011 strdisp <<
" 00000000001111111111222222222233" << endl <<
" 01234567890123456789012345678901" << endl;
2013 cout << strdisp.str() << endl;
◆ execute()
◆ getAddress0()
int Matrix::getAddress0 |
( |
| ) |
const |
◆ getAddress1()
int Matrix::getAddress1 |
( |
| ) |
const |
◆ getBunchOffset()
sbit16 Matrix::getBunchOffset |
( |
| ) |
const |
◆ getBunchPhase()
sbit16 Matrix::getBunchPhase |
( |
| ) |
const |
◆ getLocalAdd()
int Matrix::getLocalAdd |
( |
| ) |
const |
◆ getLowHigh()
int Matrix::getLowHigh |
( |
| ) |
const |
◆ getMajority()
int Matrix::getMajority |
( |
ubit16 |
add | ) |
const |
◆ getMatOverlap()
◆ getOutputOverl()
◆ getOutputThres()
◆ getPad()
int Matrix::getPad |
( |
| ) |
const |
◆ getParams()
ubit16 Matrix::getParams |
( |
| ) |
const |
◆ getProjection()
int Matrix::getProjection |
( |
| ) |
const |
◆ getRoad()
◆ getSector()
int Matrix::getSector |
( |
| ) |
const |
◆ getSubsystem()
int Matrix::getSubsystem |
( |
| ) |
const |
◆ initDat()
◆ initPointers()
void Matrix::initPointers |
( |
| ) |
|
◆ initRegisters()
void Matrix::initRegisters |
( |
| ) |
|
◆ initRPCpointers()
void Matrix::initRPCpointers |
( |
| ) |
|
◆ intPow()
◆ load()
Definition at line 945 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
951 cout <<
"--------------------" << endl <<
"| Matrix::load |" << endl <<
"--------------------" << endl;
958 cout <<
" Layer= " << rpcpnt->
layer <<
" stripadd= " << rpcpnt->stripadd <<
" time= " << rpcpnt->time
959 <<
" mask= " << rpcpnt->masked <<
" BC= " << rpcpnt->BC <<
" DLL= " << rpcpnt->DLL <<
" delay= " << rpcpnt->delay
962 abs_time =
s_NDLLCYC * rpcpnt->BC + rpcpnt->DLL + rpcpnt->delay;
967 if (
m_matrixDebug & 1 <<
df) { cout <<
" abs_time= " << abs_time <<
" timeadd= " << timeadd << endl; }
972 if (timeadd >= 0 && timeadd < m_nclock && !rpcpnt->masked) {
974 cout <<
" setting input with side " <<
i <<
" " << rpcpnt->layer <<
" " << timeadd <<
" 0"
975 <<
" for channel " << rpcpnt->stripadd <<
" timeadd " << timeadd << endl;
980 rpcpnt = rpcpnt->next;
◆ majori()
◆ makeOut()
◆ makeOutPattern()
void Matrix::makeOutPattern |
( |
| ) |
|
|
private |
Definition at line 1601 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1603 const float timeOffsetKPa = 168.125;
1604 const float timeOffsetThr = 210.500;
1607 ubit16 chanHistory[32] = {0};
1608 const ubit16 maxchan = 100;
1617 for (
i = 0;
i <
m_nclock;
i++) { nchannels[
i][0][0] = 0; }
1624 if (!chanHistory[
l]) {
1626 if (ntimes < maxtimes) ntimes += 1;
1629 if (nchannels[ntimes - 1][0][0] < maxchan) nchannels[ntimes - 1][0][0] += 1;
1630 channels[ntimes - 1][0][0][nchannels[ntimes - 1][0][0] - 1] =
l;
1641 ubit16 nthresPass, thresPass[8], overlPass[8], BCidentifier[8];
1647 BCidentifier[nthresPass] =
i;
1655 ofstream out_k_trigger;
1656 out_k_trigger.open(
"k-trigger.output", ios::app);
1660 for (
i = 0;
i < ntimes;
i++) {
1661 out_k_trigger <<
" TIME " <<
times[
i] + timeOffsetKPa <<
" K ";
1662 out_k_trigger << nchannels[
i][0][0] <<
" ";
1663 for (
l = 0;
l < nchannels[
i][0][0];
l++) { out_k_trigger <<
channels[
i][0][0][
l] <<
" "; }
1664 out_k_trigger << endl;
1668 for (
i = 0;
i < nthresPass;
i++) {
1669 out_k_trigger <<
" TIME " << BCidentifier[
i] * 25. + timeOffsetThr;
1670 out_k_trigger <<
" THR " << thresPass[
i] << endl;
1672 out_k_trigger <<
" TIME " << BCidentifier[
i] * 25. + timeOffsetThr;
1673 out_k_trigger <<
" OVL " << overlPass[
i] << std::endl;
1678 out_k_trigger.close();
◆ makeTestPattern()
Definition at line 1505 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1508 const ubit16 maxchan = 100;
1509 const ubit16 maxtimes = 1000;
1511 ubit16 IJ[maxtimes][4] = {{0}};
1513 float times[maxtimes] = {0};
1515 const float timeOffsetHit = 114.675;
1520 strcpy(plane[0],
"I0");
1521 strcpy(plane[1],
"I1");
1522 strcpy(plane[2],
"J0");
1523 strcpy(plane[3],
"J1");
1525 cout <<
"-------------------------------" << endl
1526 <<
"| Matrix::makeTestPattern |" << endl
1527 <<
"-------------------------------" << endl;
1535 for (
i = 0;
i < 2;
i++) {
1539 rpcpnt = rpcpnt->next;
1545 timemin = 999999999.;
1546 for (
i = 0;
i < 2;
i++) {
1549 if (rpcpnt->time < timemin && !rpcpnt->mark) {
1550 timemin = rpcpnt->
time;
1553 rpcpnt = rpcpnt->next;
1557 if (ntimes < maxtimes) ntimes += 1;
1558 times[ntimes - 1] = timemin;
1559 for (
i = 0;
i < 2;
i++) {
1562 if (rpcpnt->time == timemin) {
1564 if (IJ[ntimes - 1][rpcpnt->layer + 2 *
i] < maxchan) { IJ[ntimes - 1][rpcpnt->layer + 2 *
i] += 1; }
1565 channels[ntimes - 1][rpcpnt->layer + 2 *
i][IJ[ntimes - 1][rpcpnt->layer + 2 *
i] - 1] = rpcpnt->stripadd;
1567 rpcpnt = rpcpnt->next;
1577 vhdlinput.open(
"k-trigger.output", ios::app);
1579 cout <<
" File for vhdl analysis not opened. " << endl <<
" ==================================" << endl << endl;
1582 cout <<
" File for vhdl analysis correctly opened" << endl << endl;
1587 vhdlinput <<
" LINES " << (ntimes + ktimes) << std::endl;
1589 for (
l = 0;
l < ntimes;
l++) {
1590 vhdlinput <<
" TIME " <<
times[
l] + timeOffsetHit <<
" ";
1591 for (
i = 0;
i < 4;
i++) {
1592 vhdlinput << plane[
i][0] << plane[
i][1] <<
" " << IJ[
l][
i] <<
" ";
1593 for (j = 0; j < IJ[
l][
i]; j++) { vhdlinput <<
channels[
l][
i][IJ[
l][
i] - 1 - j] <<
" "; }
1595 vhdlinput << std::endl;
◆ masking()
◆ maskTo1()
◆ name()
const std::string& BaseObject::name |
( |
| ) |
const |
|
inlineinherited |
◆ prepro()
◆ Print()
virtual void BaseObject::Print |
( |
std::ostream & |
, |
|
|
bool |
|
|
) |
| const |
|
inlinevirtualinherited |
Reimplemented in CMAparameters, RPC_CondCabling::CMApivotdata, RPC_CondCabling::CMAcablingdata, RPC_CondCabling::RPCchamberdata, RPC_CondCabling::WiredORdata, RPC_CondCabling::RPCchamber, CMApatterns, RPC_CondCabling::WiredOR, MuonSimuTrack, RPCdigit, CMAtrigger, PADpatterns, CMAdata, SLpatterns, SLdata, PADdata, RPCtrigDataObject, and bitPATTERN.
Definition at line 25 of file BaseObject.h.
◆ pulse_width()
void Matrix::pulse_width |
( |
| ) |
|
|
private |
◆ putData()
void Matrix::putData |
( |
int |
sidemat, |
|
|
int |
layer, |
|
|
int |
stripaddress, |
|
|
float |
time |
|
) |
| |
Definition at line 434 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
440 if (
m_matrixDebug & 1 <<
df) { cout <<
"Matrix:putData: putting data on Matrix" << endl; }
466 if (stripaddress >= 0 && stripaddress <
s_nchan[sidemat]) {
468 rpcpntnew =
new rpcdata;
470 rpcpntnew->layer =
layer;
471 rpcpntnew->stripadd = stripaddress;
472 rpcpntnew->time =
time;
473 rpcpntnew->BC =
BCID;
474 rpcpntnew->DLL = DLLID;
475 rpcpntnew->masked = 0;
476 rpcpntnew->maskto1 = 0;
477 rpcpntnew->deadtime = 0;
478 rpcpntnew->delay = 0;
487 throw std::out_of_range(
"Matrix::putData failure: channel addressed is " +
std::to_string(stripaddress) +
" for matrix side " +
◆ putPatt()
◆ reduce()
Definition at line 1409 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1425 cout <<
" --------------------" << endl
1426 <<
" | Matrix::reduce |" << endl
1427 <<
" --------------------" << endl
1428 <<
" nup= " << nup <<
" first " <<
first << endl;
1438 }
else if (nup == 3) {
1441 }
else if (nup == 4) {
1444 }
else if (nup > 4) {
1448 if (
m_matrixDebug & 1 <<
df) { cout <<
" j= " << j <<
" ncop= " << ncop << endl; }
1452 for (na = 0; na <
s_nthres; na++) {
1453 for (
i = j;
i < j + ncop;
i++) {
◆ reset()
◆ set_to_0()
◆ set_to_1()
◆ setBCzero()
void Matrix::setBCzero |
( |
ubit16 |
offset | ) |
|
◆ setConfig()
◆ setDeadTime() [1/3]
void Matrix::setDeadTime |
( |
ubit16 |
deadt | ) |
|
◆ setDeadTime() [2/3]
◆ setDeadTime() [3/3]
Definition at line 567 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
570 if (iside == 0 && igroup > 3) {
571 throw std::out_of_range(
572 "Matrix::setDeadTime: problems with side and group addresses: "
577 throw std::out_of_range(
578 "Matrix::setDeadTime: problems in adressing pulseWidth: "
◆ setDefaultConfiguration()
void Matrix::setDefaultConfiguration |
( |
| ) |
|
Definition at line 215 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
227 for (j = 0; j <
s_nchan[0]; j++) {
264 for (
i = 0;
i < 2;
i++) {
265 for (j = 0; j < 2; j++) {
280 for (
i = 0;
i < 2;
i++) {
281 for (j = 0; j < 2; j++) {
311 cout <<
"====================================================================" << endl
312 <<
"Matrix::setDefaultConfiguration: "
313 <<
"Default settings have been loaded." << std::endl
314 <<
"===================================================================" << endl;
◆ setDelay() [1/2]
◆ setDelay() [2/2]
Definition at line 595 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
598 if (iside == 0 && igroup > 3) {
599 throw std::out_of_range(
600 "Matrix::setDelay: problems with side and group addresses:"
605 throw std::out_of_range(
606 "Matrix::setDelay: problems in adressing pulseWidth:"
◆ setDiagonal()
◆ setKReadOut()
void Matrix::setKReadOut |
( |
int |
kToReadout | ) |
|
◆ setLocalDirection()
void Matrix::setLocalDirection |
( |
ubit16 |
add, |
|
|
int |
content |
|
) |
| |
◆ setMajority()
void Matrix::setMajority |
( |
ubit16 |
add, |
|
|
int |
content |
|
) |
| |
◆ setMask0()
◆ setMask1() [1/3]
◆ setMask1() [2/3]
◆ setMask1() [3/3]
◆ setMaskReadOut() [1/2]
◆ setMaskReadOut() [2/2]
◆ setMatOverlap()
◆ setOverlaThres()
void Matrix::setOverlaThres |
( |
int |
overthres | ) |
|
◆ setPulseWidth() [1/3]
Definition at line 625 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
628 if (iside == 0 && igroup > 3) {
629 throw std::out_of_range(
630 "Matrix::setDelay: problems with side and group addresses:"
635 throw std::out_of_range(
636 "Matrix::setDelay: problems in adressing pulseWidth:"
◆ setPulseWidth() [2/3]
◆ setPulseWidth() [3/3]
void Matrix::setPulseWidth |
( |
ubit16 |
length | ) |
|
◆ setRoad() [1/2]
void Matrix::setRoad |
( |
ubit16 |
addThres, |
|
|
ubit16 |
addChn, |
|
|
char |
road[17] |
|
) |
| |
◆ setRoad() [2/2]
◆ setRunEvent()
void Matrix::setRunEvent |
( |
int |
runNum, |
|
|
int |
eventNum |
|
) |
| |
◆ setTrigDeadTime() [1/2]
void Matrix::setTrigDeadTime |
( |
ubit16 |
deadt | ) |
|
◆ setTrigDeadTime() [2/2]
void Matrix::setTrigDeadTime |
( |
ubit16 |
igroup, |
|
|
ubit16 |
deadt |
|
) |
| |
◆ shift()
Definition at line 1328 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1333 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k); }
1336 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k) << 1; }
1337 *(buffo + 1) = (*(buffi + 0) & 0x80000000) ? (*(buffo + 1) | 0x1) : (*(buffo + 1) | 0);
1340 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k) | (*(buffi +
k) << 1); }
1341 *(buffo + 1) = (*(buffi + 0) & 0x80000000) ? (*(buffo + 1) | 0x1) : (*(buffo + 1) | 0);
1344 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k) >> 1; }
1345 *(buffo + 0) = (*(buffi + 1) & 0x1) ? (*(buffo + 0) | 0x80000000) : (*(buffo + 0) | 0);
1348 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k) | (*(buffi +
k) >> 1); }
1349 *(buffo + 0) = (*(buffi + 1) & 0x1) ? (*(buffo + 0) | 0x80000000) : (*(buffo + 0) | 0);
1352 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = (*(buffi +
k) >> 1) | (*(buffi +
k) << 1); }
1353 *(buffo + 0) = (*(buffi + 1) & 0x1) ? (*(buffo + 0) | 0x80000000) : (*(buffo + 0) | 0);
1354 *(buffo + 1) = (*(buffi + 0) & 0x80000000) ? (*(buffo + 1) | 0x1) : (*(buffo + 1) | 0);
1357 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k) | (*(buffi +
k) >> 1) | (*(buffi +
k) << 1); }
1358 *(buffo + 0) = (*(buffi + 1) & 0x1) ? (*(buffo + 0) | 0x80000000) : (*(buffo + 0) | 0);
1359 *(buffo + 1) = (*(buffi + 0) & 0x80000000) ? (*(buffo + 1) | 0x1) : (*(buffo + 1) | 0);
1362 cout <<
" Matrix::shift -- m_localDirec[" <<
i <<
"]=" <<
m_localDirec[
i] <<
" not expected; m_localDirec forced to be 1 "
1364 for (
k = 0;
k < 2;
k++) { *(buffo +
k) = *(buffi +
k); }
1370 if (!
i) *(buffo + 1) = 0;
◆ show_attributes()
void Matrix::show_attributes |
( |
| ) |
const |
|
private |
◆ storeDeadtime()
void Matrix::storeDeadtime |
( |
| ) |
|
|
private |
◆ tag()
◆ wind()
void Matrix::wind |
( |
| ) |
const |
|
private |
Definition at line 1791 of file Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx.
1793 cout <<
"-----------------------" << endl
1794 <<
"| Matrix::wind |" << endl
1795 <<
"-----------------------" << endl
1796 <<
" Matrix Roads " << endl;
1798 for (j = 0; j <
s_nchan[0]; j++) {
1799 cout <<
" thres. " <<
i <<
" channel "
1803 <<
" Road0 " << hex << (
m_trigRoad[
i][j][0]) << dec <<
" Road1 " << hex << (
m_trigRoad[
i][j][1]) << dec << endl;
1806 cout <<
" majorities: " << endl;
1809 <<
" number of overlapping ' low' channels: " <<
m_matOverlap[0] << endl
1810 <<
" number of overlapping 'high' channels: " <<
m_matOverlap[1] << endl;
1811 for (
i = 0;
i <
s_nchan[0];
i++) { cout <<
" channel " <<
i <<
" in coincidence with " <<
m_diagonal[
i] << endl; }
◆ highestthRO
ubit16 Matrix::highestthRO[64] |
◆ k_readout
◆ m_address
◆ m_BCID
◆ m_BCzero
◆ m_BunchOffset
◆ m_BunchPhase
◆ m_channDeadT
ubit16 Matrix::m_channDeadT[2][2][8] |
|
private |
◆ m_channDelay
ubit16 Matrix::m_channDelay[2][2][4] |
|
private |
◆ m_channMask0
ubit16 Matrix::m_channMask0[2][2][64] |
|
private |
◆ m_channMask1
CMAword Matrix::m_channMask1[3][2][2][2] |
|
private |
◆ m_channReadOutMask
CMAword Matrix::m_channReadOutMask[2][2][2] |
|
private |
◆ m_chdly
◆ m_datarpc
◆ m_diagonal
◆ m_event
◆ m_geome
◆ m_highestth
◆ m_input
CMAword Matrix::m_input[2][2][64][2] |
|
private |
◆ m_k_pattern
◆ m_kRead
◆ m_localadd
◆ m_localDirec
ubit16 Matrix::m_localDirec[2] |
|
private |
◆ m_locDi
◆ m_lowhigh
◆ m_lowtohigh
◆ m_major
◆ m_majorities
ubit16 Matrix::m_majorities[3] |
|
private |
◆ m_matOverlap
◆ m_matrixDebug
◆ m_mjori
CMAword Matrix::m_mjori[3][2][2][64][2] |
|
private |
◆ m_name
std::string BaseObject::m_name |
|
privateinherited |
◆ m_Nbunch
◆ m_nclock
◆ m_overl
◆ m_overlap
◆ m_overlapthres
◆ m_pad
◆ m_prepr
CMAword Matrix::m_prepr[3][2][2][64][2] |
|
private |
◆ m_projection
◆ m_pulseWidth
ubit16 Matrix::m_pulseWidth[2][2][8] |
|
private |
◆ m_roads
◆ m_run
◆ m_sector
◆ m_subsystem
◆ m_tag
◆ m_thisBC
◆ m_toreadout
◆ m_trigDeadTime
ubit16 Matrix::m_trigDeadTime[4] |
|
private |
◆ m_trigg
◆ m_trigger
ubit16 Matrix::m_trigger[3][8] |
|
private |
◆ m_triggerOverlap
CMAword Matrix::m_triggerOverlap[8][2] |
|
private |
◆ m_triggerOverlapRO
CMAword Matrix::m_triggerOverlapRO[64][2] |
|
private |
◆ m_trigRoad
CMAword Matrix::m_trigRoad[3][32][2] |
|
private |
◆ m_width
◆ overlapRO
◆ rodat
◆ s_BCtime
const float Matrix::s_BCtime = 25.0 |
|
static |
◆ s_DLLtime
◆ s_NBunch
◆ s_nchan
◆ s_nclock
◆ s_NDLLCYC
◆ s_nthres
◆ s_ROOffset
◆ s_timeGroupA
◆ s_timeGroupB
◆ s_wordlen
The documentation for this class was generated from the following files:
void putData(int sidemat, int layer, int stripaddress, float time)
ubit16 m_pulseWidth[2][2][8]
void setKReadOut(int kToReadout)
void setMajority(ubit16 add, int content)
void setDelay(ubit16 iside, ubit16 ilayer, ubit16 delay)
ubit16 m_channDelay[2][2][4]
CMAword m_trigRoad[3][32][2]
void disp_CMAreg(ubit16 id) const
void setLocalDirection(ubit16 add, int content)
static const ubit16 s_NDLLCYC
int run(int argc, char *argv[])
static const float s_BCtime
void show_attributes() const
void setPulseWidth(ubit16 length)
void dispDefaultConfiguration() const
CMAword m_triggerOverlapRO[64][2]
void setRoad(ubit16 addThres, ubit16 addChn, ubit16 add64, CMAword content)
CMAword m_prepr[3][2][2][64][2]
void dispBinary(const CMAword *p, std::ostringstream &strdisp) const
void setMaskReadOut(ubit16 iside, ubit16 ilayer, ubit16 ichannel)
void setTrigDeadTime(ubit16 deadt)
CMAword m_channMask1[3][2][2][2]
CMAword m_k_pattern[8 *64]
void reduce(ubit16 ia, ubit16 ja, ubit16 ka, ubit16 la, ubit16 nup, ubit16 first)
static const sbit16 s_timeGroupA
CMAword intPow(const ubit16 base, const ubit16 expo) const
void set_to_0(CMAword *p, sbit16 channel) const
POOL::TEvent event(POOL::TEvent::kClassAccess)
void setDeadTime(ubit16 deadt)
void setMask1(ubit16 ithreshold, ubit16 iside, ubit16 imajority, ubit16 ichannel)
CMAword m_input[2][2][64][2]
void dispTrigger(const CMAword *p) const
CMAword m_triggerOverlap[8][2]
bool add(const std::string &hname, TKey *tobj)
static const ubit16 s_nthres
void setDiagonal(ubit16 add, sbit32 content)
ubit16 char2int(const char *str, CMAword the32[2])
static const float s_DLLtime
void setDefaultConfiguration()
void makeTestPattern(ubit16 mode, ubit16 ktimes)
ubit16 m_channMask0[2][2][64]
static const sbit16 s_wordlen
std::string to_string(const DetectorType &type)
BaseObject(ObjectType, const std::string &)
ubit16 config(ubit16 i, ubit16 *arr) const
def time(flags, cells_name, *args, **kw)
static const sbit16 s_timeGroupB
CMAword m_mjori[3][2][2][64][2]
static const ubit16 s_nchan[2]
void setMatOverlap(ubit16 add, CMAword content)
CMAword m_channReadOutMask[2][2][2]
unsigned short int ubit16
ubit16 m_channDeadT[2][2][8]
CMAword rodat[2][2][64][2]
Note array lengths using hardcoded values rather than to depend on NOBXS as they were in the past (as...
void zero(TH2 *h)
zero the contents of a 2d histogram
void shift(CMAword *buffi, CMAword *buffo, ubit16 i) const
void dispRegister(const CMAword *p, ubit16 side) const
void set_to_1(CMAword *p, sbit16 channel) const