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