{ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; Int_t nEvents = 10; // ---- Load libraries ------------------------------------------------- // gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); gROOT->Macro("$VMCWORKDIR/macro/mvd/Libs.C"); // ------------------------------------------------------------------------ // Output file TString parFile = "../data/MvdTrackingParams.root"; PndMvdFileNameCreator namecreator("../data/MvdTracking.root"); TString MCFile = namecreator.GetSimFileName(false).c_str(); TString DigiFile = namecreator.GetDigiFileName(false).c_str(); TString RecoFile = namecreator.GetRecoFileName(false).c_str(); TString TrackFile = namecreator.GetTrackFindingFileName(false).c_str(); TString outFile = namecreator.GetKalmanFileName(false).c_str(); outFile.ReplaceAll("kalman","microcand"); std::cout << "DigiFile: " << DigiFile.Data()<< std::endl; std::cout << "RecoFile: " << RecoFile.Data()<< std::endl; std::cout << "TrackFinderFile: " << TrackFile.Data()<< std::endl; std::cout << "KalmanFile: " << outFile.Data() << std::endl; // --- Now choose concrete engines for the different tasks ------------- // ------------------------------------------------------------------------ // In general, the following parts need not be touched // ======================================================================== // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(MCFile); // fRun->AddFriend(DigiFile); fRun->AddFriend(RecoFile); fRun->AddFriend(TrackFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // THIS IS STRONGLY NEEDED //CbmGeane *Geane = new CbmGeane(MCFile); PndEmcMapper *emcMap = PndEmcMapper::Instance(2,MCFile); // ----- Parameter database -------------------------------------------- CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parInput1 = new CbmParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); fRun->LoadGeometry(); PndMicroWriter *mwriter = new PndMicroWriter(); fRun->AddTask(mwriter); PndMvdAnalysis *mvdana = new PndMvdAnalysis(); fRun->AddTask(mvdana); // ----- Intialise and run -------------------------------------------- fRun->Init(); //Geane->SetField(fRun->GetField()); 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; // ------------------------------------------------------------------------ }