Changeset 19668


Ignore:
Timestamp:
09/23/19 18:25:25 (5 years ago)
Author:
tbretz
Message:
Adapted to the cahnges in MSimGeomCam
File:
1 edited

Legend:

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

    r17734 r19668  
    228228    // We add an additional sample at the end to support a possible shift
    229229    // of the start time of the first event by 0 to 1 sample.
    230     const Int_t   ns = fRunHeader->GetNumSamplesHiGain()+1;
     230    const Float_t  win  = (fHeader->GetNumSamplesHiGain()+1)/freq;
    231231
    232232    // Length (ns), Pulse position (Units ns)
    233233    const Float_t pp = fPulsePos->GetVal();
    234     const Float_t pw = fPulse->GetWidth();
     234    const Float_t pw = fPulse->GetWidth()/freq;
    235235
    236236    const Float_t first = cnt>0 ? fEvt->GetFirst()->GetTime() : 0;
    237     const Float_t last  = cnt>0 ? fEvt->GetLast()->GetTime()  : ns*freq;
    238 
    239     fStat->SetTime(first-pp-pw, last-pp+pw + ns*freq);
     237    const Float_t last  = cnt>0 ? fEvt->GetLast()->GetTime()  : win;
     238
     239    fStat->SetTime(first-pp-pw, last-pp + win);
     240    fStat->SetLength(last-first);
    240241    fStat->SetMaxIndex(fGeom->GetNumPixels()-1);
    241242    fStat->SetReadyToSave();
    242243
    243244    // FIXME: Jitter! (Own class?)
    244     fTrigger->SetVal((pp+pw)*freq);
     245    fTrigger->SetVal(pp+pw);
    245246    fTrigger->SetReadyToSave();
    246247
Note: See TracChangeset for help on using the changeset viewer.