FairRoot/PandaRoot
Functions
SmartAli.C File Reference

Go to the source code of this file.

Functions

int SmartAli ()
 

Function Documentation

int SmartAli ( )

Definition at line 5 of file SmartAli.C.

References ctime, Double_t, fRun, iVerbose, nEvents, p, TtAliTask::PrintMeanResiduals(), TtAliTask::PrintVal(), rootlogon(), rtime, TtAliTask::SetExcludedBox(), timer, trackFile, and TString.

6 {
7 
8  // Load basic libraries
9  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
10  rootlogon();
11 
12  Int_t iVerbose = 0;
13  Int_t nEvents = 10000;
14  Int_t nLoops = 5;
15 
16 
17  // ----- Timer --------------------------------------------------------
18  TStopwatch timer;
19  timer.Start();
20  // --------------
21 
22  TString trackFile = "data27.hit.hits.root";
23 
24  TString trkfitFile = "buff.root";
25 
26  //Run Reconstruction
27  // ------------
28 
29  FairRunAna *fRun = new FairRunAna();
30  fRun->SetInputFile(trackFile);
31  fRun->SetOutputFile(trkfitFile);
32 
33  TtAliTask* linfit = new TtAliTask();
34 
35  // Initialize and run
36 
37  for (Int_t j = 0 ; j < nLoops ; j++)
38  {
39 
40  for (Int_t p = 1 ; p < 7 ; p++)
41  {
42  linfit->SetExcludedBox(p);
43 
44  if (j==0 && p == 1)
45  {
46  fRun->AddTask(linfit);
47  fRun->Init();
48  }
49 
50  cout << "Loop: " << j << " Excluded Box: " << p << endl;
51 
52  // if (j == (nLoops-1)) linfit->FlagPrint(1);
53 
54  fRun->Run(0, nEvents);
55 
56  linfit->PrintVal();
57 
58  } // end loop on excluded sensors
59 
60  linfit->PrintMeanResiduals();
61 
62  } // end loops
63 
64 
65 
66 
67  timer.Stop();
68  Double_t rtime = timer.RealTime();
69  Double_t ctime = timer.CpuTime();
70  cout << endl << endl;
71  cout << "Macro finished succesfully." << endl;
72  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
73  cout << endl;
74 
75  //exit();
76  return 0;
77 }
Double_t p
Definition: anasim.C:58
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
void SetExcludedBox(Int_t excl)
Definition: TtAliTask.h:38
Double_t ctime
Definition: hit_dirc.C:114
Int_t iVerbose
void PrintVal()
Definition: TtAliTask.cxx:575
Double_t rtime
Definition: hit_dirc.C:113
void PrintMeanResiduals()
Definition: TtAliTask.cxx:588