]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliHLTTPCtracker.cxx
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[u/mrichter/AliRoot.git] / HLT / src / AliHLTTPCtracker.cxx
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 "AliHLTTPCtracker.h"
30 #include "AliHLTHough.h"
31
32 ClassImp(AliHLTTPCtracker)
33
34 AliHLTTPCtracker::AliHLTTPCtracker(AliRunLoader *runLoader):AliTracker()
35 {
36   //--------------------------------------------------------------
37   // Constructor
38   //--------------------------------------------------------------
39
40   if(AliHLTTransform::GetVersion() == AliHLTTransform::kVdefault) {
41     Bool_t isinit=AliHLTTransform::Init(runLoader);
42     if(!isinit) AliWarning("Could not init AliHLTTransform settings, using defaults!");
43   }
44
45   fRunLoader = runLoader;
46 }
47
48 Int_t AliHLTTPCtracker::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   Int_t iEvent = fRunLoader->GetEventNumber();
59   
60   Float_t ptmin = 0.1*AliHLTTransform::GetSolenoidField();
61
62   Float_t zvertex = GetZ();
63
64   AliInfo(Form("Hough Transform will run with ptmin=%f and zvertex=%f",ptmin,zvertex));
65
66   AliHLTHough *hough = new AliHLTHough();
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     {
77       hough->ReadData(slice,iEvent);
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 }