FairRoot/PandaRoot
llbar/run_pid_tpc_evt.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  Int_t nEvents = 0;
6  // ---- Load libraries -------------------------------------------------
7  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
8  rootlogon();
9  TString sysFile = gSystem->Getenv("VMCWORKDIR");
10  // ------------------------------------------------------------------------
11  // Output file
12  TString parFile = "evt_params_tpc.root";
13  TString inSimuFile = "evt_points_tpc.root";
14  TString inDigiFile = "evt_digi_tpc.root";
15  TString inRecoFile = "evt_reco_tpc.root";
16 
17  TString outFile = "evt_pid_tpc.root";
18 
19  // In general, the following parts need not be touched
20  // ========================================================================
21 
22  // ----- Timer --------------------------------------------------------
23  TStopwatch timer;
24  timer.Start();
25  // ------------------------------------------------------------------------
26 
27  // ----- Reconstruction run -------------------------------------------
28  FairRunAna *fRun= new FairRunAna();
29  fRun->SetInputFile(inSimuFile);
30  fRun->AddFriend(inDigiFile);
31  fRun->AddFriend(inRecoFile);
32  fRun->SetOutputFile(outFile.Data());
33  FairGeane *Geane = new FairGeane();
34  fRun->AddTask(Geane);
35  // ----- Parameter database --------------------------------------------
36  TString allDigiFile = sysFile+"/macro/params/all.par";
37 
38  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
39  FairParRootFileIo* parInput1 = new FairParRootFileIo();
40  parInput1->open(parFile.Data());
41 
42  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
43  parIo1->open(allDigiFile.Data(),"in");
44 
45  rtdb->setFirstInput(parInput1);
46  rtdb->setSecondInput(parIo1);
47  // ------------------------------------------------------------------------
48 
50  //corr->SetVerbose();
51  corr->SetBarrelTrackBranch("PndTrackPostFitComplete");
52  corr->SetInputIDBranch("TrackPostFitCompleteID");
53  //corr->SetIdealHyp(kTRUE);
54  //corr->SetMvdMode(0);
55  //corr->SetDebugMode(kTRUE);
56  fRun->AddTask(corr);
57 
59  fRun->AddTask(assMC);
60 
62  fRun->AddTask(assMvd);
63 
65  fRun->AddTask(assMdt);
66 
68  fRun->AddTask(assDrc);
69 
71  fRun->AddTask(assDisc);
72 
73  // ----- Intialise and run --------------------------------------------
75  fRun->Init();
76  fRun->Run(0,nEvents);
77  // ------------------------------------------------------------------------
78  rtdb->print();
79  // ----- Finish -------------------------------------------------------
80  timer.Stop();
81  Double_t rtime = timer.RealTime();
82  Double_t ctime = timer.CpuTime();
83  cout << endl << endl;
84  cout << "Macro finished succesfully." << endl;
85  cout << "Output file is " << outFile << endl;
86  cout << "Parameter file is " << parFile << endl;
87  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
88  cout << endl;
89  // ------------------------------------------------------------------------
90 
91 
92 }
PndPidIdealAssociatorTask * assMC
TString allDigiFile
FairGeane * Geane
FairParAsciiFileIo * parIo1
PndPidMvdAssociatorTask * assMvd
Double_t ctime
TString sysFile
PndPidDiscAssociatorTask * assDisc
PndPidCorrelator * corr
void SetBarrelTrackBranch(TString branch)
TStopwatch timer
Int_t nEvents
TString parFile
TString outFile
PndPidDrcAssociatorTask * assDrc
Double_t
FairParRootFileIo * parInput1
static void Init(Int_t MapVersion)
PndPidMdtHCAssociatorTask * assMdt
TString inSimuFile
FairRunAna * fRun
TString inRecoFile
Int_t iVerbose
TString inDigiFile
Double_t rtime
FairRuntimeDb * rtdb