{ // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 3; Int_t nEvents = 10; // ---- 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/MvdTrackingParams.root"; PndMvdFileNameCreator namecreator("../data/MvdTracking.root"); // namecreator.SetVerbose(1); std::string simFile = namecreator.GetSimFileName(); std::string recoFile = namecreator.GetRecoFileName(); std::string outFile = namecreator.GetTrackFindingFileName(); TString allDigiFile = gSystem->Getenv("VMCWORKDIR"); allDigiFile += "/macro/params/all.par"; // ----- Reconstruction run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(simFile.c_str()); fRun->AddFriend(recoFile.c_str()); fRun->SetOutputFile(outFile.c_str()); fRun->LoadGeometry(); CbmGeane *Geane = new CbmGeane(simFile.c_str()); PndEmcMapper::Instance(2,simFile); // ----- Parameter database -------------------------------------------- CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parInput1 = new CbmParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); CbmParAsciiFileIo* parInput2 = new CbmParAsciiFileIo(); parInput2->open(allDigiFile.Data(),"in"); rtdb->setSecondInput(parInput2); // ----- LHETRACK --------------------------------- PndTpcLheHitsMaker* trackMS = new PndTpcLheHitsMaker("Tracking routine"); trackMS->SetTpcMode(2); // 0 OFF, 1 TpcPoint, 2 TpcCluster // TpcPoint smearing [cm], if negative no smearing trackMS->SetMvdMode(2); // 0 OFF, 1 MVDPoint, 2 MVDHit // MVDPoint smearing [cm], if negative no smearing fRun->AddTask(trackMS); PndTpcLheTrackFinder* trackFinder = new PndTpcLheTrackFinder(); fRun->AddTask(trackFinder); PndTpcLheTrackFitter* trackFitter = new PndTpcLheTrackFitter("fitting"); fRun->AddTask(trackFitter); PndLhePidMaker* pidMaker = new PndLhePidMaker("pid"); pidMaker->SetGeanePro(kTRUE); // Switch ON Geane propagation pidMaker->SetDebugMode(kTRUE); // Debug ntuples fRun->AddTask(pidMaker); // ----- Intialise and run -------------------------------------------- fRun->Init(); Geane->SetField(fRun->GetField()); fRun->Run(0,nEvents); // mvdKalman->WriteHistograms("MvdKalmanHistos.root"); // TFile histos("MvdKalmanHistos.root","READ"); 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; }