]>
Commit | Line | Data |
---|---|---|
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 |
1f1942b8 | 11 | file TPC.Digits.root is in the path (symlink)! |
b2a02bce | 12 | |
13 | RUN with ALIROOT (not ROOT) if using root files. | |
058d766f | 14 | */ |
15 | ||
1f1942b8 | 16 | #ifndef __CINT__ |
17 | #include "AliL3Logger.h" | |
18 | #include "AliL3FileHandler.h" | |
19 | #include "AliL3DigitData.h" | |
20 | #include "AliL3Transform.h" | |
21 | #include "AliLevel3.h" | |
22 | #include <TNtuple.h> | |
23 | #include <TRandom.h> | |
24 | #include <TSystem.h> | |
25 | #include <stdio.h> | |
26 | #include <iostream.h> | |
27 | #include <time.h> | |
28 | #endif | |
29 | ||
30 | void runtracker(Int_t minslice=0,Int_t maxslice=35,Char_t* path="./",Int_t nevent=1,Char_t *opath="./tracker/") | |
058d766f | 31 | { |
3e87ef69 | 32 | //Set your configuration here: |
b2a02bce | 33 | AliLevel3::EFileType filetype=AliLevel3::kRoot; //Input is RLE binary files or rootfile. |
3e87ef69 | 34 | Bool_t pileup=kFALSE; //Assume input is pileup event = non RLE binary files. |
de3c3890 | 35 | Bool_t nonvertex = kFALSE; //Set this to true if a second nonvertex contrained tracking pass should be performed. |
3e87ef69 | 36 | Int_t npatches = 1; //Options; 1, 2 and 6. |
1f1942b8 | 37 | #ifdef __CINT__ |
02f030e3 | 38 | Char_t trackparams[] = "SetTrackingParameters_4000bf04.C"; //Set this to correspond |
39 | //with mult. and BField | |
1f1942b8 | 40 | #endif |
10d756ae | 41 | |
02f030e3 | 42 | //for aliroot the path should point to a file |
43 | //containing the tpc geometry called alirunfile.root | |
a27af97b | 44 | Bool_t isinit=AliL3Transform::Init(path,(filetype!=AliLevel3::kBinary)); |
02f030e3 | 45 | if(!isinit){ |
46 | cerr << "Could not create transform settings, please check log for error messages!" << endl; | |
47 | return; | |
48 | } | |
49 | ||
058d766f | 50 | for(Int_t ev=0; ev<nevent; ev++) |
51 | { | |
1f1942b8 | 52 | AliLevel3 *a; |
a27af97b | 53 | if(filetype==AliLevel3::kBinary) |
058d766f | 54 | a = new AliLevel3(); |
3e87ef69 | 55 | else |
56 | { | |
57 | Char_t fname[1024]; | |
a27af97b | 58 | if(filetype==AliLevel3::kRaw) |
b2a02bce | 59 | sprintf(fname,"%s/raw.root",path); |
a27af97b | 60 | else |
b2a02bce | 61 | sprintf(fname,"%s/digitfile.root",path); |
62 | a = new AliLevel3(fname); | |
3e87ef69 | 63 | } |
64 | ||
a27af97b | 65 | a->Init(path,filetype,npatches); |
3e87ef69 | 66 | |
1f1942b8 | 67 | #ifdef __CINT__ |
3e87ef69 | 68 | gROOT->LoadMacro(trackparams); |
69 | SetTrackingParameters(a); | |
1f1942b8 | 70 | #else /* compiled for 4000 and 0.4 */ |
71 | Int_t phi_segments,eta_segments,trackletlength,tracklength; | |
72 | Int_t rowscopetracklet,rowscopetrack; | |
73 | Double_t min_pt_fit,maxangle,goodDist,hitChi2Cut,xyerror,zerror; | |
74 | Double_t goodHitChi2,trackChi2Cut,maxphi,maxeta; | |
058d766f | 75 | |
1f1942b8 | 76 | phi_segments = 50; //devide the space into phi_segments and eta_segments |
77 | eta_segments = 100; //to access the search of points to that area! | |
78 | trackletlength = 3; //number of hits a tracklet has to have | |
79 | tracklength = 10; //number of hits a track has to have | |
80 | rowscopetracklet = 2; //search range of rows for a tracklet | |
81 | rowscopetrack = 10; //search range of rows for a track | |
086f41d8 | 82 | min_pt_fit = 0; |
1f1942b8 | 83 | maxangle = 0.1745; //AliL3Transform::Deg2Rad(10); |
84 | //maximum angle for the three point look ahead | |
086f41d8 | 85 | goodDist = 5; //threshold distance between two hits when building tracklets |
1f1942b8 | 86 | maxphi=0.1; //maximum phi difference for neighboring hits |
87 | maxeta=0.1; //maximum eta difference for neighboring hits | |
88 | hitChi2Cut = 20; //maximum chi2 of added hit to track | |
89 | goodHitChi2 = 5; //stop looking for next hit to add if chi2 is less than goodHitChi2 | |
90 | trackChi2Cut = 10; //maximum chi2 for track after final fit | |
91 | xyerror = -1; | |
92 | zerror = -1; | |
93 | ||
94 | a->SetClusterFinderParam(xyerror,zerror,kTRUE); | |
95 | a->SetTrackerParam(phi_segments,eta_segments,trackletlength,tracklength, | |
96 | rowscopetracklet,rowscopetrack, | |
97 | min_pt_fit,maxangle,goodDist,hitChi2Cut, | |
98 | goodHitChi2,trackChi2Cut,50,maxphi,maxeta,kTRUE); | |
de3c3890 | 99 | |
100 | if(nonvertex) | |
101 | { | |
102 | //Set parameters for nonvertextracking | |
103 | a->SetTrackerParam(phi_segments,eta_segments,trackletlength,tracklength, | |
104 | rowscopetracklet,rowscopetrack, | |
105 | min_pt_fit,maxangle,goodDist,hitChi2Cut, | |
106 | goodHitChi2,trackChi2Cut,50,maxphi,maxeta,kFALSE); | |
107 | } | |
3e87ef69 | 108 | #endif |
109 | ||
1f1942b8 | 110 | if(pileup) |
111 | a->DoPileup(); | |
058d766f | 112 | //a->DoRoi(); /*do region of interest*/ |
113 | //a->DoMc(); /*do monte carlo identification*/ | |
de3c3890 | 114 | |
115 | if(nonvertex) | |
116 | a->DoNonVertexTracking(); /*2 tracking passes, last without vertex contraint.*/ | |
117 | ||
3e87ef69 | 118 | a->WriteFiles(opath); /*enable output*/ |
058d766f | 119 | a->ProcessEvent(minslice,maxslice); |
0bd0c1ef | 120 | Char_t bname[100]; |
121 | sprintf(bname,"benchmark_tracker_%d",ev); | |
122 | a->DoBench(bname); | |
058d766f | 123 | delete a; |
1f1942b8 | 124 | } // event loop |
058d766f | 125 | } |
126 | ||
127 |