FairRoot/PandaRoot
Functions
Fit.C File Reference

Go to the source code of this file.

Functions

int Fit ()
 

Function Documentation

int Fit ( )

Definition at line 4 of file Fit.C.

References ctime, Double_t, fRun, iVerbose, nEvents, rootlogon(), rtime, timer, trackFile, and TString.

5 {
6 
7  // Load basic libraries
8  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
9  rootlogon();
10 
11  Int_t iVerbose = 0;
12  Int_t nEvents = 5100;
13 
14  // ----- Timer --------------------------------------------------------
15  TStopwatch timer;
16  timer.Start();
17  // --------------
18 
19  TString trackFile = "DESY/data23NewAli.hit.hits.root";
20 
21  TString trkfitFile = "DESY/TEST/data23NewAliYWell.hit.fit.root";
22 
23 
24  //Run Reconstruction
25  // ------------
26  FairRunAna *fRun = new FairRunAna();
27  fRun->SetInputFile(trackFile);
28 
29  fRun->SetOutputFile(trkfitFile);
30 
31  TtLinFitTask* linfit = new TtLinFitTask();
32 
33  fRun->AddTask(linfit);
34 
35  // Initialize and run
36  fRun->Init();
37  fRun->Run(0, nEvents);
38 
39 
40  timer.Stop();
41  Double_t rtime = timer.RealTime();
42  Double_t ctime = timer.CpuTime();
43  cout << endl << endl;
44  cout << "Macro finished succesfully." << endl;
45  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
46  cout << endl;
47  //exit();
48  return 0;
49 }
TString trackFile
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
Double_t ctime
Definition: hit_dirc.C:114
Int_t iVerbose
Double_t rtime
Definition: hit_dirc.C:113