]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCRecoParam.cxx
Adding TPC cluster map for clusters used in fit (Marco van Leeuwen)
[u/mrichter/AliRoot.git] / TPC / AliTPCRecoParam.cxx
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 //                                                                           //
19 // Class with TPC reconstruction parameters                                  //
20 //                                                                           //  
21 //
22 /*
23   The reconstruction parameters are used in the AliTPCclustererMI and AliTPCtrackerMI
24   
25   They are retrieved:
26   0. User speciefied it in reconstruction macro
27   1. if (not 0) from OCDB  - AliTPCcalibDB::GetRecoParam(eventtype)
28   2. if (not 0 or 1) default parameter - High flux enevironment used  
29
30   FIXME:
31   In the future  reconstruction parameters should be changed on event basis
32   But for the moment, event types are still not defined 
33
34
35   // Setting for systematic errors addition
36   [0] - systematic RMSY
37   [1] - systematic RMSZ
38   [2] - systematic RMSSNP
39   [3] - systematic RMSTheta
40   [4] - systematic RMSCuravture -  systematic error in 1/cm not in 1/pt
41   //
42   //  How to add it example - 3 mm systematic error y, 3 cm systematic error z (drift)
43   Double_t sysError[5]={0.3,3, 0.3/150., 3./150.,0.3/(150*150.)}
44   param->SetSystematicError(sysError);
45
46 */
47                                                                            //
48 ///////////////////////////////////////////////////////////////////////////////
49
50
51 #include "AliTPCRecoParam.h"
52
53 ClassImp(AliTPCRecoParam)
54
55
56 Bool_t AliTPCRecoParam::fgUseTimeCalibration=kTRUE; // flag usage the time dependent calibration
57                                       // to be switched off for pass 0 reconstruction
58                                       // Use static function, other option will be to use 
59                                       // additional specific storage ?
60
61 //_____________________________________________________________________________
62 AliTPCRecoParam::AliTPCRecoParam():
63   AliDetectorRecoParam(),
64   fUseHLTClusters(1),  // use RAW data
65   fBClusterSharing(kTRUE),
66   fCtgRange(1.05),       
67   fMaxSnpTracker(0.95),
68   fMaxSnpTrack(0.999),
69   fUseOuterDetectors(kFALSE),
70   fDumpSignal(kFALSE),
71   fFirstBin(0),
72   fLastBin(-1),
73   fBCalcPedestal(kFALSE),
74   fBDoUnfold(kTRUE),
75   fDumpAmplitudeMin(100),
76   fMaxNoise(2.),
77   //
78   fUseOnePadCluster(kTRUE),
79   fMinMaxCutAbs(4.),
80   fMinLeftRightCutAbs(6.),
81   fMinUpDownCutAbs(6.),
82   //
83   fMinMaxCutSigma(4.),
84   fMinLeftRightCutSigma(7.),
85   fMinUpDownCutSigma(8.),
86   fMaxC(0.3),
87   fBSpecialSeeding(kFALSE),
88   fBKinkFinder(kTRUE),
89   fLastSeedRowSec(120),
90   fSeedGapPrim(6),
91   fSeedGapSec(6),
92   fUseFieldCorrection(2),      // use field correction
93   fUseComposedCorrection(kFALSE),      // use field correction
94   fUseRPHICorrection(0),      // use rphi correction
95   fUseRadialCorrection(0),    // use radial correction
96   fUseQuadrantAlignment(0),   // use quadrant alignment
97   fUseSectorAlignment(0),     // use sector alignment
98   fUseDriftCorrectionTime(1), // use drift correction time
99   fUseDriftCorrectionGY(1),   // use drif correction global y
100   fUseGainCorrectionTime(0),  // use gain correction time
101   fUseExBCorrection(1),  // use ExB correction
102   fUseMultiplicityCorrectionDedx(kTRUE), // use Dedx multiplicity correction
103   fUseAlignmentTime(kTRUE),              // use time dependent alignment correction
104   //
105   fUseTotCharge(kTRUE),          // switch use total or max charge
106   fMinFraction(0.01),           // truncated mean - lower threshold
107   fMaxFaction(0.7),            // truncated mean - upper threshold
108   fNeighborRowsDedx(2),           // neighbour rows for below threshold dEdx calculation
109   fUseTOFCorrection(kTRUE),
110   fUseSystematicCorrelation(kTRUE)
111 {
112   //
113   // constructor
114   //
115   SetName("TPC");
116   SetTitle("TPC");
117   for (Int_t i=0;i<5;i++) fSystematicErrors[i]=0;
118   fCutSharedClusters[0]=0.5; // maximal allowed fraction of shared clusters - shorter track
119   fCutSharedClusters[1]=0.25; // maximal allowed fraction of shared clusters - longer  track
120   fClusterMaxRange[0]=1;     // y - pad      range
121   fClusterMaxRange[1]=1;     // z - time bin range
122   fKinkAngleCutChi2[0]=9;    // angular cut for kink finder - to create a kink
123                              // ~ about 5 % rate  for high pt kink finder
124   fKinkAngleCutChi2[1]=12;    // angular cut for kink finder - to use the partial track                             // form kink 
125                              // ~ about 2 % rate  for high pt kink finder
126 }
127
128 //_____________________________________________________________________________
129 AliTPCRecoParam::~AliTPCRecoParam() 
130 {
131   //
132   // destructor
133   //  
134 }
135
136 void AliTPCRecoParam::Print(const Option_t* /*option*/) const{
137   //
138   //
139   //
140   AliTPCRecoParam::Dump();
141   printf("Systematic errors:\n");
142   const char * cherrs[5]={"sy=","sz=","ssnp=","stheta=","s1pt="};
143   for (Int_t i=0; i<5; i++){
144     printf("%s%f\n",cherrs[i],fSystematicErrors[i]);
145   }
146 }
147
148
149 AliTPCRecoParam *AliTPCRecoParam::GetLowFluxParam(){
150   //
151   // make default reconstruction  parameters for low  flux env.
152   //
153   AliTPCRecoParam *param = new AliTPCRecoParam;
154   param->fCtgRange = 10;
155   param->fFirstBin = 0;
156   param->fLastBin  = 1000;
157   param->SetName("Low Flux");
158   param->SetTitle("Low Flux");
159   return param;
160 }
161
162 AliTPCRecoParam *AliTPCRecoParam::GetHighFluxParam(){
163   //
164   // make reco parameters for high flux env.
165   //
166   AliTPCRecoParam *param = new AliTPCRecoParam;
167   param->fCtgRange = 1.05;
168   param->fFirstBin = 0;
169   param->fLastBin  = 1000;  
170   param->fUseTotCharge=kFALSE;
171   param->SetName("High Flux");
172   param->SetTitle("High Flux");
173   return param;
174 }
175
176 AliTPCRecoParam *AliTPCRecoParam::GetHLTParam(){
177   //
178   // make reco parameters for high flux env.
179   //
180   AliTPCRecoParam *param = new AliTPCRecoParam;
181   param->fCtgRange = 1.05;
182   param->fFirstBin = 80;
183   param->fLastBin  = 1000;  
184   param->fMaxSnpTracker = 0.9; 
185   param->fMaxC          = 0.06; 
186   //
187   param->SetName("Hlt Param");
188   param->SetTitle("Hlt Param"); 
189   param->fBKinkFinder   = kFALSE;
190   return param;
191 }
192
193 AliTPCRecoParam *AliTPCRecoParam::GetLaserTestParam(Bool_t bPedestal){
194   //
195   // special setting for laser
196   //
197   AliTPCRecoParam *param = new AliTPCRecoParam;
198   param->fDumpSignal=kTRUE;
199   param->fCtgRange = 10.05;
200   param->fFirstBin = 0;
201   param->fLastBin  = 1000;
202   param->fBCalcPedestal = bPedestal;
203   param->fBDoUnfold     = kFALSE;
204   param->fDumpAmplitudeMin = 150;
205   param->fBKinkFinder   = kFALSE;
206   param->fMaxSnpTracker = 0.98;
207   param->fMaxC          = 0.02;
208   param->fBSpecialSeeding = kTRUE;
209   param->fUseTOFCorrection=kFALSE;
210   param->fUseHLTClusters=1; // always RAW data
211   //
212   //
213   param->SetName("Laser Flux");
214   param->SetTitle("Laser Flux");
215   return param;
216 }
217
218 AliTPCRecoParam *AliTPCRecoParam::GetCosmicTestParam(Bool_t bPedestal){
219   //
220   // special setting for cosmic 
221   // 
222   AliTPCRecoParam *param = new AliTPCRecoParam;
223   param->fDumpSignal=kTRUE;
224   param->fCtgRange = 10.05;    // full TPC
225   param->fFirstBin = 60;
226   param->fLastBin  = 1000;
227   param->fBCalcPedestal = bPedestal;
228   param->fBDoUnfold     = kFALSE;
229   param->fBSpecialSeeding = kTRUE;
230   param->fMaxC          = 0.07;
231   param->fBKinkFinder   = kFALSE;
232   param->fUseTOFCorrection =kFALSE;
233   param->SetName("Cosmic Flux");
234   param->SetTitle("Cosmic Flux");
235
236   return param;
237 }
238
239
240 Bool_t  AliTPCRecoParam::GetUseTimeCalibration(){ 
241   //
242   // get
243   //
244   return fgUseTimeCalibration;
245 }
246 void    AliTPCRecoParam::SetUseTimeCalibration(Bool_t useTimeCalibration) {
247   //
248   // set 
249   //
250   fgUseTimeCalibration = useTimeCalibration;
251 }
252