Ignore:
Timestamp:
03/15/02 15:13:06 (23 years ago)
Author:
blanch
Message:
It has been changed to take into account the larger trigger zone.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx

    r1226 r1250  
    941941    chan_thres[i]=thres[i];
    942942  }
     943}
     944
     945
     946void MTrigger::CheckThreshold(float *thres){
     947  //=============================================================
     948  //
     949  //   Set Right Discriminator threshold, taking into account trigger pixels
     950
     951  FILE *unit;
     952
     953  float thres_aux[CAMERA_PIXELS];
     954  int id;
     955 
     956  for (int i=0;i<CAMERA_PIXELS;i++)
     957    thres_aux[i]=999999.99;
     958 
     959  if((unit =fopen("../include-MTrigger/TABLE_PIXELS_IN_CELLS", "r" )) == 0 ){
     960    cout << "ERROR: not able to read ../include-MTrigger/TABLE_PIXELS_IN_CELLS"
     961         << endl ;
     962    exit(123) ;
     963  } 
     964  else {
     965    while ( feof(unit) == 0 ) {
     966      for ( Int_t k=0; k<TRIGGER_CELLS; k++ ) {
     967        fscanf ( unit, "%d ", &id ) ;
     968        if ((id-1)<TRIGGER_PIXELS)
     969          thres_aux[id-1]=thres[id-1];
     970      }
     971    }
     972  }
     973  fclose (unit) ;
     974
     975  for (int i=0;i<CAMERA_PIXELS;i++)
     976    thres[i]=thres_aux[i];
     977 
    943978}
    944979
Note: See TracChangeset for help on using the changeset viewer.