void run_reco() { gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); gSystem->Load("libPndTorinoDetector.so"); FairLogger *logger = FairLogger::GetLogger(); logger->SetLogFileName("MyLog.log"); // logger->SetLogToScreen(kTRUE); logger->SetLogToFile(kTRUE); logger->SetLogVerbosityLevel("HIGH"); // logger->SetLogFileLevel("DEBUG4"); logger->SetLogScreenLevel("DEBUG"); // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // just forget about it, for the moment // Input file (MC events) TString inFile = "data/testrun.root"; TString inFileDigi = "data/testhits.root"; // Parameter file TString parFile = "data/testparams.root"; // Output file TString outFile = "data/testreco.root"; // ----- Timer -------------------------------------------------------- TStopwatch timer; // ----- Reconstruction run ------------------------------------------- FairRunAna *fRun= new FairRunAna(); fRun->SetInputFile(inFile); fRun->AddFriend(inFileDigi); fRun->SetOutputFile(outFile); // ----- Prepare GEANE -------------------------------------------- // this will load Geant3 and execute setup macros to initialize geometry: FairGeane *Geane = new FairGeane(); fRun->AddTask(Geane); FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); // ----- TorinoDetector hit producers --------------------------------- PndTorinoDetectorTrackFinderIdeal *tPR = new PndTorinoDetectorTrackFinderIdeal(); fRun->AddTask(tPR); PndTorinoDetectorMCTrackAssociator* trackMC = new PndTorinoDetectorMCTrackAssociator(); trackMC->SetTrackInBranchName("PndTorinoDetectorTrack"); trackMC->SetTrackOutBranchName("PndTorinoDetectorTrackID"); fRun->AddTask(trackMC); PndTorinoDetectorKalmanTask *tKAL = new PndTorinoDetectorKalmanTask(); fRun->AddTask(tKAL); PndTorinoDetectorMCTrackAssociator* trackMC1 = new PndTorinoDetectorMCTrackAssociator(); trackMC1->SetTrackInBranchName("PndTorinoDetectorKalmanTrack"); trackMC1->SetTrackOutBranchName("PndTorinoDetectorKalmanTrackID"); fRun->AddTask(trackMC1); fRun->Init(); timer.Start(); fRun->Run(); // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished successfully." << 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; // ------------------------------------------------------------------------ cout << " Test passed" << endl; cout << " All ok " << endl; exit(0); }