]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/AliL3ITStrack.cxx
Major update of the HLT Hough transform and ITS tracking code. Hough transform tracks...
[u/mrichter/AliRoot.git] / HLT / ITS / AliL3ITStrack.cxx
CommitLineData
9582ea1a 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 ITS track class
18//
19// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
20//-------------------------------------------------------------------------
21
22#include <TMath.h>
23
9582ea1a 24#include "AliL3ITStrack.h"
25
26ClassImp(AliL3ITStrack)
27
28//____________________________________________________________________________
9f91c2b5 29AliL3ITStrack::AliL3ITStrack()
f644512a 30 :AliITStrackV2()
9582ea1a 31{
32 //------------------------------------------------------------------
33 //Constructor
34 //------------------------------------------------------------------
35}
36
37//____________________________________________________________________________
f644512a 38AliL3ITStrack::AliL3ITStrack(AliESDtrack& t)
39 :AliITStrackV2(t)
9f91c2b5 40{
9582ea1a 41 //------------------------------------------------------------------
f644512a 42 //Constructor
9582ea1a 43 //------------------------------------------------------------------
9582ea1a 44}
45
46//____________________________________________________________________________
f644512a 47AliL3ITStrack::AliL3ITStrack(const AliL3ITStrack& t)
48 : AliITStrackV2(t)
9f91c2b5 49{
f644512a 50 //------------------------------------------------------------------
51 //Copy constructor
52 //------------------------------------------------------------------
9582ea1a 53}
54
55//_____________________________________________________________________________
56Int_t AliL3ITStrack::Compare(const TObject *o) const {
57 //-----------------------------------------------------------------
58 // This function compares tracks according to the their curvature
59 //-----------------------------------------------------------------
60 AliL3ITStrack *t=(AliL3ITStrack*)o;
61 Double_t co=TMath::Abs(t->Get1Pt());
62 Double_t c =TMath::Abs(Get1Pt());
63 // Double_t co=t->GetSigmaY2()*t->GetSigmaZ2();
64 // Double_t c =GetSigmaY2()*GetSigmaZ2();
65 if (c>co) return 1;
66 else if (c<co) return -1;
67 return 0;
68}
9f91c2b5 69
70Bool_t AliL3ITStrack::GetPxPyPzAt(Double_t x,Double_t *p) const {
71 //---------------------------------------------------------------------
72 // This function returns the global track momentum components
73 // at the position "x" using the helix track approximation
74 //---------------------------------------------------------------------
75 p[0]=fP4;
76 p[1]=fP2+(x-fX)*fP4/AliKalmanTrack::GetConvConst();
77 p[2]=fP3;
78
79 if (TMath::Abs(p[0])<=0) return kFALSE;
80 if (TMath::Abs(p[1])> 0.999999) return kFALSE;
81
82 Double_t pt=1./TMath::Abs(p[0]);
83 Double_t cs=TMath::Cos(fAlpha), sn=TMath::Sin(fAlpha);
84 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
85 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
86
87 return kTRUE;
88}