Changeset 18108


Ignore:
Timestamp:
02/11/15 16:21:08 (10 years ago)
Author:
Jens Buss
Message:
added feature GapdTimeJitter to give individual photons/gapds an offset with a gaussian sampling
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MarsGapdTimeJitter/msimcamera/MSimCamera.cc

    r18038 r18108  
    187187    }
    188188
     189    // Get GapdTimeJitter from parameter list
     190    fGapdTimeJitter = (MParameterD*)pList->FindObject("GapdTimeJitter");
     191    if (!fGapdTimeJitter)
     192    {
     193        *fLog << err << "GapdTimeJitter [MParameterD] not found... aborting." << endl;
     194        return kFALSE;
     195    }
     196
    189197    // Create it here to make sure that MGeomApply will set the correct size
    190198    fElectronicNoise = (MPedestalCam*)pList->FindCreateObj("MPedestalCam", "ElectronicNoise");
     
    422430    //--------------------------------------------------------------------------
    423431
     432    // Get the ResidualTimeSpread Parameter
     433    const Double_t gapdTimeJitter = fGapdTimeJitter->GetVal();
    424434   
    425435    // Simulate pulses
     
    441451        // add random time offset to the arrivaltimes
    442452        t = t + timeoffset[idx];
     453
     454        // Jens Buss on GapdTimeJitter
     455        // add also a time offset to arrival times of single photons
     456        Double_t timeJitter = gRandom->Gaus(0.0, gapdTimeJitter);
     457        t = t + timeJitter;
    443458
    444459        // FIXME: Time jitter?
Note: See TracChangeset for help on using the changeset viewer.