]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/oldmacros/AliITSPropagateBackV2.C
For Pythia with tune don't switch off MI in ConfigHeavyFlavor
[u/mrichter/AliRoot.git] / ITS / oldmacros / AliITSPropagateBackV2.C
1 #ifndef __CINT__
2   #include <Riostream.h>
3   #include "AliITSgeom.h"
4   #include "AliITStrackerV2.h"
5
6   #include "TFile.h"
7   #include "TStopwatch.h"
8 #endif
9
10 Int_t AliITSPropagateBackV2(Int_t nev=1) {
11    cerr<<"Propagating tracks back through the ITS...\n";
12
13    TFile *in=TFile::Open("AliITStracksV2.root");
14    if (!in->IsOpen()) {cerr<<"Can't open AliITStracksV2.root !\n"; return 1;}
15
16    TFile *out=TFile::Open("AliTPCtracks.root","update");
17    if (!out->IsOpen()) {
18       cerr<<"Can't open AliTPCtracks.root !\n"; return 2;
19    }
20    TFile *file=TFile::Open("AliITSclustersV2.root");
21    if (!file->IsOpen()) {
22       cerr<<"Can't open AliITSclustersV2.root !\n";return 3;
23    }
24    AliITSgeom *geom=(AliITSgeom*)file->Get("AliITSgeom");
25
26    Int_t rc=0;
27    TStopwatch timer;
28    AliITStrackerV2 tracker(geom);
29    for (Int_t i=0; i<nev; i++) {
30      cerr<<"Processing event number : "<<i<<endl;
31      tracker.SetEventNumber(i);
32      rc=tracker.PropagateBack(in,out);
33    }
34    timer.Stop(); timer.Print();
35
36    file->Close();
37    in->Close();
38    out->Close();
39
40    return rc;
41 }