]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking/AliHLTTPCHoughTracker.cxx
started migration of TPC hough tracking code to TPC library
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking / AliHLTTPCHoughTracker.cxx
CommitLineData
a0cef3e1 1// $Id$
2// origin: src/AliL3TPCtracker.cxx 1.2 Fri Jun 10 04:25:00 2005 UTC by cvetan
3
4/**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
9 * *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18
19//-------------------------------------------------------------------------
20// Implementation of the HLT TPC hough transform tracker class
21//
22// It reads directly TPC digits using runloader and runs the HT
23// algorithm over them.
24// It stores the reconstructed hough tracks in the HLT ESD using the
25// the off-line AliESDtrack format.
26//
27// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
28//-------------------------------------------------------------------------
29
30#include "AliESD.h"
31#include "AliRunLoader.h"
32#include "AliHLTTPCHoughTracker.h"
33#include "AliHLTHough.h"
34
35ClassImp(AliHLTTPCHoughTracker)
36
37AliHLTTPCHoughTracker::AliHLTTPCHoughTracker(AliRunLoader *runLoader):AliTracker()
38{
39 //--------------------------------------------------------------
40 // Constructor
41 //--------------------------------------------------------------
42
43 if(AliHLTTransform::GetVersion() == AliHLTTransform::kVdefault) {
44 Bool_t isinit=AliHLTTransform::Init(runLoader);
45 if(!isinit) AliWarning("Could not init AliHLTTransform settings, using defaults!");
46 }
47
48 fRunLoader = runLoader;
49}
50
51Int_t AliHLTTPCHoughTracker::Clusters2Tracks(AliESD *event)
52{
53 //--------------------------------------------------------------------
54 // This method reconstructs HLT TPC Hough tracks
55 //--------------------------------------------------------------------
56
57 if (!fRunLoader) {
58 AliError("Missing runloader!");
59 return kTRUE;
60 }
61 Int_t iEvent = fRunLoader->GetEventNumber();
62
63 Float_t ptmin = 0.1*AliHLTTransform::GetSolenoidField();
64
65 Float_t zvertex = GetZ();
66
67 AliInfo(Form("Hough Transform will run with ptmin=%f and zvertex=%f",ptmin,zvertex));
68
69 AliHLTHough *hough = new AliHLTHough();
70
71 hough->SetThreshold(4);
72 hough->CalcTransformerParams(ptmin);
73 hough->SetPeakThreshold(70,-1);
74 hough->SetRunLoader(fRunLoader);
75 hough->Init("./", kFALSE, 100, kFALSE,4,0,0,zvertex);
76 hough->SetAddHistograms();
77
78 for(Int_t slice=0; slice<=35; slice++)
79 {
80 hough->ReadData(slice,iEvent);
81 hough->Transform();
82 hough->AddAllHistogramsRows();
83 hough->FindTrackCandidatesRow();
84 hough->AddTracks();
85 }
86
87 Int_t ntrk = hough->FillESD(event);
88
89 Info("Clusters2Tracks","Number of found tracks: %d\n",ntrk);
90
91 delete hough;
92
93 return 0;
94}