2 // origin: src/AliL3TPCtracker.cxx 1.2 Fri Jun 10 04:25:00 2005 UTC by cvetan
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 /** @file AliHLTTPCHoughTracker.cxx
20 @author Cvetan Cheshkov
22 @brief Implementation of the HLT TPC hough transform tracker. */
24 //-------------------------------------------------------------------------
25 // Implementation of the HLT TPC hough transform tracker class
27 // It reads directly TPC digits using runloader and runs the HT
28 // algorithm over them.
29 // It stores the reconstructed hough tracks in the HLT ESD using the
30 // the off-line AliESDtrack format.
32 // Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
33 //-------------------------------------------------------------------------
36 #include "AliRunLoader.h"
37 #include "AliHLTTPCHoughTracker.h"
38 #include "AliHLTTPCHough.h"
40 #include "AliHLTTPCTransform.h"
41 #include "AliHLTTPCLog.h"
43 /** ROOT macro for the implementation of ROOT specific class methods */
44 ClassImp(AliHLTTPCHoughTracker);
48 * used for instantiation when the library is loaded dynamically
50 extern "C" AliTracker* CreateHLTTPCHoughTrackerInstance(AliRunLoader* runLoader)
52 return new AliHLTTPCHoughTracker(runLoader);
55 AliHLTTPCHoughTracker::AliHLTTPCHoughTracker(AliRunLoader *runLoader):AliTracker()
57 //--------------------------------------------------------------
59 //--------------------------------------------------------------
61 if(AliHLTTPCTransform::GetVersion() == AliHLTTPCTransform::kVdefault) {
62 Bool_t isinit=AliHLTTPCTransform::Init(runLoader);
63 if(!isinit) AliWarning("Could not init AliHLTTPCTransform settings, using defaults!");
66 fRunLoader = runLoader;
69 Int_t AliHLTTPCHoughTracker::Clusters2Tracks(AliESD *event)
71 //--------------------------------------------------------------------
72 // This method reconstructs HLT TPC Hough tracks
73 //--------------------------------------------------------------------
76 AliError("Missing runloader!");
79 Int_t iEvent = fRunLoader->GetEventNumber();
81 Float_t ptmin = 0.1*AliHLTTPCTransform::GetSolenoidField();
83 Float_t zvertex = GetZ();
85 AliInfo(Form("Hough Transform will run with ptmin=%f and zvertex=%f",ptmin,zvertex));
87 // increase logging level temporarily to avoid bunches of info messages
88 AliHLTTPCLog::TLogLevel loglevelbk=AliHLTTPCLog::fgLevel;
89 AliHLTTPCLog::fgLevel=AliHLTTPCLog::kWarning;
91 AliHLTTPCHough *hough = new AliHLTTPCHough();
93 hough->SetThreshold(4);
94 hough->CalcTransformerParams(ptmin);
95 hough->SetPeakThreshold(70,-1);
96 hough->SetRunLoader(fRunLoader);
97 hough->Init("./", kFALSE, 100, kFALSE,4,0,0,zvertex);
98 hough->SetAddHistograms();
100 for(Int_t slice=0; slice<=35; slice++)
102 hough->ReadData(slice,iEvent);
104 hough->AddAllHistogramsRows();
105 hough->FindTrackCandidatesRow();
109 Int_t ntrk = hough->FillESD(event);
111 Info("Clusters2Tracks","Number of found tracks: %d\n",ntrk);
114 AliHLTTPCLog::fgLevel=loglevelbk;