Changeset 1200 for trunk/MagicSoft/Simulation/Detector
- Timestamp:
- 01/18/02 18:00:54 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx
r1066 r1200 328 328 } 329 329 330 void MFadc::ElecNoise() { 331 // 332 // 333 // 334 335 for ( Int_t i = 0 ; i < CAMERA_PIXELS; i++) { 336 if ( used [i] == TRUE ) { 337 for ( Int_t is=0 ; is< (Int_t)SLICES_MFADC ; is++ ) { 338 339 sig[i][is] += GenElec->Gaus(0., 2.) ; 340 341 } 342 } 343 } 330 void MFadc::ElecNoise(Float_t value) { 331 // ============================================================ 332 // 333 // adds the noise due to optronic and electronic 334 // to the signal 335 // 336 337 for ( Int_t i = 0 ; i < CAMERA_PIXELS; i++) { 338 // 339 // but at the beginning we must check if this pixel is 340 // hitted the first time 341 // 342 if ( used[i] == FALSE ) { 343 used [i] = TRUE ; 344 345 for (Int_t ii=0; ii < (Int_t)SLICES_MFADC; ii++ ) { 346 sig[i][ii] = 0. ; 347 } 348 } 349 // 350 // Then the noise is introduced for each time slice 351 // 352 for ( Int_t is=0 ; is< (Int_t)SLICES_MFADC ; is++ ) { 353 354 sig[i][is] += GenElec->Gaus(0., value) ; 355 356 } 357 358 } 344 359 } 345 360 … … 463 478 for ( Int_t is=iFirstSlice ; is < (iFirstSlice+FADC_SLICES) ; is++ ) { 464 479 if (is< (Int_t)SLICES_MFADC && sig[ip][is]>0.0) 465 output[ip][i++]=(UChar_t) sig[ip][is];480 output[ip][i++]=(UChar_t) (sig[ip][is]+0.5); 466 481 else 467 482 output[ip][i++]= 0;
Note:
See TracChangeset
for help on using the changeset viewer.