FairRoot/PandaRoot
runHypTCand.C
Go to the documentation of this file.
1 {
2 
3  // ========================================================================
4 
5 
6 // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
7  Int_t iVerbose = 1;//iVerbose = 3
8  TString inFile = "../sim_piTr.root";
9  Int_t nEvents = 100;//50000;
10  TString parFile="../PiTrparams.root";//pidparams.root";//pidparams.root";
11 
12  TString outFile = "HypPiTr.root";//HypPidIdrecdos2.root";
13 
14  // --- Now choose concrete engines for the different tasks -------------
15  // ------------------------------------------------------------------------
16 
17 
18  // In general, the following parts need not be touched
19  // ========================================================================
20 
21  // ---- Load libraries -------------------------------------------------
22 
23  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
24  rootlogon();
25 
26  gSystem->Load("libHyp");
27 
28 // ----- Timer --------------------------------------------------------
29  TStopwatch timer;
30  timer.Start();
31 
32  // ------------------------------------------------------------------------
33 
34  // ----- Reconstruction run -------------------------------------------
35 
36  FairRunAna *fRun= new FairRunAna();
37  fRun->SetInputFile(inFile.Data());
38  //fRun->AddFriend(RecoFile);
39 /*fRun->AddFile(inFile2.Data());
40  fRun->AddFile(inFile3.Data());
41  fRun->AddFile(inFile4.Data());*/
42  //fRun->AddFile(inFile5.Data());
43  fRun->SetOutputFile(outFile.Data());
44 
45 // ------------------------------------------------------------------------
46  // ----- Prepare GEANE --------------------------------------------
47  // this will load Geant3 and execute setup macros to initialize geometry:
48  //FairGeane *Geane = new FairGeane(inFile);
49 
50  /*
51 
52  // ----- Parameter database --------------------------------------------
53 
54  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
55  FairParRootFileIo* parInput1 = new FairParRootFileIo();
56  parInput1->open(parFile.Data());
57 
58  Bool_t kParameterMerged=kTRUE;
59  rtdb->setFirstInput(parInput1);*/
60 
61  // ------------------------------------------------------------------------
62 
63 
64 
65  // =========================================================================
66  // ====== Reco Sequence ======
67  // =========================================================================
68 
70  DemoPR->AddHitBranch(2,"HypPoint");
71  //DemoPR->AddHitBranch(2,"PndTpcPoint");
72  DemoPR->AddHitBranch(3,"MVDPoint");
73  DemoPR->SetPersistence();
74  //DemoPR->UseGeane();
75  fRun->AddTask(DemoPR);
76 
77  /* PndHypDKalmanTask* DemoKalman = new PndHypDKalmanTask();
78  DemoKalman->AddHitBranch(2,"HypHit");
79  //DemoKalman->AddHitBranch(2,"PndTpcPoint");
80  // DemoKalman->AddHitBranch(3,"MVDPoint");
81  DemoKalman->SetPersistence();
82 
83  fRun->AddTask(DemoKalman);*/
84 
85 
86 
87  // =========================================================================
88 
89 
90  // ----- Intialise and run --------------------------------------------
91  fRun->Init();
92 
93  fRun->Run(0,nEvents);
94 
95  DemoPR->WriteHistograms();
96 
97 
98  // ----- Finish -------------------------------------------------------
99  timer.Stop();
100  Double_t rtime = timer.RealTime();
101  Double_t ctime = timer.CpuTime();
102  cout << endl << endl;
103  cout << "Macro finished succesfully." << endl;
104  cout << "Output file is " << outFile << endl;
105  cout << "Parameter file is " << parFile << endl;
106  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
107  cout << endl;
108  // ------------------------------------------------------------------------
109 
110 
111 }
TString inFile
Definition: runHypTCand.C:8
Double_t ctime
Definition: runHypTCand.C:101
FairRunAna * fRun
Definition: runHypTCand.C:36
PndHypIdealPRTask * DemoPR
Definition: runHypTCand.C:69
TString outFile
Definition: runHypTCand.C:12
Double_t
TStopwatch timer
Definition: runHypTCand.C:29
Int_t nEvents
Definition: runHypTCand.C:9
void AddHitBranch(unsigned int detId, const TString &m)
void SetPersistence(Bool_t opt=kTRUE)
Int_t iVerbose
Double_t rtime
Definition: runHypTCand.C:100
TString parFile
Definition: runHypTCand.C:10