Little changes to make g++ version 3.2 compile the hough library.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3HoughGlobalMerger.cxx
1 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
2 //*-- Copyright &copy ASV 
3
4 #include "AliL3StandardIncludes.h"
5
6 #include "AliL3Logging.h"
7 #include "AliL3HoughTrack.h"
8 #include "AliL3HoughGlobalMerger.h"
9 #include "AliL3Track.h"
10 #include "AliL3TrackArray.h"
11 #include "AliL3Transform.h"
12
13 //_____________________________________________________________
14 // Merging Hough tracks across slices
15
16 ClassImp(AliL3HoughGlobalMerger)
17
18 AliL3HoughGlobalMerger::AliL3HoughGlobalMerger()
19 {
20   fTracks = 0;
21 }
22
23 AliL3HoughGlobalMerger::AliL3HoughGlobalMerger(Int_t first,Int_t last)
24 {
25   fNSlices = last-first+1;
26   fTracks = new AliL3TrackArray*[fNSlices];
27   for(Int_t i=0; i<fNSlices; i++)
28     fTracks[i] = new AliL3TrackArray("AliL3HoughTrack");
29   
30   
31 }
32 AliL3HoughGlobalMerger::~AliL3HoughGlobalMerger()
33 {
34   if(fTracks)
35     {
36       for(Int_t i=0; i<fNSlices; i++)
37         {
38           if(!fTracks[i])
39             continue;
40           delete fTracks;
41         }
42       delete [] fTracks;
43     }
44   
45 }
46
47 void AliL3HoughGlobalMerger::FillTracks(AliL3TrackArray *tracks,Int_t slice)
48 {
49   
50   fTracks[slice]->AddTracks(tracks,kTRUE,slice);
51   
52 }
53
54 void AliL3HoughGlobalMerger::Merge()
55 {
56   for(Int_t slice=0; slice<fNSlices; slice++)
57     {
58       if(slice+1 == fNSlices) continue;
59       AliL3TrackArray *t1 = fTracks[slice];
60       AliL3TrackArray *t2 = fTracks[slice+1];
61       Float_t angle = AliL3Transform::Pi()/18;
62       AliL3Transform::Local2GlobalAngle(&angle,slice);
63       
64       for(Int_t i=0; i<t1->GetNTracks(); i++)
65         {
66           
67         }
68     }
69   
70 }