Changeset 19698
- Timestamp:
- 09/27/19 21:56:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimcamera/MSimTrigger.cc
r19695 r19698 107 107 fDigitalSignalLength(8), 108 108 fCoincidenceTime(0.5), 109 fShiftBaseline(k TRUE),109 fShiftBaseline(kFALSE), 110 110 fUngainSignal(kTRUE), 111 111 fSimulateElectronics(kTRUE), … … 355 355 // return kFALSE; 356 356 // } 357 357 /* 358 358 if (fElectronicNoise && !fRouteAC.IsEmpty() && !fRouteAC.IsDefaultCol()) 359 359 { … … 362 362 fElectronicNoise = 0; 363 363 } 364 364 */ 365 365 if (fGain && !fRouteAC.IsEmpty() && !fRouteAC.IsDefaultCol()) 366 366 { … … 557 557 if (pixel_id<fCamera->GetNumChannels()) 558 558 { 559 //(*raw_patches)[patch_id].AddSignal((*fCamera)[pixel_id]); 559 // FIXME: There must also be a correction for the AC-coupling. Fortunately it is tiny 560 // and for one channel in the order of a few ADC counts 561 if (fShiftBaseline && fElectronicNoise) 562 (*patches)[patch_id].ShiftSignal(-(1+fCableDamping)*(*fElectronicNoise)[pixel_id].GetPedestal()); 563 560 564 (*patches)[patch_id].AddSignal((*fCamera)[pixel_id]); 561 565 (*patches)[patch_id].AddSignal((*fCamera)[pixel_id], fCableDelay, fCableDamping); … … 627 631 { 628 632 // FIXME: What if the gain was also allpied to the baseline? 629 const Double_t offset = fElectronicNoise ? (*fElectronicNoise)[i].GetPedestal() : 0;630 const Double_t gain = fGain ? (*fGain)[i].GetPedestal() : 1;633 const Double_t offset = fElectronicNoise && empty ? (*fElectronicNoise)[i].GetPedestal() : 0; 634 const Double_t gain = fGain ? (*fGain)[i].GetPedestal() : 1; 631 635 // FIXME: fCableDelay not taken into account when calculating the 632 636 // valid range, therefore, fCableDelay must be smaller than the pulse width … … 894 898 } 895 899 900 if (IsEnvDefined(env, prefix, "ShiftBaseline", print)) 901 { 902 rc = kTRUE; 903 fShiftBaseline = GetEnvValue(env, prefix, "ShiftBaseline", fShiftBaseline); 904 } 905 896 906 return rc; 897 907 }
Note:
See TracChangeset
for help on using the changeset viewer.