#ifndef MARS_MMcCalibrationCalc
#define MARS_MMcCalibrationCalc

#ifndef MARS_MTask
#include "MTask.h"
#endif

class MCalibrationChargeCam;
class MCalibrationQECam;
class MGeomCam;
class MHillas;
class MNewImagePar;
class MMcEvt;
class MMcFadcHeader;

class TH1F;

class MMcCalibrationCalc : public MTask
{
private:
    MCalibrationChargeCam     *fCalCam;
    MCalibrationQECam         *fQECam;    
    MGeomCam                  *fGeom;
    MHillas                   *fHillas;
    MNewImagePar              *fNew;
    MMcEvt                    *fMcEvt;
    MMcFadcHeader             *fHeaderFadc;

    Float_t fADC2Phot;
    Long_t  fEvents;

    TH1F*   fHistRatio; // Histogram for monitoring the calibration.

    Bool_t CheckRunType(MParList *pList) const;
    Int_t  PreProcess(MParList *pList);
    Bool_t ReInit(MParList *pList);
    Int_t  Process();
    Int_t  PostProcess();

public:
    MMcCalibrationCalc(const char *name=NULL, const char *title=NULL);

    TH1F*   GetHist() { return fHistRatio; }

    ClassDef(MMcCalibrationCalc, 0)   // Task which obtains, for MC files, the calibration factor from ADC counts to photons. 
};

#endif
