void run_kalman_stt( Int_t nEvents = 10 ){ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // ---- Load libraries ------------------------------------------------- gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); gSystem->Load("libGem"); // ------------------------------------------------------------------------ // Output file TString parFile = "params_sttcombi.root"; TString inSimuFile = "points_sttcombi.root"; TString inDigiFile = "digi_sttcombi.root"; TString inRecoFile = "reco_sttcombi.root"; TString outFile = "fit_sttcombi.root"; // --- Now choose concrete engines for the different tasks ------------- // ------------------------------------------------------------------------ // In general, the following parts need not be touched // ======================================================================== // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- FairRunAna *fRun= new FairRunAna(); fRun->SetInputFile(inSimuFile); fRun->AddFriend(inDigiFile); fRun->AddFriend(inRecoFile); fRun->SetOutputFile(outFile.Data()); // ------------------------------------------------------------------------ // THIS IS STRONGLY NEEDED FairGeane *Geane = new FairGeane(); //PndEmcMapper *emcMap = PndEmcMapper::Instance(2,inSimuFile); fRun->AddTask(Geane); // ----- Parameter database -------------------------------------------- FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); // ------------------------------------------------------------------------ PndLheKalmanTask* lheKalman = new PndLheKalmanTask(); lheKalman->SetVerbose(iVerbose); lheKalman->SetGeane(kTRUE); //lheKalman->SetSmooth(kFALSE); lheKalman->SetNumIterations(3); fRun->AddTask(lheKalman); // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(0,nEvents); // ------------------------------------------------------------------------ rtdb->print(); // ----- 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; // ------------------------------------------------------------------------ }