FairRoot/PandaRoot
macro/outdated/run/dc4/run_reco_sttcombi.C
Go to the documentation of this file.
1 {
2  // ========================================================================
3  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
4  Int_t iVerbose = 0;
5 
6  // Input file
7  TString inDigiFile = "digi_sttcombi.root";
8  TString inSimFile = "points_sttcombi.root";
9 
10  // Parameter file
11  TString parFile = "params_sttcombi.root";
12 
13  // Output file
14  TString outFile = "reco_sttcombi.root";
15 
16  // Number of events to process
17  Int_t nEvents = 0;
18 
19  // ---- Load libraries -------------------------------------------------
20  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
21  rootlogon();
22  TString sysFile = gSystem->Getenv("VMCWORKDIR");
23  // ------------------------------------------------------------------------
24  // In general, the following parts need not be touched
25  // ========================================================================
26 
27  // ----- Timer --------------------------------------------------------
28  TStopwatch timer;
29  timer.Start();
30  // ------------------------------------------------------------------------
31 
32  // ----- Digitization run -------------------------------------------
33  FairRunAna *fRun= new FairRunAna();
34  fRun->SetInputFile(inDigiFile);
35  fRun->AddFriend(inSimFile);
36  fRun->SetOutputFile(outFile);
37  FairGeane *Geane = new FairGeane();
38  fRun->AddTask(Geane);
39  // ------------------------------------------------------------------------
40 
41  // ----- Parameter database --------------------------------------------
42  TString allDigiFile = sysFile+"/macro/params/all.par";
43 
44  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
45  FairParRootFileIo* parInput1 = new FairParRootFileIo();
46  parInput1->open(parFile.Data());
47 
48  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
49  parIo1->open(allDigiFile.Data(),"in");
50 
51  rtdb->setFirstInput(parInput1);
52  rtdb->setSecondInput(parIo1);
53  // ------------------------------------------------------------------------
54 
56  mvdTrackFinder->SetVerbose(iVerbose);
57  mvdTrackFinder->SetMaxDist(0.05);
58  fRun->AddTask(mvdTrackFinder);
59 
60  // PndSttTrackFinderIdeal* sttTrackFinder = new PndSttTrackFinderIdeal(iVerbose);
62  PndSttFindTracks* sttFindTracks = new PndSttFindTracks("Track Finder", "FairTask", sttTrackFinder, iVerbose);
63  sttFindTracks->AddHitCollectionName("STTHit", "STTPoint");
64  fRun->AddTask(sttFindTracks);
65 
66  PndSttMvdTracking * SttMvdTracking = new PndSttMvdTracking(0);
67  fRun->AddTask(SttMvdTracking);
68 
70  recoKalman->SetTrackInBranchName("SttMvdTrack");
71  recoKalman->SetTrackOutBranchName("SttMvdGenTrack");
72  //recoKalman->SetNumIterations(3);
73  fRun->AddTask(recoKalman);
74 
75  // ----- Intialise and run --------------------------------------------
77  fRun->Init();
78  fRun->Run(0, nEvents);
79 
80  rtdb->saveOutput();
81  rtdb->print();
82 
83  // ------------------------------------------------------------------------
84 
85  // ----- Finish -------------------------------------------------------
86 
87  timer.Stop();
88  Double_t rtime = timer.RealTime();
89  Double_t ctime = timer.CpuTime();
90  cout << endl << endl;
91  cout << "Macro finished succesfully." << endl;
92  cout << "Output file is " << outFile << endl;
93  cout << "Parameter file is " << parFile << endl;
94  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
95  cout << endl;
96  // ------------------------------------------------------------------------
97 
98 
99 }
PndSttTrackFinderReal * sttTrackFinder
void SetTrackOutBranchName(const TString &name)
FairParAsciiFileIo * parIo1
PndSttMvdTracking * SttMvdTracking
PndMvdRiemannTrackFinderTask * mvdTrackFinder
Double_t
static void Init(Int_t MapVersion)
PndRecoKalmanTask * recoKalman
void SetTrackInBranchName(const TString &name)
PndSttFindTracks * sttFindTracks
Int_t iVerbose
void AddHitCollectionName(char *hitCollectionName, char *pointCollectionName)
FairParRootFileIo * parInput1