]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSFindTracksV2.C
New version for non absorber side from Yogendra.
[u/mrichter/AliRoot.git] / ITS / AliITSFindTracksV2.C
1 #ifndef __CINT__
2   #include "AliITStrackerV2.h"
3
4   #include "TFile.h"
5   #include "TStopwatch.h"
6 #endif
7
8 Int_t AliITSFindTracksV2() {
9    cerr<<"Looking for tracks...\n";
10
11    TFile *out=TFile::Open("AliITStracksV2.root","new");
12    if (!out->IsOpen()) {cerr<<"Delete old AliITStracksV2.root !\n"; return 1;}
13
14    TFile *in=TFile::Open("AliTPCtracks.root");
15    if (!in->IsOpen()) {cerr<<"Can't open AliTPCtracks.root !\n"; return 2;}
16
17    TFile *file=TFile::Open("AliITSclustersV2.root");
18    if (!file->IsOpen()) {cerr<<"Can't open AliITSclustersV2.root !\n";return 3;}
19
20    AliITSgeom *geom=(AliITSgeom*)file->Get("AliITSgeom");
21
22    TStopwatch timer;
23    AliITStrackerV2 tracker(geom);
24    Int_t rc=tracker.Clusters2Tracks(in,out);
25    timer.Stop(); timer.Print();
26
27    file->Close();
28    in->Close();
29    out->Close();
30
31    return rc;
32 }