Added support for NEWIO, merged cern-hlt tree, updated to latest track candidate...
[u/mrichter/AliRoot.git] / HLT / exa / runtracker.C
CommitLineData
086f41d8 1// $Id$
2
058d766f 3/**
3e87ef69 4 Run this macro for cluster finder and track follower
5 (see steering class AliLevel3).
02f030e3 6 In argument path, you have to provide the path to the directory
7 where the data files should be located. In case of reading from a rootfile, you have to
8 make a symbolic link "digitfile.root", which points to the rootfile containing AliROOT
9 digits tree and a symbolic link "alirunfile.root" pointing to a file containing
b2a02bce 10 the ALIROOT geometry (TPC param). For NEWIO, make sure that the
11 file TPC.Digits.root is in the path!
12
13 RUN with ALIROOT (not ROOT) if using root files.
058d766f 14*/
15
3e87ef69 16void runtracker(Int_t minslice=0,Int_t maxslice=35,Char_t* path="./",Int_t nevent=1,Char_t *opath="./")
058d766f 17{
3e87ef69 18 //Set your configuration here:
b2a02bce 19 AliLevel3::EFileType filetype=AliLevel3::kRoot; //Input is RLE binary files or rootfile.
3e87ef69 20 Bool_t pileup=kFALSE; //Assume input is pileup event = non RLE binary files.
21 Int_t npatches = 1; //Options; 1, 2 and 6.
02f030e3 22 Char_t trackparams[] = "SetTrackingParameters_4000bf04.C"; //Set this to correspond
23 //with mult. and BField
10d756ae 24
02f030e3 25 //for aliroot the path should point to a file
26 //containing the tpc geometry called alirunfile.root
b2a02bce 27 //Bool_t isinit=AliL3Transform::Init(path,!binary);
a27af97b 28 Bool_t isinit=AliL3Transform::Init(path,(filetype!=AliLevel3::kBinary));
02f030e3 29 if(!isinit){
30 cerr << "Could not create transform settings, please check log for error messages!" << endl;
31 return;
32 }
33
058d766f 34 for(Int_t ev=0; ev<nevent; ev++)
35 {
a27af97b 36 if(filetype==AliLevel3::kBinary)
058d766f 37 a = new AliLevel3();
3e87ef69 38 else
39 {
40 Char_t fname[1024];
a27af97b 41 if(filetype==AliLevel3::kRaw)
b2a02bce 42 sprintf(fname,"%s/raw.root",path);
a27af97b 43 else
b2a02bce 44 sprintf(fname,"%s/digitfile.root",path);
45 a = new AliLevel3(fname);
3e87ef69 46 }
47
a27af97b 48 a->Init(path,filetype,npatches);
3e87ef69 49
50 if(pileup)
51 a->DoPileup();
52
53 gROOT->LoadMacro(trackparams);
54 SetTrackingParameters(a);
058d766f 55
3e87ef69 56#if 0 /* little comments */
086f41d8 57 phi_segments = 50; //devide the space into phi_segments and eta_segments
58 eta_segments = 100; //to access the search of points to that area!
59 trackletlength = 3; //number of hits a tracklet has to have
60 tracklength = 5; //number of hits a track has to have
61 rowscopetracklet = 2;//search range of rows for a tracklet
62 rowscopetrack = 2; //search range of rows for a track
63 min_pt_fit = 0;
64 maxangle = 1.31; //maximum angle for the three point look ahead
65 goodDist = 5; //threshold distance between two hits when building tracklets
66 maxphi=100; //maximum phi difference for neighboring hits
67 maxeta=100; //maximum eta difference for neighboring hits
68 hitChi2Cut = 100; //maximum chi2 of added hit to track
69 goodHitChi2 = 20; //stop looking for next hit to add if chi2 is less than goodHitChi2
70 trackChi2Cut = 50; //maximum chi2 for track after final fit
3e87ef69 71#endif
72
058d766f 73
74 //a->DoRoi(); /*do region of interest*/
75 //a->DoMc(); /*do monte carlo identification*/
3e87ef69 76 a->WriteFiles(opath); /*enable output*/
77
058d766f 78 a->ProcessEvent(minslice,maxslice);
79 //a->DoBench("benchmark_0");
80
81 delete a;
82 }
83}
84
85