Ignore:
Timestamp:
02/02/09 17:41:52 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimcamera/MSimCamera.cc

    r9274 r9290  
    4242
    4343#include <TF1.h>
     44#include <TRandom.h>
    4445
    4546#include "MLog.h"
     
    172173    const Int_t num = fEvt->GetNumPhotons();
    173174
     175    // A random shift, uniformely distributed within one slice, to make sure that
     176    // the first photon is not always aligned identically with a sample edge.
     177    // FIXME: Make it switchable
     178    const Float_t rndm = gRandom->Uniform();
     179
     180    // FIXME: Shell we add a random shift of [0,1] samples per channel?
     181    //        Or maybe per channel and run?
     182
    174183    // Simulate pulses
    175184    for (Int_t i=0; i<num; i++)
     
    178187
    179188        const UInt_t   idx = ph.GetTag();
    180         const Double_t t   = (ph.GetTime()-fStat->GetTimeFirst())*freq;// - fSpline->GetXmin();
     189        const Double_t t   = (ph.GetTime()-fStat->GetTimeFirst())*freq+rndm;// - fSpline->GetXmin();
    181190
    182191        // FIXME: Time jitter?
Note: See TracChangeset for help on using the changeset viewer.