]>
Commit | Line | Data |
---|---|---|
482070f2 | 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 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 | //----------------------------------------------------------------- | |
22 | ||
23 | #include "TMath.h" | |
24 | #include "AliESDHLTtrack.h" | |
e819460c | 25 | #include "AliKalmanTrack.h" |
482070f2 | 26 | |
27 | ClassImp(AliESDHLTtrack) | |
28 | ||
90e48c0c | 29 | AliESDHLTtrack::AliESDHLTtrack() : |
30 | TObject(), | |
31 | fNHits(0), | |
32 | fMCid(0), | |
33 | fWeight(0), | |
34 | fFromMainVertex(kFALSE), | |
35 | fSector(0), | |
36 | fQ(0), | |
37 | fTanl(0), | |
38 | fPsi(0), | |
39 | fPt(0), | |
40 | fPterr(0), | |
41 | fPsierr(0), | |
42 | fTanlerr(0), | |
43 | fBinX(0), | |
44 | fBinY(0), | |
45 | fSizeX(0), | |
46 | fSizeY(0), | |
47 | fPID(0) | |
482070f2 | 48 | { |
482070f2 | 49 | fRowRange[0] = fRowRange[1] = 0; |
482070f2 | 50 | fFirstPoint[0] = fFirstPoint[1] = fFirstPoint[2] = 0; |
51 | fLastPoint[0] = fLastPoint[1] = fLastPoint[2] = 0; | |
482070f2 | 52 | } |
53 | ||
54 | Double_t AliESDHLTtrack::GetP() const | |
55 | { | |
56 | // Returns total momentum. | |
57 | return TMath::Abs(GetPt())*sqrt(1. + GetTgl()*GetTgl()); | |
58 | } | |
59 | ||
60 | Double_t AliESDHLTtrack::GetPseudoRapidity() const | |
61 | { | |
62 | return 0.5 * TMath::Log((GetP() + GetPz()) / (GetP() - GetPz())); | |
63 | } | |
e819460c | 64 | |
65 | Bool_t AliESDHLTtrack::UpdateTrackParams(const AliKalmanTrack *t) | |
66 | { | |
67 | // Updates the track parameters | |
68 | ||
69 | fNHits = t->GetNumberOfClusters(); | |
70 | fMCid = t->GetLabel(); | |
71 | ||
72 | Double_t alpha = t->GetAlpha(); | |
73 | fSector = (UShort_t)(alpha/(2*TMath::Pi()/18)); | |
74 | Double_t x,p[5]; t->GetExternalParameters(x,p); | |
75 | if(p[4]<=0) | |
76 | fQ = 1; | |
77 | else | |
78 | fQ = -1; | |
79 | fPt = TMath::Abs(1./p[4]); | |
80 | fTanl = p[3]; | |
81 | fPsi = alpha + TMath::ASin(p[2]); | |
82 | ||
83 | fFirstPoint[0] = x*TMath::Cos(alpha) - p[0]*TMath::Sin(alpha); | |
84 | fFirstPoint[1] = x*TMath::Sin(alpha) + p[0]*TMath::Cos(alpha); | |
85 | fFirstPoint[2] = p[1]; | |
86 | ||
87 | return kTRUE; | |
88 | } |