// @(#) $Id$
+// Original: AliHLTConfMapTrack.cxx,v 1.16 2005/06/14 10:55:21 cvetan
-// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>, Uli Frankenfeld <mailto:franken@fi.uib.no>
-//*-- Copyright © ALICE HLT Group
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Anders Vestbo, maintained by *
+//* Matthias Richter <Matthias.Richter@ift.uib.no> *
+//* for The ALICE HLT Project. *
+//* *
+//* Permission to use, copy, modify and distribute this software and its *
+//* documentation strictly for non-commercial purposes is hereby granted *
+//* without fee, provided that the above copyright notice appears in all *
+//* copies and that both the copyright notice and this permission notice *
+//* appear in the supporting documentation. The authors make no claims *
+//* about the suitability of this software for any purpose. It is *
+//* provided "as is" without express or implied warranty. *
+//**************************************************************************
-#include "AliHLTTPCStandardIncludes.h"
+/** @file AliHLTTPCConfMapTrack.cxx
+ @author Anders Vestbo, maintained by Matthias Richter
+ @date
+ @brief Track class for conformal mapper
+*/
#include "AliHLTTPCRootTypes.h"
#include "AliHLTTPCLogging.h"
#include "AliHLTTPCConfMapFit.h"
#include "AliHLTTPCConfMapTrack.h"
#include "AliHLTTPCTransform.h"
-#include "AliHLTTPC.h"
-
-/** \class AliHLTTPCConfMapTrack
-<pre>
-//_____________________________________________________________
-// AliHLTTPCConfMapTrack
-//
-// Track class for conformal mapper
-</pre>
-*/
#if __GNUC__ >= 3
using namespace std;
AliHLTTPCConfMapTrack::AliHLTTPCConfMapTrack()
+ :
+ fCurrentHit(0),
+ fLastHit(0),
+ fFirstHit(0),
+ fs11Xy(0),
+ fs12Xy(0),
+ fs22Xy(0),
+ fg1Xy(0),
+ fg2Xy(0),
+ fs11Sz(0),
+ fs12Sz(0),
+ fs22Sz(0),
+ fg1Sz(0),
+ fg2Sz(0),
+ fddXy(0),
+ fa1Xy(0),
+ fa2Xy(0),
+ fddSz(0),
+ fa1Sz(0),
+ fa2Sz(0)
{
//Constructor
fChiSq[0] = 0.;
void AliHLTTPCConfMapTrack::Fill(AliHLTTPCVertex *vertex,Double_t max_Dca)
{
- //Fill track variables with or without fit.
-
- //fRadius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
- Double_t radius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
- SetRadius(radius);
-
- //fPt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * fRadius);
- Double_t pt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * GetRadius());
- SetPt(pt);
+ //Fill track variables with or without fit.
+
+ // for straight line fit
+ if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
- if(GetPt() > max_Dca) //go for fit of helix in real space
- {
- AliHLTTPCConfMapFit *fit = new AliHLTTPCConfMapFit(this,vertex);
- ComesFromMainVertex(AliHLTTPC::DoVertexFit());
- fit->FitHelix();
-
- //AliHLTTPCConfMapPoint *lHit = (AliHLTTPCConfMapPoint*)fLastHit;
- AliHLTTPCConfMapPoint *fHit = (AliHLTTPCConfMapPoint*)fFirstHit;
- SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
+ SetRadius(0.);
+ SetPt(0.);
+
+ //go for fit of straight line in real space
+ AliHLTTPCConfMapFit *fit = new AliHLTTPCConfMapFit(this,vertex);
+ /* Matthias 13.12.2006
+ * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
+ * and has always been kTRUE.
+ * In order to remove the AliHLTTPC class (which is the old steering class for
+ * HLT (TPC) tracking) from the compilation, this function can not be activated
+ * again. We have to think about a more elegant way to specify the parameters
+ * anyway.
+ ComesFromMainVertex(AliHLTTPC::DoVertexFit());
+ */
+ ComesFromMainVertex(kTRUE);
+ fit->FitStraightLine();
+
+ AliHLTTPCConfMapPoint *fHit = (AliHLTTPCConfMapPoint*)fFirstHit;
+ SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
+
+ UpdateToFirstPoint();
+
+ delete fit;
+
+ }
+ // for helix fit
+ else {
+ //fRadius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
+ Double_t radius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
+ SetRadius(radius);
- UpdateToFirstPoint();
+ //fPt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * fRadius);
+ Double_t pt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * GetRadius());
+ SetPt(pt);
+ //Set Error here?????
- delete fit;
- }
- else if(GetPt() == 0)
- LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
- "Found track with Pt=0!!!"<<ENDLOG;
- else
- {
- LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
- "Track with pt<max_Dca :"<<GetPt()<<ENDLOG;
+ if(GetPt() > max_Dca) //go for fit of helix in real space
+ {
+ AliHLTTPCConfMapFit *fit = new AliHLTTPCConfMapFit(this,vertex);
+ /* Matthias 13.12.2006
+ * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
+ * and has always been kTRUE.
+ * In order to remove the AliHLTTPC class (which is the old steering class for
+ * HLT (TPC) tracking) from the compilation, this function can not be activated
+ * again. We have to think about a more elegant way to specify the parameters
+ * anyway.
+ ComesFromMainVertex(AliHLTTPC::DoVertexFit());
+ */
+ ComesFromMainVertex(kTRUE);
+ fit->FitHelix();
+
+ //AliHLTTPCConfMapPoint *lHit = (AliHLTTPCConfMapPoint*)fLastHit;
+ AliHLTTPCConfMapPoint *fHit = (AliHLTTPCConfMapPoint*)fFirstHit;
+ SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
+
+ UpdateToFirstPoint();
+
+ delete fit;
+ }
+ else if(GetPt() == 0)
+ {
+ LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
+ "Found track with Pt=0!!!"<<ENDLOG;
+ }
+ else
+ {
+ LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
+ "Track with pt<max_Dca :"<<GetPt()<<ENDLOG;
+ }
}
}