{ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; // Number of events to process Int_t nEvents = 10; // Base File name TString base="demo"; // Input file (MC events) TString inFile = base+".mc.root"; //Parameter file TString parFile = base+".param.root"; // Output file TString outFile = base+".reco.root"; // Number of events to process Int_t nEvents = 10; // ---- Load libraries ------------------------------------------------- gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libMCStack"); gSystem->Load("libField"); gSystem->Load("libGen"); gSystem->Load("libPassive"); gSystem->Load("libTrkBase"); gSystem->Load("libGeane"); gSystem->Load("libtrackrep"); gSystem->Load("libgenfit"); gSystem->Load("libtpc"); gSystem->Load("librecotasks"); // ------------------------------------------------------------------------ // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Reco run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(inFile); fRun->SetOutputFile(outFile); // ----- Prepare GEANE -------------------------------------------- // this will load Geant3 and execute setup macros to initialize geometry: CbmGeane *Geane = new CbmGeane(inFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parInput1 = new CbmParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); // ------------------------------------------------------------------------ // ----- Reco Sequence -------------------------------------------- DemoPatternRecoTask* DemoPR = new DemoPatternRecoTask(); DemoPR->AddHitBranch(2,"PndTpcPoint"); //DemoPR->AddHitBranch(3,"MvdWaferMCPoint"); DemoPR->SetPersistence(); fRun->AddTask(DemoPR); DemoKalmanTask* DemoKalman = new DemoKalmanTask(); DemoKalman->AddHitBranch(2,"PndTpcPoint"); //DemoKalman->AddHitBranch(3,"MvdWaferMCPoint"); DemoKalman->SetPersistence(); fRun->AddTask(DemoKalman); //TrackVisTask* trkVis = new TrackVisTask(); // trkVis->SetTrackBranchName("TrackPreFit"); //fRun->AddTask(trkVis); // ----- Intialise and run -------------------------------------------- fRun->Init(); rtdb->print(); Geane->SetField(fRun->GetField()); fRun->Run(0,nEvents); //DemoKalman->WriteHistograms("demohistos.root"); // ------------------------------------------------------------------------ // ----- 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; // ------------------------------------------------------------------------ }