]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSURecoParam.cxx
to suppress compilation warnings
[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 #include "AliITSUTrackCond.h"
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::fgkSigmaRoadY                    = 20.E-4;//1000e-4;
34 const Double_t AliITSURecoParam::fgkSigmaRoadZ                    = 20.E-4;//1000e-4;
35 const Double_t AliITSURecoParam::fgkTanLorentzAngle               = 0;
36 const Bool_t   AliITSURecoParam::fgkAllowDiagonalClusterization   = kFALSE;
37 //
38 // hardwired params for TPC-ITS border layer
39 const Double_t AliITSURecoParam::fgkTPCITSWallRMin                = 50.;
40 const Double_t AliITSURecoParam::fgkTPCITSWallRMax                = 80.;
41 const Double_t AliITSURecoParam::fgkTPCITSWallZSpanH              = 250.;
42 const Double_t AliITSURecoParam::fgkTPCITSWallMaxStep             = 6.;
43 //
44 const Bool_t   AliITSURecoParam::fgkUseMatLUT[kNTrackingPhases] = {kFALSE,kFALSE,kFALSE};
45
46 //
47 //_____________________________________________________________________________
48 AliITSURecoParam::AliITSURecoParam()
49   :  fNLayers(0)
50   ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
51   ,fMaxDForProlongation(fgkMaxDForProlongation)
52   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
53   ,fMinPtForProlongation(fgkMinPtForProlongation)
54      //
55   ,fTPCITSWallRMin(fgkTPCITSWallRMin)
56   ,fTPCITSWallRMax(fgkTPCITSWallRMax)
57   ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
58   ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
59      //
60   ,fAllowDiagonalClusterization(0)
61   ,fTanLorentzAngle(0)
62   ,fSigmaY2(0)
63   ,fSigmaZ2(0)
64   ,fTrackingConditions(0)
65 {
66   // def c-tor
67   SetName("ITS");
68   SetTitle("ITS");
69   for (int i=kNTrackingPhases;i--;) fUseMatLUT[i] = fgkUseMatLUT[i];
70 }
71
72 //_____________________________________________________________________________
73 AliITSURecoParam::AliITSURecoParam(Int_t nLr)
74   :  fNLayers(0)
75   ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
76   ,fMaxDForProlongation(fgkMaxDForProlongation)
77   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
78   ,fMinPtForProlongation(fgkMinPtForProlongation)
79      //
80   ,fTPCITSWallRMin(fgkTPCITSWallRMin)
81   ,fTPCITSWallRMax(fgkTPCITSWallRMax)
82   ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
83   ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
84      //
85   ,fAllowDiagonalClusterization(0)
86   ,fTanLorentzAngle(0)
87   ,fSigmaY2(0)
88   ,fSigmaZ2(0)
89   ,fTrackingConditions(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[] fAllowDiagonalClusterization;
105   fTrackingConditions.Delete();
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   fAllowDiagonalClusterization = new Bool_t[n];
147   //
148   for (int i=n;i--;) {
149     fAllowDiagonalClusterization[i] = fgkAllowDiagonalClusterization;
150     fTanLorentzAngle[i] = fgkTanLorentzAngle;
151     fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
152     fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
153   }
154   //
155 }
156
157 //_____________________________________________________________________________
158 void  AliITSURecoParam::SetTanLorentzAngle(Int_t lr, Double_t v)
159 {
160   // set Lorentz angle value
161   if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
162   fTanLorentzAngle[lr] = v;
163 }
164
165 //_____________________________________________________________________________
166 void  AliITSURecoParam::SetSigmaY2(Int_t lr, Double_t v)
167 {
168   // set Lorentz angle value
169   if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
170   fSigmaY2[lr] = v;
171 }
172
173 //_____________________________________________________________________________
174 void  AliITSURecoParam::SetSigmaZ2(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   fSigmaZ2[lr] = v;
179 }
180
181 //_____________________________________________________________________________
182 void  AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v)
183 {
184   // set Lorentz angle value
185   if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
186   fAllowDiagonalClusterization[lr] = v;
187 }
188
189 //========================================================================
190 //_____________________________________________________________________________
191 void AliITSURecoParam::Print(Option_t *) const
192 {
193   // print params
194   printf("%s: %s %s\n",ClassName(),GetName(),GetTitle());
195   printf("%-30s\t%f\n","fMaxDforV0dghtrForProlongation",fMaxDforV0dghtrForProlongation);
196   printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation); 
197   printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation);
198   printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation);
199   //
200   printf("Use material LUT at steps: "); 
201   for (int i=0;i<kNTrackingPhases;i++) printf("%d : %s |",i,GetUseMatLUT(i) ? "ON":"OFF"); printf("\n");
202   printf("TPC-ITS wall: %.3f<R<%.3f DZ/2=%.3f MaxStep=%.3f\n",
203          fTPCITSWallRMin,fTPCITSWallRMax,fTPCITSWallZSpanH,fTPCITSWallMaxStep);
204   //
205   printf("N.Layers: %d\n",fNLayers);
206   if (fNLayers>0) {
207     printf("Layer-wise data:\n");
208     printf("%-30s\t:","fTanLorentzAngle");  for (int i=0;i<fNLayers;i++) printf(" %+.2e",fTanLorentzAngle[i]); printf("\n");
209     printf("%-30s\t:","fSigmaY2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaY2[i]); printf("\n");
210     printf("%-30s\t:","fSigmaZ2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaZ2[i]); printf("\n");
211   }
212   //
213   int nTrCond = GetNTrackingConditions();
214   printf("%d tracking conditions defined\n",nTrCond);
215   for (int itc=0;itc<nTrCond;itc++) {
216     printf("Tracking condition %d\n",itc);
217     GetTrackingCondition(itc)->Print();
218   }
219 }
220
221 //__________________________________________________
222 void  AliITSURecoParam::AddTrackingCondition(AliITSUTrackCond* cond)
223 {
224   // Add new tracking condition
225   fTrackingConditions.AddLast(cond);
226 }