runMvdCombi() { // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; Int_t nEvents = 10000; // ---- Load libraries ------------------------------------------------- gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); // gROOT->Macro("$VMCWORKDIR/macro/mvd/Libs.C"); // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // Number of events to process // Parameter file TString parFile = "../../data/MvdResDpm6GeV10kPar.root"; PndMvdFileNameCreator namecreator("../../data/MvdResDpm6GeV10k.root"); std::string simFile = namecreator.GetSimFileName(); std::string outFile = namecreator.GetRecoFileName(); TString digiparFile = gSystem->Getenv("VMCWORKDIR"); digiparFile += "/macro/params/all.par"; // ----- Reconstruction run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(simFile.c_str()); fRun->SetOutputFile(outFile.c_str()); // ----- Parameter database -------------------------------------------- CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parInput1 = new CbmParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); CbmParAsciiFileIo* parInput2 = new CbmParAsciiFileIo(); parInput2->open(digiparFile.Data(),"in"); rtdb->setSecondInput(parInput2); fRun->LoadGeometry(); // MVD Digitization PndMvdDigiTask* mvdDigi = new PndMvdDigiTask(); mvdDigi->SetVerbose(iVerbose); fRun->AddTask(mvdDigi); // MVD Cluster Finder PndMvdClusterTask* mvdClusterizer = new PndMvdClusterTask(1.8, 5000, namecreator.GetSimFileName(true)); mvdClusterizer->SetVerbose(iVerbose); fRun->AddTask(mvdClusterizer); // ----- 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; }