]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/exa/runhough.C
773abee299fc530777327b5cdec4e7c18e2bcb13
[u/mrichter/AliRoot.git] / HLT / exa / runhough.C
1 //$Id$
2
3 /**
4    Run this macro for Hough track candidate finder
5    (see steering class AliL3Hough).
6    In argument path, you have to provide the path to 
7    the directory where the data files should be located. 
8    In case of reading from a rootfile, you have to
9    make a symbolic link "digitfile.root", which points 
10    to the rootfile containing AliROOT digits tree 
11    and a symbolic link "alirunfile.root" pointing to a file 
12    containing the ALIROOT geometry (TPC param).
13    For NEWIO, make sure that the file TPC.Digits.root is in the path!
14  
15    Also provide the neccessary parameters in SetHoughParameters.C.
16
17    RUN with ALIROOT (not ROOT) if using root files.
18
19 */
20
21 void runhough(Char_t *path,Char_t *outpath,int s1=0,int s2=35,int nevent=1)
22 {
23
24   Bool_t isinit=AliL3Transform::Init(path,kTRUE);
25   if(!isinit){
26     cerr << "Could not create transform settings, please check log for error messages!" << endl;
27     return;
28   }
29   
30   hough = new AliL3Hough();
31
32   char macroname[1024];
33   sprintf(macroname,"SetHoughParameters.C",path);
34   gROOT->LoadMacro(macroname);
35   SetHoughParameters(hough,path);
36
37   for(int ev=0; ev<nevent; ev++)
38     {
39       for(int slice=s1; slice<=s2; slice++)
40         {
41           cout<<"Processing slice "<<slice<<endl;
42           hough->ReadData(slice,ev);
43           hough->Transform();
44           hough->AddAllHistograms();
45           hough->FindTrackCandidates();
46           hough->AddTracks();
47         }
48       hough->WriteTracks(outpath);
49     }
50   
51   delete hough;
52   
53 }
54