Ignore:
Timestamp:
02/22/01 20:02:50 (24 years ago)
Author:
magicsol
Message:
Some changes has been done to adapt the member function to the new description
of this clas that is done in MMcTrig.hxx version 1.5
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx

    r609 r617  
    2121  //  set all values to zero
    2222
    23   Int_t i;
     23  Int_t i,j;
    2424
    25   nFirstLevel  = 0 ;
     25  fNumFirstLevel  = 0 ;
    2626
    2727  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
    28     timeFirst[i]    = -99.9;
    29     pixelFirst[i]   = -9;
     28    fTimeFirst[i]    = -99.9;
     29    for(j=0;j<TRIGGER_PIXELS/8+1;j++){
     30      fPixelsFirst[j][i]   = 0;
     31    }
    3032  }
    3133
    32   nSecondLevel = 0 ;
     34  fNumSecondLevel = 0 ;
    3335  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
    34     FirstToSecond[i]=0;
     36    fFirstToSecond[i]=0;
    3537  }
    3638}
     
    4648  // 
    4749  //  reset all values to zero
    48   Int_t i;
     50  Int_t i,j;
    4951
    50   nFirstLevel  = 0 ;
     52  fNumFirstLevel  = 0 ;
    5153  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
    52     timeFirst[i]    = -99.9;
    53     pixelFirst[i]   = -9;
     54    fTimeFirst[i]    = -99.9;
     55    for(j=0;j<TRIGGER_PIXELS/8+1;j++){
     56      fPixelsFirst[j][i]   = 0;
     57    }
    5458  }
    5559
    56   nSecondLevel = 0 ;
     60  fNumSecondLevel = 0 ;
    5761  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
    58     FirstToSecond[i]=0;
     62    fFirstToSecond[i]=0;
    5963  }
    6064
     
    6670  //  print out the data member on screen
    6771  //
    68   Int_t i;
     72  Int_t i,j;
    6973
    7074  cout <<endl << "Monte Carlo Trigger output:" <<endl;
    71   cout << " First  Level Trigger in this Event: "<<nFirstLevel<<endl;
    72   cout << " Times of first  Level Trigger in this Event: ";
    73   for (i=0;i<nFirstLevel;i++){
    74     cout<< timeFirst[i]<<"-";
     75  cout << " First  Level Trigger in this Event : "<<fNumFirstLevel<<endl;
     76  cout << " Times of first  Level Trigger in this Event : ";
     77  for (i=0;i<fNumFirstLevel;i++){
     78    cout<< fTimeFirst[i]<<"-";
    7579  }
    7680  cout<<endl;
    77   cout << " Pixels of first  Level Trigger in this Event: ";
    78   for (i=0;i<nFirstLevel;i++){
    79     cout<<pixelFirst[i]<<"-";
     81  cout << " Pixels of first  Level Trigger in this Event : ";
     82  for (i=0;i<fNumFirstLevel;i++){
     83    for(j=0;j<TRIGGER_PIXELS/8+1;j++){
     84      cout<<fPixelsFirst[j][i]<<"-";
     85    }
    8086  }
    8187  cout<<endl;
    82   cout << " Second Level Trigger in this Event: " << nSecondLevel << endl ;
     88  cout << " Second Level Trigger in this Event : " << fNumSecondLevel << endl;
    8389  cout << endl ;
    8490}
     91
     92Byte_t MMcTrig::IsPixelFired(Int_t npix, Int_t nfirstlevel){
     93  //======================================================================
     94  //
     95  //  It returns >1 if the pixel npix was fired when the nfirstlevel
     96  //  first level trigger happened, 0 if not.
     97  //
     98
     99  Byte_t ret=0;
     100  Byte_t reminder;
     101  Int_t body;
     102
     103  body=npix/8;
     104  reminder=(Byte_t)(pow(2,npix%8));
     105
     106  ret=reminder&fPixelsFirst[body][nfirstlevel];
     107  return(ret);
     108
     109}
Note: See TracChangeset for help on using the changeset viewer.