FairRoot/PandaRoot
hit_pid.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_pidC.root";
9  Int_t nEvents = 0;//50000;
10  TString parFile="pidparams.root";
11  TString outFile = "hypIdealPidreco.root";
12 
13  // --- Now choose concrete engines for the different tasks -------------
14  // ------------------------------------------------------------------------
15 
16 
17  // In general, the following parts need not be touched
18  // ========================================================================
19 
20  // ---- Load libraries -------------------------------------------------
21 
22  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
23  rootlogon();
24 
25  gSystem->Load("libHyp");
26 
27 // ----- Timer --------------------------------------------------------
28  TStopwatch timer;
29  timer.Start();
30 
31  // ------------------------------------------------------------------------
32 
33  // ----- Reconstruction run -------------------------------------------
34 
35  FairRunAna *fRun= new FairRunAna();
36  fRun->SetInputFile(inFile.Data());
37 /*fRun->AddFile(inFile2.Data());
38  fRun->AddFile(inFile3.Data());
39  fRun->AddFile(inFile4.Data());*/
40  //fRun->AddFile(inFile5.Data());
41  fRun->SetOutputFile(outFile.Data());
42  // ------------------------------------------------------------------------
43 
44 
45 
46  // ----- Parameter database --------------------------------------------
47 
48  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
49  FairParRootFileIo* parInput1 = new FairParRootFileIo();
50  parInput1->open(parFile.Data());
51 
53  rtdb->setFirstInput(parInput1);
54 
55  //fRun->LoadGeometry();
56  // ------------------------------------------------------------------------
57 
58 
59 
60  // =========================================================================
61  // ====== Hit Producers ======
62  // =========================================================================
63 
64  // ----- MVD hit producer --------------------------------------------
66  mvdirec->SetVerbose(iVerbose);
67  fRun->AddTask(mvdirec);
68 
69 
70 
71  // =========================================================================
72 
73 
74  // ----- Intialise and run --------------------------------------------
75  fRun->Init();
76 
77  fRun->Run(0,nEvents);
78 
79 
80 
81  // ----- Finish -------------------------------------------------------
82  timer.Stop();
83  Double_t rtime = timer.RealTime();
84  Double_t ctime = timer.CpuTime();
85  cout << endl << endl;
86  cout << "Macro finished succesfully." << endl;
87  cout << "Output file is " << outFile << endl;
88  cout << "Parameter file is " << parFile << endl;
89  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
90  cout << endl;
91  // ------------------------------------------------------------------------
92 delete fRun;
93  exit(0);
94 
95 }
Bool_t kParameterMerged
Definition: sim_emc_apd.C:113
exit(0)
TString outFile
Definition: hit_dirc.C:17
FairRunAna * fRun
Definition: hit_dirc.C:58
TString inFile
Definition: hit_dirc.C:8
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
virtual InitStatus Init()
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
Double_t ctime
Definition: hit_dirc.C:114
PndHypIdealRecoTask * mvdirec
Definition: hit_hyp.C:65
Int_t iVerbose
Double_t rtime
Definition: hit_dirc.C:113