Corrections for tracking in arbitrary magnenetic field. Changes towards a concept...
[u/mrichter/AliRoot.git] / TPC / AliTPCFindTracks.C
1 #ifndef __CINT__
2   #include <iostream.h>
3   #include "AliTPCtracker.h"
4
5   #include "TFile.h"
6   #include "TStopwatch.h"
7 #endif
8
9 Int_t AliTPCFindTracks() {
10    cerr<<"Looking for tracks...\n";
11
12    TFile *out=TFile::Open("AliTPCtracks.root","new");
13    if (!out->IsOpen()) {cerr<<"Delete old AliTPCtracks.root !\n"; return 1;}
14
15    TFile *in=TFile::Open("AliTPCclusters.root");
16    if (!in->IsOpen()) {cerr<<"Can't open AliTPCclusters.root !\n"; return 2;}
17
18    AliTPCParam *par=(AliTPCParam*)in->Get("75x40_100x60");
19    if (!par) {cerr<<"Can't get TPC parameters !\n"; return 3;}
20  
21    TStopwatch timer;
22    AliTPCtracker *tracker = new AliTPCtracker(par);
23    Int_t rc=tracker->Clusters2Tracks(0,out);
24    delete tracker;
25    timer.Stop(); timer.Print();
26  
27    in->Close();
28    out->Close();
29
30    return rc;
31 }