48 cout <<
" ==================== " << endl;
49 cout <<
" = Pad::Pad = " << endl;
50 cout <<
" ==================== " << endl;
51 cout <<
" m_run= " <<
m_run <<
" m_event= " <<
m_event <<
" padDebug= " << hex <<
padDebug << dec << endl;
62 if (
padDebug & 1 << df) cout <<
"Distructor of Pad called " << endl;
71 for (m = 0; m < 2; m++) {
72 for (k = 0; k < 2; k++) {
73 for (j = 0; j < 2; j++) {
75 for (i = 0; i < 2; i++) {
84 for (k = 0; k < 8; k++) {
88 for (k = 0; k < 7; k++) {
117 cout <<
" Pad.setProjectionLogic; prologic= " << prologic <<
" not allowed; default value " <<
m_projectionLogic <<
" is retained "
133 if (lowhig > 1 || etaphi > 1 || locCMadd > 1 || BX >=
m_nBunMax) {
134 cout <<
" Pad::load : lowhig=" << lowhig <<
" etaphi=" << etaphi <<
" locCMadd=" << locCMadd <<
" BX=" << BX <<
" not valid"
137 m_padIn[lowhig][etaphi][locCMadd][BX][0] = thres;
138 m_padIn[lowhig][etaphi][locCMadd][BX][1] = overl;
144 if (
padDebug & 1 << df) cout <<
" execute PAD " << endl;
162 for (m = 0; m < 2; m++) {
163 for (j = 0; j < 2; j++) {
164 for (i = 0; i < 2; i++) {
171 thisThreshold = 3 * m +
m_padIn[m][j][i][l][0];
182 cout <<
" Pad::threshold; padStep2 eta-phi " << j <<
" localAdd " << i <<
" Bunch " << l
183 <<
" threshold " <<
m_padStep2[l][j][2] << endl;
199 for (j = 0; j < 2; j++) {
200 for (i = 0; i < 2; i++) {
217 default: cout <<
" Pad: problems with projectionLogic= " <<
m_projectionLogic << endl;
313 char padOutText[7][6];
314 strcpy(padOutText[0],
"RoI");
315 strcpy(padOutText[1],
"Ptcod");
316 strcpy(padOutText[2],
"OPL");
317 strcpy(padOutText[3],
"OvPhi");
318 strcpy(padOutText[4],
"OvEta");
319 strcpy(padOutText[5],
"RoIAm");
320 strcpy(padOutText[6],
"BCDcn");
323 cout <<
" ************************************* " << endl;
324 cout <<
" * * " << endl;
325 cout <<
" * P A D D I S P L A Y * " << endl;
326 cout <<
" * * " << endl;
327 cout <<
" ************************************* " << endl;
329 cout <<
" P A R A M E T E R S: " << endl;
331 cout <<
" Sector " <<
m_sector << endl;
332 cout <<
" PAD addr " <<
m_padadd << endl;
333 cout <<
" Low-High " <<
m_lowhigh << endl;
341 cout <<
" D U M P padStep2 " << endl;
343 cout <<
"Projection Eta ";
345 cout <<
"Projection Phi " << endl;
347 cout <<
"---------------";
349 cout <<
"---------------" << endl;
351 cout <<
"C C t a n o O A";
353 cout <<
"C C t a n o O A" << endl;
355 cout <<
"M M h d u v P m";
357 cout <<
"M M h d u v P m" << endl;
359 cout <<
"0 1 r d m e L b";
361 cout <<
"0 1 r d m e L b" << endl;
365 cout <<
" e r r i" << endl;
369 cout <<
" Bunch Crossing Number " << j <<
" ";
370 for (i = 0; i < 2; i++) {
374 if (i == 0) cout <<
" ";
384 cout <<
" D U M P PadOut " << endl;
386 cout <<
" Pad: padOut Bunch=" << i <<
":";
387 for (j = 0; j < 7; j++) { cout <<
" " << padOutText[j] <<
" " <<
m_padOut[i][j]; }
406 cout <<
" getRoI; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
416 cout <<
" getPTCoding; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
426 cout <<
" getOPL; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
436 cout <<
" getOverlapPhi; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
446 cout <<
" getOverlapEta; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
456 cout <<
" getRoIAmbiguity; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
466 cout <<
" getBCIDCounter; Error: bunch address " << bunch <<
" not consistent with m_nBunMax= " <<
m_nBunMax << endl;
unsigned short int ubit16
void load(ubit16 lowhig, ubit16 etaphi, ubit16 CMadd, ubit16 BX, ubit16 thres, ubit16 overl)
ubit16 getPTCoding(ubit16 bunch)
void setDefaultConfiguration()
ubit16 getBCIDCounter(ubit16 bunch)
ubit16 m_padStep2[8][2][8]
Pad(int run, int event, CMAword debug, ubit16 subsys, ubit16 sect, ubit16 padad, ubit16 lowhig, bool oldSimulation, int NOBXS)
void setOldSimulation(bool value)
ubit16 getRoI(ubit16 bunch)
ubit16 getOPL(ubit16 bunch)
ubit16 m_padIn[2][2][2][8][2]
void setProjectionLogic(ubit16 prologic)
ubit16 getRoIAmbiguity(ubit16 bunch)
ubit16 m_hitInOuterPlane[3]
ubit16 getOverlapPhi(ubit16 bunch)
ubit16 getOverlapEta(ubit16 bunch)
unsigned short int m_feet_thresholds[3]
int run(int argc, char *argv[])