{
  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
  Int_t iVerbose = 0;

  // Input file (MC events)
  TString inFile = "../data/testMC10k.root";
  // Number of events to process
  Int_t nEvents = 10000;
  // Parameter file
  TString parFile = "../data/testParams10k.root";
  // Output file
  TString outFile = "../data/testDigi10k.root";


  // ----  Load libraries   -------------------------------------------------
  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
  basiclibs();
  gSystem->Load("libGeoBase");
  gSystem->Load("libParBase");
  gSystem->Load("libBase");
  gSystem->Load("libMCStack");
  gSystem->Load("libField");
  gSystem->Load("libGen");
  gSystem->Load("libPassive");

  gSystem->Load("libgenfit");
  gSystem->Load("libtpc");
  gSystem->Load("libtpcreco");
  gSystem->Load("librecotasks");

  gSystem->Load("libMvd");
  gSystem->Load("libMvdReco");


  // -----   Timer   --------------------------------------------------------
  TStopwatch timer;
  timer.Start();


  // -----   Reconstruction run   -------------------------------------------
  CbmRunAna *fRun= new CbmRunAna();
  fRun->SetInputFile(inFile);
  fRun->SetOutputFile(outFile);


  // -----  Parameter database   --------------------------------------------
  CbmRuntimeDb* rtdb = fRun->GetRuntimeDb();
  CbmParRootFileIo* parInput1 = new CbmParRootFileIo();
  parInput1->open(parFile.Data());
  rtdb->setFirstInput(parInput1);
  fRun->LoadGeometry();


  // -----   Digitization   ---------------------------------------
// 	MvdDigiTask* mvddigi = new MvdDigiTask();
//   mvddigi->SetVerbose(iVerbose);
// 	fRun->AddTask(mvddigi);
  // =========================================================================
  // ======                       Hit Producers                         ======
  // =========================================================================
  
  // -----    MVD Strip hit producer   ---------------------------------------
  double  topPitch=0.004921,
          botPitch=0.0042969,
          orient=TMath::Pi()*(0.5),
          skew=TMath::Pi()*(-0.5),
          threshold=0., noise=0.;
  int topFE = 10, botFE = 4, nrFEChannels = 128;
  MvdStripHitProducer* mvdHitProd
    = new MvdStripHitProducer(topPitch, botPitch, orient, skew,
                              topFE, botFE, nrFEChannels, threshold, noise);
  mvdHitProd->SetVerbose(iVerbose);
  fRun->AddTask(mvdHitProd);

  // -----    MVD Pixel hit producer   ---------------------------------------
  Double_t  lx=0.01, ly=0.01, threshold=000, noise=00;
  MvdHybridHitProducer* mvdPixProd = new MvdHybridHitProducer(lx,ly,threshold,noise);
  mvdPixProd->SetVerbose(iVerbose);
  fRun->AddTask(mvdPixProd);
  // =====                 End of HitProducers                           =====
  // =========================================================================

     
  // -----   Intialise and run   --------------------------------------------
  fRun->Init();
  fRun->Run(0,nEvents);


  // -----   Finish   -------------------------------------------------------
  timer.Stop();
  Double_t rtime = timer.RealTime();
  Double_t ctime = timer.CpuTime();
  cout << endl << endl;
  cout << "Macro finished succesfully." << endl;
  cout << "Output file is "    << outFile << endl;
  cout << "Parameter file is " << parFile << endl;
  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
  cout << endl;

}
\