]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoParam.cxx
01a0819f4d3d9a3a9fdc77f590c277b1b7f61bae
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSURecoParam.cxx
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"
18
19
20 ///////////////////////////////////////////////////////////////////////////////
21 //                                                                           //
22 // Class with ITS reconstruction parameters                                  //
23 //                                                                           //
24 ///////////////////////////////////////////////////////////////////////////////
25
26 ClassImp(AliITSURecoParam)
27
28
29 const Double_t AliITSURecoParam::fgkMaxDforV0dghtrForProlongation = 30;
30 const Double_t AliITSURecoParam::fgkMaxDForProlongation           = 40; 
31 const Double_t AliITSURecoParam::fgkMaxDZForProlongation          = 60;      
32 const Double_t AliITSURecoParam::fgkMinPtForProlongation          = 0.0; 
33 const Double_t AliITSURecoParam::fgkNSigmaRoadY                   = 5.;
34 const Double_t AliITSURecoParam::fgkNSigmaRoadZ                   = 5.; 
35 const Double_t AliITSURecoParam::fgkSigmaRoadY                    = 1.;//1000e-4;
36 const Double_t AliITSURecoParam::fgkSigmaRoadZ                    = 1.;//1000e-4;
37 const Double_t AliITSURecoParam::fgkMaxTr2ClChi2                  = 15.;
38 const Double_t AliITSURecoParam::fgkTanLorentzAngle               = 0;
39 const Double_t AliITSURecoParam::fgkMissPenalty                   = 3.0;
40 //
41 // hardwired params for TPC-ITS border layer
42 const Double_t AliITSURecoParam::fgkTPCITSWallRMin                = 50.;
43 const Double_t AliITSURecoParam::fgkTPCITSWallRMax                = 80.;
44 const Double_t AliITSURecoParam::fgkTPCITSWallZSpanH              = 250.;
45 const Double_t AliITSURecoParam::fgkTPCITSWallMaxStep             = 6.;
46
47
48 //
49 //_____________________________________________________________________________
50 AliITSURecoParam::AliITSURecoParam()
51   :  fNLayers(0)
52   ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
53   ,fMaxDForProlongation(fgkMaxDForProlongation)
54   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
55   ,fMinPtForProlongation(fgkMinPtForProlongation)
56   ,fNSigmaRoadY(fgkNSigmaRoadY)
57   ,fNSigmaRoadZ(fgkNSigmaRoadZ)
58      //
59   ,fTPCITSWallRMin(fgkTPCITSWallRMin)
60   ,fTPCITSWallRMax(fgkTPCITSWallRMax)
61   ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
62   ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
63      //
64   ,fTanLorentzAngle(0)
65   ,fSigmaY2(0)
66   ,fSigmaZ2(0)
67   ,fMaxTr2ClChi2(0)
68   ,fMissPenalty(0)
69 {
70   // def c-tor
71   SetName("ITS");
72   SetTitle("ITS");
73 }
74
75 //_____________________________________________________________________________
76 AliITSURecoParam::AliITSURecoParam(Int_t nLr)
77   :  fNLayers(0)
78   ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
79   ,fMaxDForProlongation(fgkMaxDForProlongation)
80   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
81   ,fMinPtForProlongation(fgkMinPtForProlongation)
82   ,fNSigmaRoadY(fgkNSigmaRoadY)
83   ,fNSigmaRoadZ(fgkNSigmaRoadZ)
84      //
85   ,fTanLorentzAngle(0)
86   ,fSigmaY2(0)
87   ,fSigmaZ2(0)
88   ,fMaxTr2ClChi2(0)
89   ,fMissPenalty(0)
90 {
91   // def c-tor
92   SetName("ITS");
93   SetTitle("ITS");
94   SetNLayers(nLr);
95 }
96
97 //_____________________________________________________________________________
98 AliITSURecoParam::~AliITSURecoParam() 
99 {
100   // destructor
101   delete[] fTanLorentzAngle;
102   delete[] fSigmaY2;
103   delete[] fSigmaZ2;
104   delete[] fMaxTr2ClChi2;
105   delete[] fMissPenalty;
106 }
107
108 //_____________________________________________________________________________
109 AliITSURecoParam *AliITSURecoParam::GetHighFluxParam() 
110 {
111   // make default reconstruction  parameters for hig  flux env.
112   AliITSURecoParam *param = new AliITSURecoParam(); 
113   //
114   // put here params
115   return param;
116 }
117
118 //_____________________________________________________________________________
119 AliITSURecoParam *AliITSURecoParam::GetLowFluxParam() 
120 {
121   // make default reconstruction  parameters for low  flux env.
122   AliITSURecoParam *param = new AliITSURecoParam();
123   // put here params
124   return param;
125 }
126
127 //_____________________________________________________________________________
128 AliITSURecoParam *AliITSURecoParam::GetCosmicTestParam() 
129 {
130   // make default reconstruction  parameters for cosmics
131   AliITSURecoParam *param = new AliITSURecoParam();
132   // put here params
133   return param;
134 }
135
136 //_____________________________________________________________________________
137 void  AliITSURecoParam::SetNLayers(Int_t n)
138 {
139   // set n layers and init all layer dependent arrays
140   if (fNLayers>0) AliFatal(Form("Number of layers was already set to %d",fNLayers));
141   if (n<1) n = 1; // in case we want to have dummy params
142   fNLayers = n;
143   fTanLorentzAngle = new Double_t[n];
144   fSigmaY2 = new Double_t[n];
145   fSigmaZ2 = new Double_t[n];
146   fMaxTr2ClChi2 = new Double_t[n];
147   fMissPenalty  = new Double_t[n];
148   //
149   for (int i=n;i--;) {
150     fTanLorentzAngle[i] = fgkTanLorentzAngle;
151     fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
152     fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
153     fMaxTr2ClChi2[i] = fgkMaxTr2ClChi2;
154     fMissPenalty[i]  = fgkMissPenalty;
155   }
156   //
157 }
158
159 //_____________________________________________________________________________
160 void  AliITSURecoParam::SetTanLorentzAngle(Int_t lr, Double_t v)
161 {
162   // set Lorentz angle value
163   if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
164   fTanLorentzAngle[lr] = v;
165 }
166
167 //_____________________________________________________________________________
168 void  AliITSURecoParam::SetSigmaY2(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   fSigmaY2[lr] = v;
173 }
174
175 //_____________________________________________________________________________
176 void  AliITSURecoParam::SetSigmaZ2(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   fSigmaZ2[lr] = v;
181 }
182
183 //_____________________________________________________________________________
184 void  AliITSURecoParam::SetMaxTr2ClChi2(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   fMaxTr2ClChi2[lr] = v;
189 }
190
191 //========================================================================
192 //_____________________________________________________________________________
193 void AliITSURecoParam::Print(Option_t *opt) const
194 {
195   // print params
196   printf("%s: %s %s\n",ClassName(),GetName(),GetTitle());
197   printf("%-30s\t%f\n","fMaxDforV0dghtrForProlongation",fMaxDforV0dghtrForProlongation);
198   printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation); 
199   printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation);
200   printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation);
201   printf("%-30s\t%f\n","fNSigmaRoadY",fNSigmaRoadY);
202   printf("%-30s\t%f\n","fNSigmaRoadZ",fNSigmaRoadZ);
203   //
204   printf("TPC-ITS wall: %.3f<R<%.3f DZ/2=%.3f MaxStep=%.3f\n",
205          fTPCITSWallRMin,fTPCITSWallRMax,fTPCITSWallZSpanH,fTPCITSWallMaxStep);
206   //
207   printf("N.Layers: %d\n",fNLayers);
208   if (fNLayers>0) {
209     printf("Layer-wise data:\n");
210     printf("%-30s\t:","fTanLorentzAngle");  for (int i=0;i<fNLayers;i++) printf(" %+.2e",fTanLorentzAngle[i]); printf("\n");
211     printf("%-30s\t:","fSigmaY2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaY2[i]); printf("\n");
212     printf("%-30s\t:","fSigmaZ2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaZ2[i]); printf("\n");
213     printf("%-30s\t:","fMaxTr2ClChi2");     for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMaxTr2ClChi2[i]); printf("\n");
214     printf("%-30s\t:","fMissPenalty");      for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMissPenalty[i]); printf("\n");
215   }
216   //
217 }