1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-----------------------------------------------------------------
17 // Implementation of the ESD HLT track class
18 // ESD = Event Summary Data
19 // HLT = High Level Trigger
20 // This is the class to deal with during the phisical analysis of data
21 //-----------------------------------------------------------------
24 #include "AliESDHLTtrack.h"
25 #include "AliKalmanTrack.h"
27 ClassImp(AliESDHLTtrack)
29 AliESDHLTtrack::AliESDHLTtrack() : TObject()
34 fFromMainVertex = kFALSE;
35 fRowRange[0] = fRowRange[1] = 0;
37 fFirstPoint[0] = fFirstPoint[1] = fFirstPoint[2] = 0;
38 fLastPoint[0] = fLastPoint[1] = fLastPoint[2] = 0;
53 Double_t AliESDHLTtrack::GetP() const
55 // Returns total momentum.
56 return TMath::Abs(GetPt())*sqrt(1. + GetTgl()*GetTgl());
59 Double_t AliESDHLTtrack::GetPseudoRapidity() const
61 return 0.5 * TMath::Log((GetP() + GetPz()) / (GetP() - GetPz()));
64 Bool_t AliESDHLTtrack::UpdateTrackParams(const AliKalmanTrack *t)
66 // Updates the track parameters
68 fNHits = t->GetNumberOfClusters();
69 fMCid = t->GetLabel();
71 Double_t alpha = t->GetAlpha();
72 fSector = (UShort_t)(alpha/(2*TMath::Pi()/18));
73 Double_t x,p[5]; t->GetExternalParameters(x,p);
78 fPt = TMath::Abs(1./p[4]);
80 fPsi = alpha + TMath::ASin(p[2]);
82 fFirstPoint[0] = x*TMath::Cos(alpha) - p[0]*TMath::Sin(alpha);
83 fFirstPoint[1] = x*TMath::Sin(alpha) + p[0]*TMath::Cos(alpha);
84 fFirstPoint[2] = p[1];