Ignore:
Timestamp:
04/03/14 11:54:28 (10 years ago)
Author:
ftemme
Message:
Added a MParameterD for the Crosstalkcoefficient, so that MSimCamera can access the crosstalk coefficient for the calculation of the accoupling.
File:
1 edited

Legend:

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

    r17384 r17643  
    6161#include "MAnalogChannels.h"
    6262
     63#include "MParameters.h"
     64
    6365#include "MMcEvt.hxx"            // To be replaced by a CheObs class
    6466#include "MRawRunHeader.h"
     
    7476MSimCamera::MSimCamera(const char* name, const char *title)
    7577    : fEvt(0), fStat(0), fRunHeader(0), fElectronicNoise(0), fGain(0),
    76     fCamera(0), fMcEvt(0), fSpline(0), fBaselineGain(kFALSE),
     78      fCamera(0), fMcEvt(0),fCrosstalkCoeffParam(0), fSpline(0), fBaselineGain(kFALSE),
    7779      fDefaultOffset(-1), fDefaultNoise(-1), fDefaultGain(-1), fACFudgeFactor(0),
    7880      fACTimeConstant(0)
     
    140142    {
    141143        *fLog << err << "AccidentalPhotonRates [MPedestalCam] not found... aborting." << endl;
     144        return kFALSE;
     145    }
     146
     147    fCrosstalkCoeffParam = (MParameterD*)pList->FindCreateObj("MParameterD","CrosstalkCoeffParam");
     148    if (!fCrosstalkCoeffParam)
     149    {
     150        *fLog << err << "CrosstalkCoeffParam [MParameterD] not found... aborting." << endl;
    142151        return kFALSE;
    143152    }
     
    273282        }
    274283
    275         // FIXME: I don't know how to get the variable fCrosstalkProb from
    276         // the class APD (see MAvalanchePhotoDiode.h), because there is no
    277         // getter for the APD array(fAPDs) in MSimAPD.
    278         // So I set the crossTalkProb hardcoded to the value 0.15, which is
    279         // equal to the value of the apd of type 4
    280         const Double_t crossTalkProb = 0.15;
     284        // Get the CrosstalkCoefficient Parameter
     285        const Double_t crossTalkProb = fCrosstalkCoeffParam->GetVal();
    281286
    282287        // To get the area of one Pulse, I only need to calculate the Integral
Note: See TracChangeset for help on using the changeset viewer.