Changeset 18038


Ignore:
Timestamp:
12/15/14 09:45:18 (10 years ago)
Author:
Jens Buss
Message:
Reintegrating branch for feature ResidualTimeSpread into Branch
Location:
trunk/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars

  • trunk/Mars/ceres.rc

    r18009 r18038  
    237237# MFixTimeOffset.FileName: resmc/fact/AllPhidoFiles_delays.csv
    238238
     239ResidualTimeSpread.Val: 0.0
     240
    239241# last line comment
  • trunk/Mars/mjobs/MJSimulation.cc

    r18009 r18038  
    650650    write3af.AddContainer("ElectronicNoise",  "RunHeaders", kTRUE, 1);
    651651    write3af.AddContainer("IntendedPulsePos", "RunHeaders", kTRUE, 1);
     652    write3af.AddContainer("ResidualTimeSpread", "RunHeaders", kTRUE, 1);
    652653    write3af.AddContainer("MRawEvtData",      "Events");
    653654    write3af.AddContainer("MTruePhotonsPerPixelCont", "Events");
     
    726727    );
    727728    plist.AddToList(&fix_time_offsets_between_pixels_in_ns);
     729
     730    // -------------------------------------------------------------------
     731
     732    // Jens Buss on: residual time spread
     733    MParameterD resTimeSpread("ResidualTimeSpread");
     734    resTimeSpread.SetVal(0.0);
     735    plist.AddToList(&resTimeSpread);
    728736
    729737    // -------------------------------------------------------------------
  • trunk/Mars/msimcamera/MSimCamera.cc

    r18009 r18038  
    180180    }
    181181 */
     182    fResidualTimeSpread = (MParameterD*)pList->FindObject("ResidualTimeSpread");
     183    if (!fResidualTimeSpread)
     184    {
     185        *fLog << err << "ResidualTimeSpread [MParameterD] not found... aborting." << endl;
     186        return kFALSE;
     187    }
    182188
    183189    // Create it here to make sure that MGeomApply will set the correct size
     
    305311    fCamera->SetValidRange(TMath::FloorNint(pr), TMath::CeilNint(nlen+pl));
    306312
     313    Double_t timeoffset[npix];
     314
     315
    307316    // Add electronic noise to empty channels
    308317    for (UInt_t i=0; i<npix; i++)
    309318    {
     319
     320        // Get the ResidualTimeSpread Parameter
     321        const Double_t residualTimeSpread = fResidualTimeSpread->GetVal();
     322
     323        // Jens Buss on residual time spread:
     324        // randomly draw an additional time offset to be added to the arrivaltime
     325        // from a gaussian normal distribution with a given standard deviation
     326        timeoffset[i] = gRandom->Gaus(0.0, residualTimeSpread);
    310327        const MPedestalPix &pix = (*fElectronicNoise)[i];
    311328
     
    405422    //--------------------------------------------------------------------------
    406423
     424   
    407425    // Simulate pulses
    408426    for (Int_t i=0; i<num; i++)
     
    419437        // column to hold the offsets in ns.
    420438        t = t + freq*fFixTimeOffsetsBetweenPixelsInNs->fM[idx][0];
     439
     440        // Jens Buss on residual time spread:
     441        // add random time offset to the arrivaltimes
     442        t = t + timeoffset[idx];
    421443
    422444        // FIXME: Time jitter?
  • trunk/Mars/msimcamera/MSimCamera.h

    r18009 r18038  
    3636
    3737    MParameterD       *fCrosstalkCoeffParam;
     38    MParameterD       *fResidualTimeSpread;    //! Container to store a standard deviation for a residual time spread
    3839
    3940    MMatrix *fFixTimeOffsetsBetweenPixelsInNs; //! Container to store the fix temporal offsets for each pixel in ns
Note: See TracChangeset for help on using the changeset viewer.