FairRoot/PandaRoot
eta_c/run_pid_stt_mix.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_stt.root";
13  TString inSimuFile = "evt_points_stt.root";
14  TString inDigiFile = "evt_digi_stt.root";
15  TString inRecoFile = "mix_reco_stt.root";
16 
17  TString outFile = "mix_pid_stt.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("SttMvdGemGenTrack");
52  corr->SetInputIDBranch("SttMvdGemGenTrackID");
53  //corr->SetDebugMode(kTRUE);
54  corr->SetFast(kTRUE);
55  corr->SetMixMode(kTRUE);
56  fRun->AddTask(corr);
57 /*
58  PndPidIdealAssociatorTask *assMC= new PndPidIdealAssociatorTask();
59  fRun->AddTask(assMC);
60 
61  PndPidMvdAssociatorTask *assMvd= new PndPidMvdAssociatorTask();
62  fRun->AddTask(assMvd);
63 
64  PndPidMdtHCAssociatorTask *assMdt= new PndPidMdtHCAssociatorTask();
65  fRun->AddTask(assMdt);
66 
67  PndPidDrcAssociatorTask *assDrc= new PndPidDrcAssociatorTask();
68  fRun->AddTask(assDrc);
69 
70  PndPidDiscAssociatorTask *assDisc= new PndPidDiscAssociatorTask();
71  fRun->AddTask(assDisc);
72 
73  PndPidSttAssociatorTask *assStt= new PndPidSttAssociatorTask();
74  fRun->AddTask(assStt);
75  */
76  // ----- Intialise and run --------------------------------------------
78  fRun->Init();
79  fRun->Run(0,nEvents);
80  // ------------------------------------------------------------------------
81  rtdb->print();
82  // ----- Finish -------------------------------------------------------
83  timer.Stop();
84  Double_t rtime = timer.RealTime();
85  Double_t ctime = timer.CpuTime();
86  cout << endl << endl;
87  cout << "Macro finished succesfully." << endl;
88  cout << "Output file is " << outFile << endl;
89  cout << "Parameter file is " << parFile << endl;
90  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
91  cout << endl;
92  // ------------------------------------------------------------------------
93 
94 
95 }
Double_t rtime
void SetBarrelTrackBranch(TString branch)
TString inDigiFile
Int_t nEvents
FairRunAna * fRun
TString allDigiFile
FairParRootFileIo * parInput1
Double_t
TString inSimuFile
static void Init(Int_t MapVersion)
TString sysFile
TString inRecoFile
TStopwatch timer
Double_t ctime
TString outFile
Int_t iVerbose
FairGeane * Geane
PndPidCorrelator * corr
FairParAsciiFileIo * parIo1
FairRuntimeDb * rtdb
void SetFast(Bool_t fast)
TString parFile
void SetMixMode(Bool_t mix)