Ignore:
Timestamp:
08/04/01 11:01:07 (23 years ago)
Author:
blanch
Message:
While setting the Fwhm, the single phe response is updated. This bug was
not a problem foir the camera program since the fwhm is given in the
constructor of the MTrigger class.
File:
1 edited

Legend:

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

    r675 r908  
    872872    }
    873873  }
     874}
     875void MTrigger::SetFwhm(Float_t fwhm){
     876  //===========================================================
     877  //
     878  //    It sets the fwhm for the single phe signal and
     879  //    updates the sing_resp for it
     880 
     881  Float_t   sigma ;
     882  Float_t   x, x0 ;
     883  Int_t i;
     884
     885  fwhm_resp = fwhm;
     886
     887  sigma = fwhm_resp / 2.35 ;
     888  x0 = 3*sigma ;
     889 
     890  for (i=0; i< RESPONSE_SLICES ; i++ ) { 
     891
     892    x = i * (1./((Float_t)SLICES_PER_NSEC))
     893      + (1./( 2 * (Float_t)SLICES_PER_NSEC ))  ;
     894   
     895    sing_resp[i] =
     896      ampl_resp * expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
     897 
     898  }
     899
     900
    874901}
    875902
Note: See TracChangeset for help on using the changeset viewer.