Changeset 19698 for trunk


Ignore:
Timestamp:
09/27/19 21:56:54 (5 years ago)
Author:
tbretz
Message:
Changed the default of BaselineShift to false. This is what we use in all our simulations so far. Instead, it can now be manually enabled as a none baseline shft introduces strange values (which depend on the number of connected pixels) due to the clipping.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msimcamera/MSimTrigger.cc

    r19695 r19698  
    107107      fDigitalSignalLength(8),
    108108      fCoincidenceTime(0.5),
    109       fShiftBaseline(kTRUE),
     109      fShiftBaseline(kFALSE),
    110110      fUngainSignal(kTRUE),
    111111      fSimulateElectronics(kTRUE),
     
    355355//        return kFALSE;
    356356//    }
    357 
     357/*
    358358    if (fElectronicNoise && !fRouteAC.IsEmpty() && !fRouteAC.IsDefaultCol())
    359359    {
     
    362362        fElectronicNoise = 0;
    363363    }
    364 
     364*/
    365365    if (fGain && !fRouteAC.IsEmpty() && !fRouteAC.IsDefaultCol())
    366366    {
     
    557557                if (pixel_id<fCamera->GetNumChannels())
    558558                {
    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
    560564                    (*patches)[patch_id].AddSignal((*fCamera)[pixel_id]);
    561565                    (*patches)[patch_id].AddSignal((*fCamera)[pixel_id], fCableDelay, fCableDamping);
     
    627631    {
    628632        // 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;
    631635        // FIXME: fCableDelay not taken into account when calculating the
    632636        // valid range, therefore, fCableDelay must be smaller than the pulse width
     
    894898    }
    895899
     900    if (IsEnvDefined(env, prefix, "ShiftBaseline", print))
     901    {
     902        rc = kTRUE;
     903        fShiftBaseline = GetEnvValue(env, prefix, "ShiftBaseline", fShiftBaseline);
     904    }
     905
    896906    return rc;
    897907}
Note: See TracChangeset for help on using the changeset viewer.