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