]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TPC/AliESDresolParams.cxx
- ATO-57, ATO-71 Fixed TPC multiplicity estimator (nTotTracks -> nTotESDTracks);...
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliESDresolParams.cxx
CommitLineData
7cc34f08 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//
18// ESD track and V0 resolution parameterization
19//
20//
21// Origin: Marian Ivanov marian.ivanov@cern.ch
22//-------------------------------------------------------------------------
23
24/*
25 The track parameter resolution is determined by the intrinsic detector
26 resolution and by the multiple scattering and fluctuation of the energy
27 loss in the material.
28
29 The contribution from the intrinsic detector resolution is independent of
30 the particle momenta and the mass of particle. In the limit limit of infinite
31 momenta - zero curvature, the intrinsic detector resolution can be obtained.
32
33 Multiple effect scaling:
34
35 SCATERING ANGLE - fi, theta
36 sigma A += sqrt(14.1*14.1/(beta2*p2*1e6)*TMath::Abs(xOverX0));
37 sigma A ~ 1/p
38 sigma sfi += sigma A * sqrt((1-sfi^2) * (1+ tth^2))
39 sigma tth += sigma A * (1+tth^2)
40
41 MOMENTUM Pt:
42 sigma 1/pt = sigma A * 1/pt * tth
43 sigma 1/pt ~ (1/pt)^2
44
45 POSITION y, z:
46 sigma y +~ sigma A * eff length (between update measurements) ~ 1/pt
47 sigma z +~ sigma A * eff length (between update measurements) ~ 1/pt
48 Example usage:
49
50
51*/
52
53
54#include "TVectorD.h"
55#include "TMath.h"
56#include "TObjArray.h"
57#include "AliESDresolParams.h"
58
59
60ClassImp(AliESDresolParams)
61
62
63 AliESDresolParams* AliESDresolParams::fgInstance = 0x0; //! Instance of this class (singleton implementation)
64
65
66AliESDresolParams::AliESDresolParams() :
67 TObject(),
68 fResolDCAyy(0), // resolution Y parameterization
69 fResolDCAzz(0), // resolution Z parameterization
70 fResolDCAphi(0), // resolution phi parameterization - pt-theta
71 fResolDCAth(0), // resolution theta parameterization -pt-theta
72 fResolDCA1pt(0), // resolution 1/pt parameterization - pt-theta
73 //
74 fResolCyy(0), // DCA resolution Y parameterization - r-pt
75 fResolCzz(0), // DCA resolution Z parameterization - r-pt
76 fResolCphi(0), // DCA resolution phi parameterization - r-pt
77 fResolCth(0), // DCA resolution theta parameterization - r-pt
78 fResolC1pt(0) // DCA resolution 1/pt parameterization - r-pt
79{
80 //
81 // Default constructor
82 //
83}
84
85Double_t AliESDresolParams::GetResolPrimFast(Int_t param, Float_t onept, Float_t tanth) const {
86 //
87 // Resolution at primary vertex
88 // simple Resolution parameterization
89 // polynom of second order in 2D
90 //
91 if (!fResolDCAyy) return 0;
92 TVectorD * pvec = fResolDCAyy;
93 if (param==1) pvec = fResolDCAzz;
94 if (param==2) pvec = fResolDCAphi;
95 if (param==3) pvec = fResolDCAth;
96 if (param==4) pvec = fResolDCA1pt;
97 TVectorD &vec = *pvec;
98 //
99 Float_t val = vec[0];
100 val+= vec[1]*TMath::Abs(onept);
101 val+= vec[2]*TMath::Abs(onept*onept);
102 val+= vec[3]*TMath::Abs(tanth);
103 val+= vec[4]*TMath::Abs(tanth*tanth);
104 val+= vec[5]*TMath::Abs(onept*tanth);
105 Float_t shift1pt=0;
106 if (param==0 || param==1) shift1pt=0.2;
107 if (param==2 || param==3) shift1pt=0.1;
108 if (param==4) shift1pt=1.;
109 val*= (onept+shift1pt);
110 if (param==4) val*=(onept+shift1pt);
111 return val;
112}
113
114Double_t AliESDresolParams::GetResolRFast(Int_t param, Float_t onept, Float_t radius) const {
115 //
116 // simple DCA resolution parameterization
117 // polynom of second order in 2D
118 //
119 if (!fResolCyy) return 0;
120 TVectorD * pvec = fResolCyy;
121 if (param==1) pvec = fResolCzz;
122 if (param==2) pvec = fResolCphi;
123 if (param==3) pvec = fResolCth;
124 if (param==4) pvec = fResolC1pt;
125 TVectorD &vec = *pvec;
126 //
127 Float_t val = vec[0];
128 val+= vec[1]*TMath::Abs(onept);
129 val+= vec[2]*TMath::Abs(radius);
130 val+= vec[3]*TMath::Abs(onept*onept);
131 val+= vec[4]*TMath::Abs(radius*radius);
132 val+= vec[5]*TMath::Abs(radius*onept);
133 val+= vec[6]*TMath::Abs(radius*radius*onept);
134 val*=val;
135 return val;
136}
137
138void AliESDresolParams::SetResolPrimFast(TObjArray* array){
139 //
140 // Set parameters - resolution at prim vertex
141 //
142 if (!array) return;
143 if (array->At(0))
144 fResolDCAyy = new TVectorD(*((TVectorD*)array->At(0)));
145 if (array->At(1))
146 fResolDCAzz = new TVectorD(*((TVectorD*)array->At(1)));
147 if (array->At(2))
148 fResolDCAphi = new TVectorD(*((TVectorD*)array->At(2)));
149 if (array->At(3))
150 fResolDCAth = new TVectorD(*((TVectorD*)array->At(3)));
151 if (array->At(4))
152 fResolDCA1pt = new TVectorD(*((TVectorD*)array->At(4)));
153}
154
155void AliESDresolParams::SetResolRFast(TObjArray* array){
156 //
157 // Set parameters - resolution at prim vertex
158 //
159 if (!array) return;
160 if (array->At(0))
161 fResolCyy = new TVectorD(*((TVectorD*)array->At(0)));
162 if (array->At(1))
163 fResolCzz = new TVectorD(*((TVectorD*)array->At(1)));
164 if (array->At(2))
165 fResolCphi = new TVectorD(*((TVectorD*)array->At(2)));
166 if (array->At(3))
167 fResolCth = new TVectorD(*((TVectorD*)array->At(3)));
168 if (array->At(4))
169 fResolC1pt = new TVectorD(*((TVectorD*)array->At(4)));
170}
171
172
173
174