- Timestamp:
- 01/30/04 15:16:40 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx
r2443 r2989 124 124 else if ( strncmp (datac, "threshold_file", 14 ) == 0 ) { 125 125 sscanf (datac, "%s %s", dummy, input_thres ) ; 126 bthresholdpixel= TRUE;126 bthresholdpixel=kTRUE; 127 127 } 128 128 … … 172 172 FILE *unit_thres; 173 173 174 if (bthresholdpixel == TRUE) {174 if (bthresholdpixel == kTRUE) { 175 175 if ((unit_thres=fopen(input_thres, "r"))==0){ 176 176 cout<<"WARNING: not able to read ..."<<input_thres<<endl; … … 308 308 { 309 309 for ( Int_t k=0; k<TRIGGER_CELLS; k++ ) { 310 TC[k][i]= FALSE;310 TC[k][i]=kFALSE; 311 311 } 312 312 i++ ; … … 316 316 fscanf ( unit, "%d ", &i ) ; 317 317 if ((i-1)<pix) 318 TC[k][i-1]= TRUE;318 TC[k][i-1]=kTRUE; 319 319 } 320 320 } … … 330 330 331 331 for ( i =0 ; i <pix ; i++ ) { 332 used [i] = FALSE ;333 dknt [i] = FALSE ;332 used [i] = kFALSE ; 333 dknt [i] = kFALSE ; 334 334 335 335 nphotshow[i] = 0 ; … … 351 351 352 352 for (ii=0 ; ii<TRIGGER_TIME_SLICES; ii++ ) { 353 SlicesZero[ii] = FALSE;353 SlicesZero[ii] = kFALSE; 354 354 } 355 355 … … 539 539 { 540 540 for ( Int_t k=0; k<TRIGGER_CELLS; k++ ) { 541 TC[k][i]= FALSE;541 TC[k][i]=kFALSE; 542 542 } 543 543 i++ ; … … 547 547 fscanf ( unit, "%d ", &i ) ; 548 548 if((i-1)<pixnum) 549 TC[k][i-1]= TRUE;549 TC[k][i-1]=kTRUE; 550 550 } 551 551 } … … 560 560 561 561 for ( i =0 ; i <pixnum ; i++ ) { 562 used [i] = FALSE ;563 dknt [i] = FALSE ;562 used [i] = kFALSE ; 563 dknt [i] = kFALSE ; 564 564 565 565 nphotshow[i] = 0 ; … … 581 581 582 582 for (ii=0 ; ii<TRIGGER_TIME_SLICES; ii++ ) { 583 SlicesZero[ii] = FALSE;583 SlicesZero[ii] = kFALSE; 584 584 } 585 585 … … 744 744 745 745 for ( i =0 ; i <pixnum ; i++ ) { 746 used [i] = FALSE ;747 dknt [i] = FALSE ;746 used [i] = kFALSE ; 747 dknt [i] = kFALSE ; 748 748 749 749 nphotshow[i] = 0 ; … … 765 765 766 766 for (ii=0 ; ii<TRIGGER_TIME_SLICES; ii++ ) { 767 SlicesZero[ii] = FALSE;767 SlicesZero[ii] = kFALSE; 768 768 } 769 769 … … 802 802 803 803 for ( i =0 ; i <pixnum ; i++ ) { 804 used [i] = FALSE ;805 dknt [i] = FALSE ;804 used [i] = kFALSE ; 805 dknt [i] = kFALSE ; 806 806 807 807 nphotshow[i] = 0 ; … … 825 825 826 826 for (i=0 ; i<TRIGGER_TIME_SLICES; i++ ) { 827 SlicesZero[i] = FALSE;827 SlicesZero[i] = kFALSE; 828 828 } 829 829 … … 955 955 // 956 956 957 if ( used[iPix] == FALSE ) {958 used [iPix] = TRUE ;957 if ( used[iPix] == kFALSE ) { 958 used [iPix] = kTRUE ; 959 959 // baseline[iPix] = 0. ; 960 960 … … 1014 1014 // 1015 1015 1016 1016 1017 if ( iPix < 0 ) { 1017 1018 cout << " ERROR: in MTrigger::SetNSB() " << endl ; … … 1040 1041 // 1041 1042 1042 if ( used[iPix] == FALSE ) {1043 used [iPix] = TRUE ;1044 1043 if ( used[iPix] == kFALSE ) { 1044 used [iPix] = kTRUE ; 1045 1045 1046 for (i=0; i < TRIGGER_TIME_SLICES; i++ ) { 1046 1047 a_sig[iPix][i] = 0. ; … … 1098 1099 startslice=GenElec->Integer(TRIGGER_TIME_SLICES*1000); 1099 1100 1100 if ( used[i] == FALSE ) {1101 used [i] = TRUE ;1101 if ( used[i] == kFALSE ) { 1102 used [i] = kTRUE ; 1102 1103 1103 1104 memcpy( (Float_t*)a_sig[i], … … 1270 1271 for(i=0;i<pixnum;i++){ 1271 1272 ii=(Int_t)i/8; 1272 if (dknt[i]== TRUE){1273 if (dknt[i]==kTRUE){ 1273 1274 map[ii]=map[ii]+(Int_t)pow(2,i-ii*8); 1274 1275 } … … 1300 1301 1301 1302 for ( i=0 ; i < pixnum ; i++ ) { 1302 if ( used[i] == TRUE ) {1303 if ( used[i] == kTRUE ) { 1303 1304 baseline[i] = 0. ; 1304 1305 … … 1325 1326 1326 1327 for ( i=0 ; i < pixnum; i++ ) { 1327 if ( used [i] == TRUE ) {1328 if ( used [i] == kTRUE ) { 1328 1329 1329 1330 for ( ii=1 ; ii<TRIGGER_TIME_SLICES; ii++ ) { … … 1332 1333 // form low to big signals 1333 1334 // 1335 1334 1336 if ( a_sig[i][ii-1] < chan_thres[i] && 1335 1337 a_sig[i][ii] >= chan_thres[i] ) { 1336 1338 { 1337 if ( dknt[i] == FALSE ) {1338 dknt [i] = TRUE ;1339 if ( dknt[i] == kFALSE ) { 1340 dknt [i] = kTRUE ; 1339 1341 iM++ ; 1340 1342 } … … 1391 1393 Int_t ic = 0 ; 1392 1394 for ( Int_t i=0 ; i < pixnum; i++ ) { 1393 if ( used [i] == TRUE ) {1395 if ( used [i] == kTRUE ) { 1394 1396 1395 1397 sprintf (dumm, "A_%d", i ) ; … … 1414 1416 1415 1417 dhist = new TH1F(dumm, name, TRIGGER_TIME_SLICES, 0., TOTAL_TRIGGER_TIME); 1416 if ( dknt[i] == TRUE ) {1418 if ( dknt[i] == kTRUE ) { 1417 1419 // 1418 1420 // fill the histogram of digital signal … … 1472 1474 // 1473 1475 // 1474 if ( dknt[iP] == TRUE ) { 1476 1477 if ( dknt[iP] == kTRUE ) { 1475 1478 iMul++ ; 1476 1479 } … … 1488 1491 // 1489 1492 // 1490 if ( dknt[iP] == TRUE ) {1493 if ( dknt[iP] == kTRUE ) { 1491 1494 // 1492 1495 // sum it up … … 1509 1512 iReturn++ ; 1510 1513 nZero++; 1511 SlicesZero[iS] = TRUE ;1514 SlicesZero[iS] = kTRUE ; 1512 1515 1513 1516 } 1514 else SlicesZero[iS] = FALSE;1517 else SlicesZero[iS] = kFALSE; 1515 1518 } 1516 1519 return ( iReturn ) ; … … 1588 1591 Neighb[iPix] = kFALSE ; 1589 1592 // Select pixels which are used and it the current cell 1590 if ( used [iPix] == TRUE && TC[iCell][iPix]==TRUE) {1593 if ( used [iPix] == kTRUE && TC[iCell][iPix]==kTRUE) { 1591 1594 // 1592 1595 // now check the diskriminated signal
Note:
See TracChangeset
for help on using the changeset viewer.