]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/src/AliL3TPCtracker.cxx
Array bound violation
[u/mrichter/AliRoot.git] / HLT / src / AliL3TPCtracker.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"
29#include "AliL3TPCtracker.h"
30#include "AliL3Hough.h"
31
32ClassImp(AliL3TPCtracker)
33
34AliL3TPCtracker::AliL3TPCtracker(AliRunLoader *runLoader):AliTracker()
35{
36 //--------------------------------------------------------------
37 // Constructor
38 //--------------------------------------------------------------
39
40 if(AliL3Transform::GetVersion() == AliL3Transform::kVdefault) {
41 Bool_t isinit=AliL3Transform::Init(runLoader);
42 if(!isinit) AliWarning("Could not init AliL3Transform settings, using defaults!");
43 }
44
45 fRunLoader = runLoader;
46}
47
48Int_t AliL3TPCtracker::Clusters2Tracks(AliESD *event)
49{
50 //--------------------------------------------------------------------
51 // This method reconstructs HLT TPC Hough tracks
52 //--------------------------------------------------------------------
53
54 if (!fRunLoader) {
55 AliError("Missing runloader!");
56 return kTRUE;
57 }
58
59 Float_t ptmin = 0.1*AliL3Transform::GetSolenoidField();
60
61 Float_t zvertex = GetZ();
62
63 AliInfo(Form("Hough Transform will run with ptmin=%f and zvertex=%f",ptmin,zvertex));
64
65 AliL3Hough *hough = new AliL3Hough();
66
67 hough->SetThreshold(4);
68 hough->CalcTransformerParams(ptmin);
69 hough->SetPeakThreshold(70,-1);
70 hough->SetRunLoader(fRunLoader);
71 hough->Init("./", kFALSE, 100, kFALSE,4,0,0,zvertex);
72 hough->SetAddHistograms();
73
74 for(Int_t slice=0; slice<=35; slice++)
75 {
76 hough->ReadData(slice);
77 hough->Transform();
78 hough->AddAllHistogramsRows();
79 hough->FindTrackCandidatesRow();
80 hough->AddTracks();
81 }
82
83 Int_t ntrk = hough->FillESD(event);
84
85 Info("Clusters2Tracks","Number of found tracks: %d\n",ntrk);
86
87 delete hough;
88
89 return 0;
90}