Changeset 617 for trunk/MagicSoft/include-Classes
- Timestamp:
- 02/22/01 20:02:50 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx
r609 r617 21 21 // set all values to zero 22 22 23 Int_t i ;23 Int_t i,j; 24 24 25 nFirstLevel = 0 ;25 fNumFirstLevel = 0 ; 26 26 27 27 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 } 30 32 } 31 33 32 nSecondLevel = 0 ;34 fNumSecondLevel = 0 ; 33 35 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){ 34 FirstToSecond[i]=0;36 fFirstToSecond[i]=0; 35 37 } 36 38 } … … 46 48 // 47 49 // reset all values to zero 48 Int_t i ;50 Int_t i,j; 49 51 50 nFirstLevel = 0 ;52 fNumFirstLevel = 0 ; 51 53 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 } 54 58 } 55 59 56 nSecondLevel = 0 ;60 fNumSecondLevel = 0 ; 57 61 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){ 58 FirstToSecond[i]=0;62 fFirstToSecond[i]=0; 59 63 } 60 64 … … 66 70 // print out the data member on screen 67 71 // 68 Int_t i ;72 Int_t i,j; 69 73 70 74 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]<<"-"; 75 79 } 76 80 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 } 80 86 } 81 87 cout<<endl; 82 cout << " Second Level Trigger in this Event : " << nSecondLevel << endl ;88 cout << " Second Level Trigger in this Event : " << fNumSecondLevel << endl; 83 89 cout << endl ; 84 90 } 91 92 Byte_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.