X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTPCLib%2FAliHLTTPCConfMapTrack.cxx;h=58c457cd77ac97e67cf21ef62f4135267989bd93;hb=66a3e955519f9a3f391a4816c54e96e741907c3b;hp=2515436dcb782b2a6a8bf7fa6b2651afd1c0aee8;hpb=a6c02c859086baa09c104eba8886e2970781e516;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TPCLib/AliHLTTPCConfMapTrack.cxx b/HLT/TPCLib/AliHLTTPCConfMapTrack.cxx index 2515436dcb7..58c457cd77a 100644 --- a/HLT/TPCLib/AliHLTTPCConfMapTrack.cxx +++ b/HLT/TPCLib/AliHLTTPCConfMapTrack.cxx @@ -1,9 +1,28 @@ // @(#) $Id$ +// Original: AliHLTConfMapTrack.cxx,v 1.16 2005/06/14 10:55:21 cvetan -// Author: Anders Vestbo , Uli Frankenfeld -//*-- 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 * +//* 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" @@ -12,16 +31,6 @@ #include "AliHLTTPCConfMapFit.h" #include "AliHLTTPCConfMapTrack.h" #include "AliHLTTPCTransform.h" -#include "AliHLTTPC.h" - -/** \class AliHLTTPCConfMapTrack -
-//_____________________________________________________________
-// AliHLTTPCConfMapTrack
-//
-// Track class for conformal mapper
-
-*/ #if __GNUC__ >= 3 using namespace std; @@ -31,6 +40,26 @@ ClassImp(AliHLTTPCConfMapTrack) 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.; @@ -164,37 +193,80 @@ void AliHLTTPCConfMapTrack::UpdateParam(AliHLTTPCConfMapPoint *thisHit) 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")< 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")<