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