]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSURecoParam.cxx
Macro to compare cluster and hits coordinates
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSURecoParam.cxx
CommitLineData
2fca776f 1/**************************************************************************
2 * Copyright(c) 2007-2009, 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#include "AliITSURecoParam.h"
17#include "AliLog.h"
42c3d4bd 18#include "AliITSUTrackCond.h"
2fca776f 19
20///////////////////////////////////////////////////////////////////////////////
21// //
22// Class with ITS reconstruction parameters //
23// //
24///////////////////////////////////////////////////////////////////////////////
25
2fca776f 26ClassImp(AliITSURecoParam)
27
c61e50c3 28
29const Double_t AliITSURecoParam::fgkMaxDforV0dghtrForProlongation = 30;
30const Double_t AliITSURecoParam::fgkMaxDForProlongation = 40;
31const Double_t AliITSURecoParam::fgkMaxDZForProlongation = 60;
32const Double_t AliITSURecoParam::fgkMinPtForProlongation = 0.0;
33const Double_t AliITSURecoParam::fgkNSigmaRoadY = 5.;
34const Double_t AliITSURecoParam::fgkNSigmaRoadZ = 5.;
173b3073 35const Double_t AliITSURecoParam::fgkSigmaRoadY = 1.;//1000e-4;
36const Double_t AliITSURecoParam::fgkSigmaRoadZ = 1.;//1000e-4;
3dd9c283 37const Double_t AliITSURecoParam::fgkMaxTr2ClChi2 = 15.;
c61e50c3 38const Double_t AliITSURecoParam::fgkTanLorentzAngle = 0;
716ccba7 39const Double_t AliITSURecoParam::fgkMissPenalty = 2.0;
ee58ce21 40const Bool_t AliITSURecoParam::fgkAllowDiagonalClusterization = kFALSE;
c61e50c3 41//
173b3073 42// hardwired params for TPC-ITS border layer
43const Double_t AliITSURecoParam::fgkTPCITSWallRMin = 50.;
44const Double_t AliITSURecoParam::fgkTPCITSWallRMax = 80.;
45const Double_t AliITSURecoParam::fgkTPCITSWallZSpanH = 250.;
46const Double_t AliITSURecoParam::fgkTPCITSWallMaxStep = 6.;
c61e50c3 47
173b3073 48
49//
2fca776f 50//_____________________________________________________________________________
51AliITSURecoParam::AliITSURecoParam()
c61e50c3 52 : fNLayers(0)
53 ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
54 ,fMaxDForProlongation(fgkMaxDForProlongation)
55 ,fMaxDZForProlongation(fgkMaxDZForProlongation)
dde91d5d 56 ,fMinPtForProlongation(fgkMinPtForProlongation)
c61e50c3 57 ,fNSigmaRoadY(fgkNSigmaRoadY)
58 ,fNSigmaRoadZ(fgkNSigmaRoadZ)
59 //
173b3073 60 ,fTPCITSWallRMin(fgkTPCITSWallRMin)
61 ,fTPCITSWallRMax(fgkTPCITSWallRMax)
62 ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
63 ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
64 //
ee58ce21 65 ,fAllowDiagonalClusterization(0)
32d38de2 66 ,fTanLorentzAngle(0)
c61e50c3 67 ,fSigmaY2(0)
68 ,fSigmaZ2(0)
f8832015 69 ,fMaxTr2ClChi2(0)
3dd9c283 70 ,fMissPenalty(0)
42c3d4bd 71 ,fTrackingConditions(0)
32d38de2 72{
73 // def c-tor
74 SetName("ITS");
75 SetTitle("ITS");
76}
77
78//_____________________________________________________________________________
79AliITSURecoParam::AliITSURecoParam(Int_t nLr)
c61e50c3 80 : fNLayers(0)
81 ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
82 ,fMaxDForProlongation(fgkMaxDForProlongation)
83 ,fMaxDZForProlongation(fgkMaxDZForProlongation)
dde91d5d 84 ,fMinPtForProlongation(fgkMinPtForProlongation)
c61e50c3 85 ,fNSigmaRoadY(fgkNSigmaRoadY)
86 ,fNSigmaRoadZ(fgkNSigmaRoadZ)
87 //
f9c7eb32 88 ,fTPCITSWallRMin(fgkTPCITSWallRMin)
89 ,fTPCITSWallRMax(fgkTPCITSWallRMax)
90 ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
91 ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
92 //
ee58ce21 93 ,fAllowDiagonalClusterization(0)
32d38de2 94 ,fTanLorentzAngle(0)
c61e50c3 95 ,fSigmaY2(0)
96 ,fSigmaZ2(0)
f8832015 97 ,fMaxTr2ClChi2(0)
3dd9c283 98 ,fMissPenalty(0)
42c3d4bd 99 ,fTrackingConditions(0)
2fca776f 100{
101 // def c-tor
102 SetName("ITS");
103 SetTitle("ITS");
32d38de2 104 SetNLayers(nLr);
2fca776f 105}
106
107//_____________________________________________________________________________
108AliITSURecoParam::~AliITSURecoParam()
109{
110 // destructor
32d38de2 111 delete[] fTanLorentzAngle;
c61e50c3 112 delete[] fSigmaY2;
113 delete[] fSigmaZ2;
f8832015 114 delete[] fMaxTr2ClChi2;
3dd9c283 115 delete[] fMissPenalty;
ee58ce21 116 delete[] fAllowDiagonalClusterization;
42c3d4bd 117 fTrackingConditions.Delete();
2fca776f 118}
119
120//_____________________________________________________________________________
121AliITSURecoParam *AliITSURecoParam::GetHighFluxParam()
122{
123 // make default reconstruction parameters for hig flux env.
124 AliITSURecoParam *param = new AliITSURecoParam();
125 //
126 // put here params
127 return param;
128}
129
130//_____________________________________________________________________________
131AliITSURecoParam *AliITSURecoParam::GetLowFluxParam()
132{
133 // make default reconstruction parameters for low flux env.
134 AliITSURecoParam *param = new AliITSURecoParam();
135 // put here params
136 return param;
137}
138
139//_____________________________________________________________________________
140AliITSURecoParam *AliITSURecoParam::GetCosmicTestParam()
141{
142 // make default reconstruction parameters for cosmics
143 AliITSURecoParam *param = new AliITSURecoParam();
144 // put here params
145 return param;
146}
147
32d38de2 148//_____________________________________________________________________________
149void AliITSURecoParam::SetNLayers(Int_t n)
150{
151 // set n layers and init all layer dependent arrays
152 if (fNLayers>0) AliFatal(Form("Number of layers was already set to %d",fNLayers));
153 if (n<1) n = 1; // in case we want to have dummy params
154 fNLayers = n;
155 fTanLorentzAngle = new Double_t[n];
c61e50c3 156 fSigmaY2 = new Double_t[n];
157 fSigmaZ2 = new Double_t[n];
f8832015 158 fMaxTr2ClChi2 = new Double_t[n];
3dd9c283 159 fMissPenalty = new Double_t[n];
ee58ce21 160 fAllowDiagonalClusterization = new Bool_t[n];
32d38de2 161 //
162 for (int i=n;i--;) {
ee58ce21 163 fAllowDiagonalClusterization[i] = fgkAllowDiagonalClusterization;
c61e50c3 164 fTanLorentzAngle[i] = fgkTanLorentzAngle;
165 fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
166 fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
f8832015 167 fMaxTr2ClChi2[i] = fgkMaxTr2ClChi2;
3dd9c283 168 fMissPenalty[i] = fgkMissPenalty;
32d38de2 169 }
170 //
171}
172
173//_____________________________________________________________________________
174void AliITSURecoParam::SetTanLorentzAngle(Int_t lr, Double_t v)
175{
176 // set Lorentz angle value
177 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
178 fTanLorentzAngle[lr] = v;
179}
c61e50c3 180
181//_____________________________________________________________________________
182void AliITSURecoParam::SetSigmaY2(Int_t lr, Double_t v)
183{
184 // set Lorentz angle value
185 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
186 fSigmaY2[lr] = v;
187}
188
189//_____________________________________________________________________________
190void AliITSURecoParam::SetSigmaZ2(Int_t lr, Double_t v)
191{
192 // set Lorentz angle value
193 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
194 fSigmaZ2[lr] = v;
195}
f8832015 196
197//_____________________________________________________________________________
198void AliITSURecoParam::SetMaxTr2ClChi2(Int_t lr, Double_t v)
199{
200 // set Lorentz angle value
201 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
202 fMaxTr2ClChi2[lr] = v;
203}
dde91d5d 204
ee58ce21 205//_____________________________________________________________________________
206void AliITSURecoParam::SetMissPenalty(Int_t lr, Double_t v)
207{
208 // set Lorentz angle value
209 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
210 fMissPenalty[lr] = v;
211}
212
213//_____________________________________________________________________________
214void AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v)
215{
216 // set Lorentz angle value
217 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
218 fAllowDiagonalClusterization[lr] = v;
219}
220
dde91d5d 221//========================================================================
222//_____________________________________________________________________________
80557052 223void AliITSURecoParam::Print(Option_t *) const
dde91d5d 224{
225 // print params
226 printf("%s: %s %s\n",ClassName(),GetName(),GetTitle());
227 printf("%-30s\t%f\n","fMaxDforV0dghtrForProlongation",fMaxDforV0dghtrForProlongation);
228 printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation);
229 printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation);
230 printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation);
231 printf("%-30s\t%f\n","fNSigmaRoadY",fNSigmaRoadY);
232 printf("%-30s\t%f\n","fNSigmaRoadZ",fNSigmaRoadZ);
233 //
173b3073 234 printf("TPC-ITS wall: %.3f<R<%.3f DZ/2=%.3f MaxStep=%.3f\n",
235 fTPCITSWallRMin,fTPCITSWallRMax,fTPCITSWallZSpanH,fTPCITSWallMaxStep);
236 //
dde91d5d 237 printf("N.Layers: %d\n",fNLayers);
238 if (fNLayers>0) {
239 printf("Layer-wise data:\n");
240 printf("%-30s\t:","fTanLorentzAngle"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fTanLorentzAngle[i]); printf("\n");
241 printf("%-30s\t:","fSigmaY2"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaY2[i]); printf("\n");
242 printf("%-30s\t:","fSigmaZ2"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaZ2[i]); printf("\n");
243 printf("%-30s\t:","fMaxTr2ClChi2"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMaxTr2ClChi2[i]); printf("\n");
3dd9c283 244 printf("%-30s\t:","fMissPenalty"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMissPenalty[i]); printf("\n");
dde91d5d 245 }
246 //
42c3d4bd 247 int nTrCond = GetNTrackingConditions();
248 printf("%d tracking conditions defined\n",nTrCond);
249 for (int itc=0;itc<nTrCond;itc++) {
250 printf("Tracking condition %d\n",itc);
251 GetTrackingCondition(itc)->Print();
252 }
253}
254
255//__________________________________________________
256void AliITSURecoParam::AddTrackingCondition(AliITSUTrackCond* cond)
257{
258 // Add new tracking condition
259 fTrackingConditions.AddLast(cond);
dde91d5d 260}