Changeset 5248 for trunk/MagicSoft/Simulation/Detector/include-MTrigger
- Timestamp:
- 10/12/04 14:43:18 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector/include-MTrigger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx
r5104 r5248 206 206 x0 = 3*sigma ; 207 207 208 for (i=0; i< RESPONSE_SLICES ; i++ ) {209 210 x = i * (1./((Float_t) SLICES_PER_NSEC))211 + (1./( 2 * (Float_t) SLICES_PER_NSEC )) ;208 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 209 210 x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 211 + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC )) ; 212 212 213 sing_resp[i] = 213 sing_resp[i] = (Float_t) 214 214 ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 215 215 … … 224 224 Int_t imax = 0 ; 225 225 Float_t max = 0. ; 226 for (i=0; i< RESPONSE_SLICES ; i++ ) {226 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 227 227 if ( sing_resp[i] > max ) { 228 228 imax = i ; … … 231 231 } 232 232 233 peak_time = ( (Float_t) imax ) / ( (Float_t) SLICES_PER_NSEC ) ;233 peak_time = ( (Float_t) imax ) / ( (Float_t) TRIG_SLICES_PER_NSEC ) ; 234 234 235 235 … … 357 357 358 358 for ( i = 0 ; i < 5 ; i++) { 359 SlicesFirst[i] = -50;360 SlicesSecond[i] = -50;359 SlicesFirst[i] = 0; 360 SlicesSecond[i] = 0; 361 361 PixelsFirst[i] = -1; 362 362 PixelsSecond[i] = -1; … … 454 454 x0 = 3*sigma ; 455 455 456 for (i=0; i< RESPONSE_SLICES ; i++ ) {457 458 x = i * (1./((Float_t) SLICES_PER_NSEC))459 + (1./( 2 * (Float_t) SLICES_PER_NSEC )) ;456 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 457 458 x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 459 + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC )) ; 460 460 461 sing_resp[i] = 461 sing_resp[i] = (Float_t) 462 462 ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 463 463 … … 472 472 Int_t imax = 0 ; 473 473 Float_t max = 0. ; 474 for (i=0; i< RESPONSE_SLICES ; i++ ) {474 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 475 475 if ( sing_resp[i] > max ) { 476 476 imax = i ; … … 479 479 } 480 480 481 peak_time = ( (Float_t) imax ) / ( (Float_t) SLICES_PER_NSEC ) ;481 peak_time = ( (Float_t) imax ) / ( (Float_t) TRIG_SLICES_PER_NSEC ) ; 482 482 483 483 // … … 588 588 589 589 for ( i = 0 ; i < 5 ; i++) { 590 SlicesFirst[i] = -50 ;591 SlicesSecond[i] = -50 ;590 SlicesFirst[i] = 0 ; 591 SlicesSecond[i] = 0 ; 592 592 PixelsFirst[i] = -1; 593 593 PixelsSecond[i] = -1; … … 683 683 x0 = 3*sigma ; 684 684 685 for (i=0; i< RESPONSE_SLICES ; i++ ) {686 687 x = i * (1./((Float_t) SLICES_PER_NSEC))688 + (1./( 2 * (Float_t) SLICES_PER_NSEC )) ;685 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 686 687 x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 688 + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC )) ; 689 689 690 sing_resp[i] = 690 sing_resp[i] = (Float_t) 691 691 ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 692 692 … … 701 701 Int_t imax = 0 ; 702 702 Float_t max = 0. ; 703 for (i=0; i< RESPONSE_SLICES ; i++ ) {703 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 704 704 if ( sing_resp[i] > max ) { 705 705 imax = i ; … … 708 708 } 709 709 710 peak_time = ( (Float_t) imax ) / ( (Float_t) SLICES_PER_NSEC ) ;710 peak_time = ( (Float_t) imax ) / ( (Float_t) TRIG_SLICES_PER_NSEC ) ; 711 711 712 712 // … … 772 772 773 773 for ( i = 0 ; i < 5 ; i++) { 774 SlicesFirst[i] = -50 ;775 SlicesSecond[i] = -50 ;774 SlicesFirst[i] = 0 ; 775 SlicesSecond[i] = 0 ; 776 776 PixelsFirst[i] = -1; 777 777 PixelsSecond[i] = -1; … … 843 843 844 844 for ( i = 0 ; i < 5 ; i++) { 845 SlicesFirst[i] = -50 ;845 SlicesFirst[i] = 0 ; 846 846 PixelsFirst[i] = -1; 847 847 } … … 872 872 // 873 873 // Fills the information of one single Phe electron that 874 // comes from the shower874 // comes from the NSB 875 875 // 876 876 … … 892 892 // 893 893 // Fills the information of one single Phe electron that 894 // comes from the shower 895 // 894 // comes from a star 896 895 897 896 // … … 969 968 // 970 969 971 Int_t ichan = (Int_t) ( time * ((Float_t) SLICES_PER_NSEC) ) ;970 Int_t ichan = (Int_t) ( time * ((Float_t) TRIG_SLICES_PER_NSEC) ) ; 972 971 973 972 // … … 975 974 // 976 975 977 for ( i = 0 ; i<RESPONSE_SLICES ; i++ ) {976 for ( i = 0 ; i<RESPONSE_SLICES_TRIG; i++ ) { 978 977 979 978 if ( (ichan+i) >= 0 && … … 1132 1131 x0 = 3*sigma ; 1133 1132 1134 for (i=0; i< RESPONSE_SLICES ; i++ ) {1135 1136 x = i * (1./((Float_t) SLICES_PER_NSEC))1137 + (1./( 2 * (Float_t) SLICES_PER_NSEC )) ;1133 for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 1134 1135 x = i * (1./((Float_t)TRIG_SLICES_PER_NSEC)) 1136 + (1./( 2 * (Float_t)TRIG_SLICES_PER_NSEC )) ; 1138 1137 1139 sing_resp[i] = 1138 sing_resp[i] = (Float_t) 1140 1139 ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ; 1141 1140 … … 1244 1243 // puts the standard response function into the array resp 1245 1244 1246 for ( Int_t i=0; i< RESPONSE_SLICES ; i++ ) {1245 for ( Int_t i=0; i< RESPONSE_SLICES_TRIG; i++ ) { 1247 1246 1248 1247 resp[i] = sing_resp[i] ; … … 1288 1287 1289 1288 1290 Int_t jmax = (Int_t) (gate_leng * SLICES_PER_NSEC ) ;1289 Int_t jmax = (Int_t) (gate_leng * TRIG_SLICES_PER_NSEC ) ; 1291 1290 1292 1291 // … … 1572 1571 if (SlicesZero[iSli]){ 1573 1572 // 1574 // Loop over trigger cells. It is topology anal isy,1575 // therefore it is ke ephere after multiplicity and1573 // Loop over trigger cells. It is topology analysis, 1574 // therefore it is kept here after multiplicity and 1576 1575 // threshold checks. 1577 1576 // … … 1645 1644 SlicesFirst[nFirst++] = iSli ; // We save time when it triggers 1646 1645 iReturn++ ; 1647 iSli+=( 50*SLICES_PER_NSEC); // We skip the following 50 ns (dead time)1646 iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC); // We skip the following 50 ns (dead time) 1648 1647 iCell=TRIGGER_CELLS; // We skip the remaining trigger cells 1649 1648 break ; … … 1675 1674 SlicesFirst[nFirst++] = iSli ; // We save when it triggers 1676 1675 iReturn++ ; 1677 iSli+=( 50*SLICES_PER_NSEC); // We skip the following 50 ns (dead time)1676 iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC); // We skip the following 50 ns (dead time) 1678 1677 iCell=TRIGGER_CELLS; // We skip the remaining trigger cells 1679 1678 break ; … … 1768 1767 SlicesFirst[nFirst++] = iSli ; // We save time when it triggers 1769 1768 iReturn++ ; 1770 iSli+=( 50*SLICES_PER_NSEC); // We skip the following 50 ns (dead time)1769 iSli+=(LEVEL1_DEAD_TIME*TRIG_SLICES_PER_NSEC); // We skip the following 50 ns (dead time) 1771 1770 iCell=TRIGGER_CELLS; // We skip the remaining trigger cells 1772 1771 break ; … … 1863 1862 // It gives the time for the il trigger at first level 1864 1863 1865 return((Float_t) ((Float_t) SlicesFirst[il]/((Float_t) SLICES_PER_NSEC)));1864 return((Float_t) ((Float_t) SlicesFirst[il]/((Float_t) TRIG_SLICES_PER_NSEC))); 1866 1865 } 1867 1866 … … 1885 1884 1886 1885 // Translation from ns to slices 1887 iNumSli=(int) (overlaping_time* SLICES_PER_NSEC);1886 iNumSli=(int) (overlaping_time*TRIG_SLICES_PER_NSEC); 1888 1887 if (iNumSli<1) iNumSli=1; 1889 1888 … … 1901 1900 1902 1901 } 1903 1904 1905 -
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx
r5099 r5248 109 109 // first the data for the response function 110 110 // 111 Float_t fwhm_resp ; // fwhm of the phe_response function 112 Float_t ampl_resp ; // amplitude of the phe_response function (in mV) 113 Float_t sing_resp[ RESPONSE_SLICES ] ; // the shape of the phe_response function 114 Float_t peak_time ; // the time from the start of the response function to the maximum peak 111 Float_t fwhm_resp ; // fwhm of the phe_response function 112 Float_t ampl_resp ; // amplitude of the phe_response function (in mV) 113 Float_t sing_resp[RESPONSE_SLICES_TRIG] ; // the shape of the phe_response function 114 Float_t peak_time ; // the time from the start of the response 115 // function to the maximum peak 115 116 116 117 TH1F *histPmt ;
Note:
See TracChangeset
for help on using the changeset viewer.