]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGUD/UPC/AliUPCTrack.cxx
Added classes for UPC analysis
[u/mrichter/AliRoot.git] / PWGUD / UPC / AliUPCTrack.cxx
CommitLineData
05e1b6ea 1
2//_____________________________________________________________________________
3// Class for UPC data
4// Author: Jaroslav Adam
5//
6// contains parameters of the central track relevant for UPC analysis
7//_____________________________________________________________________________
8
9#include "TLorentzVector.h"
10
11#include "AliUPCTrack.h"
12
13ClassImp(AliUPCTrack)
14
15//_____________________________________________________________________________
16AliUPCTrack::AliUPCTrack()
17 :TObject(),
18 fCharge(0), fMaskMan(0), fFilterMap(0), fChi2perNDF(0),
19 fTPCmomentum(0), fTPCsignal(0), fTPCncls(0),
20 fTPCrows(0), fTPCnclsF(0), fTPCnclsS(0),
21 fITSchi2perNDF(0), fITSClusterMap(0)
22{
23
24 // Default constructor
25
26 for(Int_t i=0; i<2; i++) {fDZ[i] = 0.; fdzSPD[i] = 0.; fdzIP[i] = 0.;}
27 for(Int_t i=0; i<3; i++) {fP[i] = 0.; fCov[i] = 0.; fCovSPD[i] = 0.; fCovIP[i] = 0.;}
28}
29
30//_____________________________________________________________________________
31void AliUPCTrack::Clear(Option_t *)
32{
33 // clear track flags
34
35 fMaskMan = 0;
36 fFilterMap = 0;
37}
38
39//_____________________________________________________________________________
40void AliUPCTrack::SetImpactParameters(Float_t *p, Float_t *cov)
41{
42 // set impact parameters in XY and Z to default primary vertex
43
44 for(Int_t i=0; i<2; i++) {
45 fDZ[i] = p[i];
46 fCov[i] = cov[i];
47 }
48 fCov[2] = cov[2];
49}
50
51//_____________________________________________________________________________
52void AliUPCTrack::SetImpactParametersSPD(Float_t *p, Float_t *cov)
53{
54 // set SPD impact parameters
55
56 for(Int_t i=0; i<2; i++) {
57 fdzSPD[i] = p[i];
58 fCovSPD[i] = cov[i];
59 }
60 fCovSPD[2] = cov[2];
61}
62
63//_____________________________________________________________________________
64void AliUPCTrack::SetImpactParametersIP(Float_t *p, Float_t *cov)
65{
66 // set impact parameters to nominal interaction point
67
68 for(Int_t i=0; i<2; i++) {
69 fdzIP[i] = p[i];
70 fCovIP[i] = cov[i];
71 }
72 fCovIP[2] = cov[2];
73}
74
75//_____________________________________________________________________________
76void AliUPCTrack::GetMomentum(TLorentzVector *v, Double_t mass) const
77{
78 // get track 4-momentum
79 v->SetXYZM(fP[0],fP[1],fP[2],mass);
80}
81
82Int_t AliUPCTrack::GetITSNcls(void) const
83{
84 // number of points in ITS
85
86 Int_t ncls = 0;
87
88 for(UChar_t i=0; i<6; i++) if( fITSClusterMap & (1 << i) ) ncls++;
89
90 return ncls;
91}
92
93//_____________________________________________________________________________
94void AliUPCTrack::GetImpactParameters(Double_t *p, Double_t *cov) const
95{
96 // get impact parameters in XY and Z to default primary vertex
97
98 for(Int_t i=0; i<2; i++) {
99 p[i] = (Double_t) fDZ[i];
100 cov[i] = (Double_t) fCov[i];
101 }
102 cov[2] = (Double_t) fCov[2];
103}
104
105//_____________________________________________________________________________
106void AliUPCTrack::GetImpactParametersSPD(Double_t *p, Double_t *cov) const
107{
108 // get SPD impact parameters
109
110 for(Int_t i=0; i<2; i++) {
111 p[i] = (Double_t) fdzSPD[i];
112 cov[i] = (Double_t) fCovSPD[i];
113 }
114 cov[2] = (Double_t) fCovSPD[2];
115}
116
117//_____________________________________________________________________________
118void AliUPCTrack::GetImpactParametersIP(Double_t *p, Double_t *cov) const
119{
120 // get impact parameters to nominal interaction point
121
122 for(Int_t i=0; i<2; i++) {
123 p[i] = (Double_t) fdzIP[i];
124 cov[i] = (Double_t) fCovIP[i];
125 }
126 cov[2] = (Double_t) fCovIP[2];
127}
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166