Changeset 1199 for trunk


Ignore:
Timestamp:
01/18/02 17:52:01 (23 years ago)
Author:
blanch
Message:
ElecNoise routine has been change, now the noise is added to all the
pixels and therefore all are set to used.
File:
1 edited

Legend:

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

    r908 r1199  
    852852}
    853853
    854 void MTrigger::ElecNoise() {
     854void MTrigger::ElecNoise(Float_t factor) {
    855855  // ============================================================
    856856  //
     
    860860  Float_t rausch ;
    861861
    862   rausch = RESPONSE_AMPLITUDE * 0.3 ;
     862  rausch = RESPONSE_AMPLITUDE * factor ;
    863863 
    864864  for ( Int_t i=0 ; i < TRIGGER_PIXELS; i++  ) {
    865     if ( used [i] == TRUE ) {
    866        
     865      //
     866      //  but at the beginning we must check if this pixel is
     867      //  hitted the first time
     868      //
     869     
     870      if ( used[i] == FALSE ) {
     871          used [i] = TRUE ;
     872         
     873          for (Int_t ii=0; ii < TRIGGER_TIME_SLICES; ii++ ) {
     874              a_sig[i][ii] = 0. ;
     875              d_sig[i][ii] = 0. ;
     876          }
     877      }
     878      //     
     879      //  Then the noise is introduced for each time slice
     880      //
    867881      for ( Int_t ii=1 ; ii<TRIGGER_TIME_SLICES; ii++ ) {
    868 
    869         a_sig [i][ii] +=  GenElec->Gaus(0., rausch  ) ;
    870 
    871       }
    872     }
    873   }
    874 }
     882         
     883          a_sig [i][ii] +=  GenElec->Gaus(0., rausch  ) ;
     884         
     885      }
     886  }
     887}
     888
    875889void MTrigger::SetFwhm(Float_t fwhm){
    876890  //===========================================================
Note: See TracChangeset for help on using the changeset viewer.