FairRoot/PandaRoot
Functions
run_kalman_stt.C File Reference

Go to the source code of this file.

Functions

void run_kalman_stt (Int_t nEvents=10)
 

Function Documentation

void run_kalman_stt ( Int_t  nEvents = 10)

Definition at line 1 of file run_kalman_stt.C.

References ctime, Double_t, fRun, Geane, inDigiFile, inRecoFile, inSimuFile, iVerbose, lheKalman, nEvents, outFile, parFile, parInput1, rtdb, rtime, timer, and TString.

1  {
2  // ========================================================================
3  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
4  Int_t iVerbose = 0;
5  // ---- Load libraries -------------------------------------------------
6  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
7  gSystem->Load("libGem");
8 
9  // ------------------------------------------------------------------------
10  // Output file
11  TString parFile = "params_sttcombi.root";
12  TString inSimuFile = "points_sttcombi.root";
13  TString inDigiFile = "digi_sttcombi.root";
14  TString inRecoFile = "reco_sttcombi.root";
15 
16  TString outFile = "fit_sttcombi.root";
17 
18  // --- Now choose concrete engines for the different tasks -------------
19  // ------------------------------------------------------------------------
20 
21 
22  // In general, the following parts need not be touched
23  // ========================================================================
24 
25  // ----- Timer --------------------------------------------------------
26  TStopwatch timer;
27  timer.Start();
28  // ------------------------------------------------------------------------
29 
30 
31 
32  // ----- Reconstruction run -------------------------------------------
33  FairRunAna *fRun= new FairRunAna();
34  fRun->SetInputFile(inSimuFile);
35  fRun->AddFriend(inDigiFile);
36  fRun->AddFriend(inRecoFile);
37 
38 
39  fRun->SetOutputFile(outFile.Data());
40  // ------------------------------------------------------------------------
41 
42  // THIS IS STRONGLY NEEDED
43  FairGeane *Geane = new FairGeane();
44  //PndEmcMapper *emcMap = PndEmcMapper::Instance(2,inSimuFile);
45  fRun->AddTask(Geane);
46 
47  // ----- Parameter database --------------------------------------------
48  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
49  FairParRootFileIo* parInput1 = new FairParRootFileIo();
50  parInput1->open(parFile.Data());
51  rtdb->setFirstInput(parInput1);
52 
53  // ------------------------------------------------------------------------
54 
55  PndLheKalmanTask* lheKalman = new PndLheKalmanTask();
56  lheKalman->SetVerbose(iVerbose);
57  lheKalman->SetGeane(kTRUE);
58  //lheKalman->SetSmooth(kFALSE);
59  lheKalman->SetNumIterations(3);
60  fRun->AddTask(lheKalman);
61 
62  // ----- Intialise and run --------------------------------------------
63  fRun->Init();
64  fRun->Run(0,nEvents);
65  // ------------------------------------------------------------------------
66  rtdb->print();
67  // ----- Finish -------------------------------------------------------
68  timer.Stop();
69  Double_t rtime = timer.RealTime();
70  Double_t ctime = timer.CpuTime();
71  cout << endl << endl;
72  cout << "Macro finished succesfully." << endl;
73  cout << "Output file is " << outFile << endl;
74  cout << "Parameter file is " << parFile << endl;
75  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
76  cout << endl;
77  // ------------------------------------------------------------------------
78 
79 
80 }
TString outFile
Definition: hit_dirc.C:17
TString inRecoFile
TString inSimuFile
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
PndLheKalmanTask * lheKalman
TString inDigiFile
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