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