FairRoot/PandaRoot
Functions
findtrack.C File Reference

Go to the source code of this file.

Functions

int findtrack ()
 

Function Documentation

int findtrack ( )

Definition at line 1 of file findtrack.C.

References alpha, Bool_t, ctime, Double_t, eps(), fRun, iVerbose, mom, n, nEvents, rootlogon(), rtime, timer, trackFile, and TString.

2 {
3 
4  // Load basic libraries
5  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
6  rootlogon();
7 
8  Int_t iVerbose = 2;
9  Int_t nEvents = 0;
10 
11  // ----- Timer --------------------------------------------------------
12  TStopwatch timer;
13  timer.Start();
14  // --------------
15 
16  TString clustFile = "reco_G4.root";
17  TString trackFile = "track_G4.root";
18 
19  //Run Track finder
20  // ------------
21  FairRunAna *fRun = new FairRunAna();
22  fRun->SetInputFile(clustFile);
23 
24  fRun->SetOutputFile(trackFile);
25 
26 
27  Double_t n = 2.0;
28  Double_t mom = 8.9;
29  Double_t eps = 0.03;
30  Double_t alpha = 40 * 1E-3;
31  Bool_t usehough =false;
32  PndLumiTrackFinder* lumitrackfinder = new PndLumiTrackFinder(n, mom, eps, alpha, iVerbose, usehough);
33  fRun->AddTask(lumitrackfinder);
34 
35  // Initialize and run
36  fRun->Init();
37  fRun->Run(0, nEvents);
38 
39  //rtdb->saveOutput();
40  //rtdb->print();
41 
42  timer.Stop();
43  Double_t rtime = timer.RealTime();
44  Double_t ctime = timer.CpuTime();
45  cout << endl << endl;
46  cout << "Macro finished succesfully." << endl;
47  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
48  cout << endl;
49  return 0;
50 }
int n
Double_t mom
Definition: plot_dirc.C:14
TString trackFile
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
double eps(TVector3 v1, TVector3 v2)
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 alpha
Definition: f_Init.h:9
Double_t rtime
Definition: hit_dirc.C:113