]>
Commit | Line | Data |
---|---|---|
03248e6d | 1 | #ifndef __CINT__ |
c0dd5278 | 2 | #include "Riostream.h" |
03248e6d | 3 | #include "TFile.h" |
4 | #include "TStopwatch.h" | |
c0dd5278 | 5 | |
6 | #include "AliITSgeom.h" | |
7 | #include "AliITStrackerV2.h" | |
03248e6d | 8 | #endif |
9 | ||
61ab8ea8 | 10 | Int_t AliITSFindTracksV2(Int_t nev=1) { //number of events to process |
03248e6d | 11 | cerr<<"Looking for tracks...\n"; |
12 | ||
13 | TFile *out=TFile::Open("AliITStracksV2.root","new"); | |
14 | if (!out->IsOpen()) {cerr<<"Delete old AliITStracksV2.root !\n"; return 1;} | |
15 | ||
16 | TFile *in=TFile::Open("AliTPCtracks.root"); | |
17 | if (!in->IsOpen()) {cerr<<"Can't open AliTPCtracks.root !\n"; return 2;} | |
18 | ||
19 | TFile *file=TFile::Open("AliITSclustersV2.root"); | |
20 | if (!file->IsOpen()) {cerr<<"Can't open AliITSclustersV2.root !\n";return 3;} | |
21 | ||
22 | AliITSgeom *geom=(AliITSgeom*)file->Get("AliITSgeom"); | |
61ab8ea8 | 23 | if (!geom) {cerr<<"Can't get AliITSgeom !\n"; return 4;} |
03248e6d | 24 | |
61ab8ea8 | 25 | Int_t rc=0; |
03248e6d | 26 | TStopwatch timer; |
27 | AliITStrackerV2 tracker(geom); | |
61ab8ea8 | 28 | for (Int_t i=0; i<nev; i++) { |
29 | cerr<<"Processing event number : "<<i<<endl; | |
30 | tracker.SetEventNumber(i); | |
8676d691 | 31 | //Double_t xyz[]={0.,0.,0.}, ers[]={0.,0.,0.01};//main vertex with errors |
32 | //tracker.SetVertex(xyz,ers); | |
c0dd5278 | 33 | //Int_t flag[]={1}; //some default flags |
34 | //flag[0]= 0; tracker.SetupFirstPass(flag); //no constraint | |
35 | //flag[0]=-1; tracker.SetupSecondPass(flag); //skip second pass | |
36 | //tracker.SetLastLayerToTrackTo(2); //track down to the layer 2 | |
37 | //Int_t mask[6]={1,1,0,0,0,0}; //not to skip pixels ! | |
38 | //tracker.SetLayersNotToSkip(mask); // | |
61ab8ea8 | 39 | rc=tracker.Clusters2Tracks(in,out); |
40 | } | |
03248e6d | 41 | timer.Stop(); timer.Print(); |
42 | ||
43 | delete geom; //Thanks to Mariana Bondila | |
44 | ||
45 | file->Close(); | |
46 | in->Close(); | |
47 | out->Close(); | |
48 | ||
49 | return rc; | |
50 | } |