Changeset 17643 for trunk


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.
Location:
trunk/Mars/msimcamera
Files:
4 edited

Legend:

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

    r17202 r17643  
    7070#include "MAvalanchePhotoDiode.h"
    7171
     72#include "MParameters.h"
     73
    7274ClassImp(MSimAPD);
    7375
     
    126128        return kFALSE;
    127129    }
     130
     131    fCrosstalkCoeffParam = (MParameterD*)pList->FindCreateObj("MParameterD","CrosstalkCoeffParam");
     132    if (!fCrosstalkCoeffParam)
     133    {
     134        *fLog << err << "CrosstalkCoeffParam [MParameterD] not found... aborting." << endl;
     135        return kFALSE;
     136    }
     137    fCrosstalkCoeffParam->SetVal(fCrosstalkCoeff);
    128138
    129139    fRates = (MPedestalCam*)pList->FindObject("AccidentalPhotonRates", "MPedestalCam");
  • trunk/Mars/msimcamera/MSimAPD.h

    r17067 r17643  
    1515class MPhotonStatistics;
    1616class MPedestalCam;
     17class MParameterD;
    1718
    1819class MSimAPD : public MTask
     
    2324    MPhotonStatistics *fStat;    //! Storing event statistics (needed for the start-time)
    2425    MPedestalCam      *fRates;   //! Accidental Photon Rates for all pixels
     26
     27    MParameterD       *fCrosstalkCoeffParam;
    2528
    2629    TObjArray fAPDs;             //! Array keeping the necessary number of APDs
  • 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
  • trunk/Mars/msimcamera/MSimCamera.h

    r17148 r17643  
    1515
    1616class MSpline3;
     17class MParameterD;
    1718
    1819class MSimCamera : public MTask
     
    2829    MAnalogChannels   *fCamera;          //! Output of the analog signals
    2930    MMcEvt            *fMcEvt;           //! For information stored in MMcEvt
     31
     32    MParameterD       *fCrosstalkCoeffParam;
    3033
    3134    const MSpline3    *fSpline;          // Pulse Shape   
Note: See TracChangeset for help on using the changeset viewer.