]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCPropagateBack.C
Printout corrected
[u/mrichter/AliRoot.git] / TPC / AliTPCPropagateBack.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 AliTPCPropagateBack() {
10    cerr<<"Propagating tracks back through the TPC...\n";
11
12    TFile *in=TFile::Open("AliTPCtracks.root");
13    if (!in->IsOpen()) {
14       cerr<<"Can't open AliTPCtracks.root !\n"; 
15       return 1;
16    }
17    TFile *out=TFile::Open("AliTPCBackTracks.root","new");
18    if (!out->IsOpen()) {
19       cerr<<"Delete old AliTPCBackTracks.root !\n"; return 2;
20    }
21    TFile *file=TFile::Open("AliTPCclusters.root");
22    if (!file->IsOpen()) {
23       cerr<<"Can't open AliTPCclusters.root !\n";return 3;
24    }
25    AliTPCParam *param=(AliTPCParam*)file->Get("75x40_100x60");
26
27    TStopwatch timer;
28    AliTPCtracker *tracker=new AliTPCtracker(param);
29    Int_t rc=tracker->PropagateBack(in,out);
30    delete tracker;
31    timer.Stop(); timer.Print();
32
33    file->Close();
34    in->Close();
35    out->Close();
36
37    return rc;
38 }