]>
Commit | Line | Data |
---|---|---|
b1886074 | 1 | //$Id$ |
2 | ||
3 | // Author: Anders Vestbo <mailto:vestbo@fi.uib.no> | |
4 | //*-- Copyright © ASV | |
5 | ||
f80b98cb | 6 | |
f000f8a5 | 7 | #include <string.h> |
f000f8a5 | 8 | |
b1886074 | 9 | #include "AliL3HoughMerger.h" |
10 | #include "AliL3HoughIntMerger.h" | |
11 | #include "AliL3HoughGlobalMerger.h" | |
a6008206 | 12 | #include "AliL3Logging.h" |
f80b98cb | 13 | #include "AliL3Histogram.h" |
f000f8a5 | 14 | #include "AliL3Hough.h" |
15 | #include "AliL3HoughTransformer.h" | |
16 | #include "AliL3HoughMaxFinder.h" | |
95a00d93 | 17 | #ifdef use_aliroot |
f80b98cb | 18 | #include "AliL3FileHandler.h" |
95a00d93 | 19 | #else |
20 | #include "AliL3MemHandler.h" | |
21 | #endif | |
f80b98cb | 22 | #include "AliL3DigitData.h" |
23 | #include "AliL3HoughEval.h" | |
24 | #include "AliL3Transform.h" | |
25 | #include "AliL3Defs.h" | |
26 | #include "AliL3TrackArray.h" | |
27 | #include "AliL3HoughTrack.h" | |
95a00d93 | 28 | |
b1886074 | 29 | |
30 | //_____________________________________________________________ | |
31 | // AliL3Hough | |
32 | // | |
237d3f5c | 33 | // Interface class for the Hough transform |
b1886074 | 34 | // |
237d3f5c | 35 | // Example how to use: |
36 | // | |
37 | // AliL3Hough *hough = new AliL3Hough(path,kTRUE,NumberOfEtaSegments); | |
38 | // hough->ReadData(slice); | |
39 | // hough->Transform(); | |
40 | // hough->FindTrackCandidates(); | |
41 | // | |
42 | // AliL3TrackArray *tracks = hough->GetTracks(patch); | |
f000f8a5 | 43 | |
44 | ClassImp(AliL3Hough) | |
45 | ||
46 | AliL3Hough::AliL3Hough() | |
47 | { | |
b1886074 | 48 | //Constructor |
49 | ||
a6008206 | 50 | fBinary = kFALSE; |
51 | fNEtaSegments = 0; | |
52 | fAddHistograms = kFALSE; | |
b1886074 | 53 | fDoIterative = kFALSE; |
a6008206 | 54 | fWriteDigits=kFALSE; |
1c404dd5 | 55 | fNPatches=0; |
237d3f5c | 56 | fMemHandler = 0; |
57 | fHoughTransformer = 0; | |
58 | fEval = 0; | |
59 | fPeakFinder = 0; | |
60 | fTracks = 0; | |
61 | fMerger = 0; | |
62 | fInterMerger = 0; | |
63 | fGlobalMerger = 0; | |
64 | fTransform = 0; | |
f000f8a5 | 65 | } |
66 | ||
67 | ||
4fc9a6a4 | 68 | AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments) |
f000f8a5 | 69 | { |
237d3f5c | 70 | //Default ctor. |
71 | ||
4fc9a6a4 | 72 | fBinary = binary; |
73 | strcpy(fPath,path); | |
f80b98cb | 74 | fNEtaSegments = n_eta_segments; |
a6008206 | 75 | fAddHistograms = kFALSE; |
b1886074 | 76 | fDoIterative = kFALSE; |
a6008206 | 77 | fWriteDigits = kFALSE; |
4fc9a6a4 | 78 | Init(); |
f000f8a5 | 79 | } |
80 | ||
81 | ||
82 | AliL3Hough::~AliL3Hough() | |
83 | { | |
237d3f5c | 84 | //dtor |
85 | ||
b1886074 | 86 | CleanUp(); |
87 | if(fMerger) | |
88 | delete fMerger; | |
89 | if(fInterMerger) | |
90 | delete fInterMerger; | |
a6008206 | 91 | if(fPeakFinder) |
92 | delete fPeakFinder; | |
1c404dd5 | 93 | if(fGlobalMerger) |
94 | delete fGlobalMerger; | |
237d3f5c | 95 | if(fTransform) |
96 | delete fTransform; | |
f000f8a5 | 97 | } |
98 | ||
b1886074 | 99 | void AliL3Hough::CleanUp() |
f000f8a5 | 100 | { |
b1886074 | 101 | //Cleanup memory |
102 | ||
1c404dd5 | 103 | for(Int_t i=0; i<fNPatches; i++) |
4fc9a6a4 | 104 | { |
b1886074 | 105 | if(fTracks[i]) delete fTracks[i]; |
106 | if(fEval[i]) delete fEval[i]; | |
107 | if(fHoughTransformer[i]) delete fHoughTransformer[i]; | |
108 | if(fMemHandler[i]) delete fMemHandler[i]; | |
4fc9a6a4 | 109 | } |
b1886074 | 110 | |
b5a207b4 | 111 | /* |
112 |