// macro to fit hits with a straight line // Simone Bianco 21/03/2010 { // Load basic libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); Int_t iVerbose = 0; Int_t nEvents = 250000; // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // -------------- TString trackFile = "SimData.root"; TString trkfitFile = "fitData.root"; //Run Reconstruction // ------------ FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile(trackFile); // fRun->AddFriend(simFile); fRun->SetOutputFile(trkfitFile); // PndMvdLinFitTask* linfit = new PndMvdLinFitTask(); PndMvdScattLinFitTask* linfit = new PndMvdScattLinFitTask(); fRun->AddTask(linfit); // Initialize and run fRun->Init(); fRun->Run(0, nEvents); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; exit(); }