Ignore:
Timestamp:
10/12/04 14:43:18 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Simulation/Detector/include-MTrigger
Files:
2 edited

Legend:

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

    r5104 r5248  
    206206  x0 = 3*sigma ;
    207207 
    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 ))  ;
    212212   
    213     sing_resp[i] =
     213    sing_resp[i] = (Float_t)
    214214      ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
    215215 
     
    224224  Int_t imax  = 0  ;
    225225  Float_t max = 0. ;
    226   for (i=0; i< RESPONSE_SLICES ; i++ ) { 
     226  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 
    227227    if ( sing_resp[i] > max ) {
    228228      imax = i ;
     
    231231  }
    232232 
    233   peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
     233  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
    234234 
    235235
     
    357357 
    358358  for ( i = 0 ; i < 5 ; i++) {
    359     SlicesFirst[i]  = -50 ;
    360     SlicesSecond[i] = -50 ;
     359    SlicesFirst[i]  = 0;
     360    SlicesSecond[i] = 0;
    361361    PixelsFirst[i]  = -1;
    362362    PixelsSecond[i] = -1;
     
    454454  x0 = 3*sigma ;
    455455 
    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 ))  ;
    460460   
    461     sing_resp[i] =
     461    sing_resp[i] = (Float_t)
    462462      ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
    463463 
     
    472472  Int_t imax  = 0  ;
    473473  Float_t max = 0. ;
    474   for (i=0; i< RESPONSE_SLICES ; i++ ) { 
     474  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 
    475475    if ( sing_resp[i] > max ) {
    476476      imax = i ;
     
    479479  }
    480480 
    481   peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
     481  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
    482482 
    483483  //
     
    588588 
    589589  for ( i = 0 ; i < 5 ; i++) {
    590     SlicesFirst[i]  = -50 ;
    591     SlicesSecond[i] = -50 ;
     590    SlicesFirst[i]  = 0 ;
     591    SlicesSecond[i] = 0 ;
    592592    PixelsFirst[i]  = -1;
    593593    PixelsSecond[i] = -1;
     
    683683  x0 = 3*sigma ;
    684684 
    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 ))  ;
    689689   
    690     sing_resp[i] =
     690    sing_resp[i] = (Float_t)
    691691      ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
    692692 
     
    701701  Int_t imax  = 0  ;
    702702  Float_t max = 0. ;
    703   for (i=0; i< RESPONSE_SLICES ; i++ ) { 
     703  for (i=0; i< RESPONSE_SLICES_TRIG ; i++ ) { 
    704704    if ( sing_resp[i] > max ) {
    705705      imax = i ;
     
    708708  }
    709709 
    710   peak_time = ( (Float_t) imax )  / ( (Float_t) SLICES_PER_NSEC ) ;
     710  peak_time = ( (Float_t) imax )  / ( (Float_t) TRIG_SLICES_PER_NSEC ) ;
    711711 
    712712  //
     
    772772 
    773773  for ( i = 0 ; i < 5 ; i++) {
    774     SlicesFirst[i]  = -50 ;
    775     SlicesSecond[i] = -50 ;
     774    SlicesFirst[i]  = 0 ;
     775    SlicesSecond[i] = 0 ;
    776776    PixelsFirst[i]  = -1;
    777777    PixelsSecond[i] = -1;
     
    843843 
    844844  for ( i = 0 ; i < 5 ; i++) {
    845     SlicesFirst[i]  = -50 ;
     845    SlicesFirst[i]  = 0 ;
    846846    PixelsFirst[i]  = -1;
    847847  }
     
    872872  //
    873873  //     Fills the information of one single Phe electron that
    874   //     comes from the shower
     874  //     comes from the NSB
    875875  //
    876876
     
    892892  //
    893893  //     Fills the information of one single Phe electron that
    894   //     comes from the shower
    895   //
     894  //     comes from a star
    896895
    897896  //
     
    969968    //
    970969
    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) ) ;
    972971
    973972    //
     
    975974    //
    976975
    977     for ( i = 0 ; i<RESPONSE_SLICES; i++ ) {
     976    for ( i = 0 ; i<RESPONSE_SLICES_TRIG; i++ ) {
    978977     
    979978      if ( (ichan+i) >= 0  && 
     
    11321131  x0 = 3*sigma ;
    11331132 
    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 ))  ;
    11381137   
    1139     sing_resp[i] =
     1138    sing_resp[i] = (Float_t)
    11401139      ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
    11411140 
     
    12441243  //    puts the standard response function into the array resp
    12451244
    1246   for ( Int_t i=0; i< RESPONSE_SLICES; i++ ) {
     1245  for ( Int_t i=0; i< RESPONSE_SLICES_TRIG; i++ ) {
    12471246
    12481247    resp[i] = sing_resp[i] ;
     
    12881287
    12891288
    1290   Int_t  jmax = (Int_t) (gate_leng * SLICES_PER_NSEC )  ;
     1289  Int_t  jmax = (Int_t) (gate_leng * TRIG_SLICES_PER_NSEC )  ;
    12911290
    12921291  //
     
    15721571      if (SlicesZero[iSli]){
    15731572        //
    1574         //  Loop over trigger cells. It is topology analisy,
    1575         //  therefore it is keep here after multiplicity and
     1573        //  Loop over trigger cells. It is topology analysis,
     1574        //  therefore it is kept here after multiplicity and
    15761575        //  threshold checks.
    15771576        //
     
    16451644                  SlicesFirst[nFirst++] = iSli ; // We save time when it triggers
    16461645                  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)
    16481647                  iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells
    16491648                  break ;
     
    16751674                  SlicesFirst[nFirst++] = iSli ; //  We save when it triggers
    16761675                  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)
    16781677                  iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells
    16791678                  break ;
     
    17681767                    SlicesFirst[nFirst++] = iSli ; //  We save time when it triggers
    17691768                    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)
    17711770                    iCell=TRIGGER_CELLS;         // We skip the remaining trigger cells
    17721771                    break ;
     
    18631862  //  It gives the time for the il trigger at first level
    18641863
    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)));
    18661865}
    18671866
     
    18851884
    18861885  // Translation from ns to slices
    1887   iNumSli=(int) (overlaping_time*SLICES_PER_NSEC);
     1886  iNumSli=(int) (overlaping_time*TRIG_SLICES_PER_NSEC);
    18881887  if (iNumSli<1) iNumSli=1;
    18891888
     
    19011900
    19021901}
    1903 
    1904 
    1905 
  • trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx

    r5099 r5248  
    109109  //    first the data for the response function
    110110  //
    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
    115116
    116117  TH1F     *histPmt ;
Note: See TracChangeset for help on using the changeset viewer.