void reco_complete_stt() { // Macro created 20/09/2006 by S.Spataro // It loads a simulation file and digitize hits for EMC gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // just forget about it, for the moment // Number of events to process Int_t nEvents = 0; // if 0 all the vents will be processed // Parameter file TString parFile = "simparams_stt.root"; // at the moment you do not need it // Digitisation file (ascii) TString digiFile = "all.par"; // Output file TString outFile = "reco_complete_stt.root"; // ----- Timer -------------------------------------------------------- TStopwatch timer; // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- FairRunAna *fRun= new FairRunAna(); fRun->SetInputFile("sim_complete_stt.root"); fRun->AddFriend("digi_complete_stt.root"); fRun->SetOutputFile(outFile); FairGeane *Geane = new FairGeane(); fRun->AddTask(Geane); // ----- Parameter database -------------------------------------------- TString emcDigiFile = gSystem->Getenv("VMCWORKDIR"); emcDigiFile += "/macro/params/"; emcDigiFile += digiFile; FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data()); FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo(); parIo1->open(emcDigiFile.Data(),"in"); rtdb->setFirstInput(parInput1); rtdb->setSecondInput(parIo1); // ------------------------------------------------------------------------ PndMvdRiemannTrackFinderTask* mvdTrackFinder = new PndMvdRiemannTrackFinderTask(); mvdTrackFinder->SetVerbose(iVerbose); mvdTrackFinder->SetMaxDist(0.05); mvdTrackFinder->SetPersistence(kFALSE); fRun->AddTask(mvdTrackFinder); // PndSttTrackFinderIdeal* sttTrackFinder = new PndSttTrackFinderIdeal(iVerbose); PndSttTrackFinderReal* sttTrackFinder = new PndSttTrackFinderReal(0); PndSttFindTracks* sttFindTracks = new PndSttFindTracks("Track Finder", "FairTask", sttTrackFinder, iVerbose); sttFindTracks->AddHitCollectionName("STTHit", "STTPoint"); sttFindTracks->SetPersistence(kFALSE); fRun->AddTask(sttFindTracks); PndSttMvdTracking * SttMvdTracking = new PndSttMvdTracking(0, false, false); //SttMvdTracking->Cleanup(); SttMvdTracking->SetPersistence(kFALSE); fRun->AddTask(SttMvdTracking); PndSttMvdGemTracking * SttMvdGemTracking = new PndSttMvdGemTracking(0); fRun->AddTask(SttMvdGemTracking); PndRecoKalmanTask* recoKalman = new PndRecoKalmanTask(); recoKalman->SetTrackInBranchName("SttMvdGemTrack"); recoKalman->SetTrackOutBranchName("SttMvdGemGenTrack"); recoKalman->SetBusyCut(50); // CHECK to be tuned fRun->AddTask(recoKalman); PndMCTrackAssociator* trackMC2 = new PndMCTrackAssociator(); trackMC2->SetTrackInBranchName("SttMvdGemGenTrack"); trackMC2->SetTrackOutBranchName("SttMvdGemGenTrackID"); // ----- Intialise and run -------------------------------------------- PndEmcMapper::Init(1); cout << "fRun->Init()" << endl; fRun->Init(); timer.Start(); fRun->Run(0,nEvents); // ------------------------------------------------------------------------ // ----- 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); }