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