ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/


///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// Class with TPC reconstruction parameters                                  //
//                                                                           //  
//
/*
  The reconstruction parameters are used in the AliTPCclusterer and AliTPCtracker
  
  They are retrieved:
  0. User speciefied it in reconstruction macro
  1. if (not 0) from OCDB  - AliTPCcalibDB::GetRecoParam(eventtype)
  2. if (not 0 or 1) default parameter - High flux enevironment used  


  // Setting for systematic errors addition
  [0] - systematic RMSY
  [1] - systematic RMSZ
  [2] - systematic RMSSNP
  [3] - systematic RMSTheta
  [4] - systematic RMSCuravture -  systematic error in 1/cm not in 1/pt
  //
  //  How to add it example - 3 mm systematic error y, 3 cm systematic error z (drift)
  Double_t sysError[5]={0.3,3, 0.3/150., 3./150.,0.3/(150*150.)}
  param->SetSystematicError(sysError);

*/
                                                                           //
///////////////////////////////////////////////////////////////////////////////


#include "AliTPCRecoParam.h"

ClassImp(AliTPCRecoParam)


Bool_t AliTPCRecoParam::fgUseTimeCalibration=kTRUE; // flag usage the time dependent calibration
                                      // to be switched off for pass 0 reconstruction
                                      // Use static function, other option will be to use 
                                      // additional specific storage ?

//_____________________________________________________________________________
AliTPCRecoParam::AliTPCRecoParam():
  AliDetectorRecoParam(),
  fUseHLTClusters(4),  // use HLTorRAW data
  fUseHLTPreSeeding(0), // no pre-seeding for now
  fBClusterSharing(kTRUE),
  fCtgRange(1.05),       
  fMaxSnpTracker(0.95),
  fMaxSnpTrack(0.999),
  fUseOuterDetectors(kFALSE),
  fMaxChi2TPCTRD(36),     // maximal allowed chi2 between the TRD in and TPC out to be accepted for refit
  fMaxChi2TPCITS(36),     // maximal allowed chi2 between the ITS in and TPC out to be accepted for backpropagation
  fUseOulierClusterFilter(0),  // swith to use outlier cluster filter
  fDumpSignal(kFALSE),
  fFirstBin(0),
  fLastBin(-1),
  fBCalcPedestal(kFALSE),
  fBDoUnfold(kTRUE),
  fDumpAmplitudeMin(100),
  fMaxNoise(2.),
  //
  fUseOnePadCluster(kTRUE),
  fUseHLTOnePadCluster(kFALSE),
  fMinMaxCutAbs(4.),
  fMinLeftRightCutAbs(6.),
  fMinUpDownCutAbs(6.),
  //
  fMinMaxCutSigma(4.),
  fMinLeftRightCutSigma(7.),
  fMinUpDownCutSigma(8.),
  fMaxC(0.3),
  fBSpecialSeeding(kFALSE),
  fBKinkFinder(kTRUE),
  fLastSeedRowSec(120),
  fSeedGapPrim(6),
  fSeedGapSec(6),
  fUseFieldCorrection(0),      // use field correction
  fUseComposedCorrection(kFALSE),      // use field correction
  fUseRPHICorrection(0),      // use rphi correction
  fUseRadialCorrection(0),    // use radial correction
  fUseQuadrantAlignment(0),   // use quadrant alignment
  fUseSectorAlignment(0),     // use sector alignment
  fUseDriftCorrectionTime(1), // use drift correction time
  fUseDriftCorrectionGY(1),   // use drif correction global y
  fUseGainCorrectionTime(0),  // use gain correction time
  fUseExBCorrection(1),  // use ExB correction
  fUseMultiplicityCorrectionDedx(kTRUE), // use Dedx multiplicity correction
  fUseAlignmentTime(kTRUE),              // use time dependent alignment correction
  fUseIonTailCorrection(0),   // no ion tail correction for now
  fCrosstalkCorrection(0),   // crosstalk correction factor (from each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
  fCrosstalkCorrectionMissingCharge(1),   // crosstalk correction factor - missing charge (from each signal substracted by (mean signal in wite patch)xfCrosstalkCorrection) - Effect important only after removing oc capacitors in 2012
 //
  fUseTotCharge(kTRUE),          // switch use total or max charge
  fMinFraction(0.01),           // truncated mean - lower threshold
  fMaxFaction(0.7),            // truncated mean - upper threshold
  fNeighborRowsDedx(2),           // neighbour rows for below threshold dEdx calculation
  fGainCorrectionHVandPTMode(0), // switch for the usage of GainCorrectionHVandPT (see AliTPCcalibDB::GetGainCorrectionHVandPT   
  fSkipTimeBins(5),              // number of time bins to be skiiped (corrupted signal druing gating opening)
  fUseTOFCorrection(kTRUE),
  fUseSystematicCorrelation(kTRUE)
{
  //
  // constructor
  //
  SetName("TPC");
  SetTitle("TPC");
  for (Int_t i=0;i<5;i++) fSystematicErrors[i]=0;
  // systematic error parameterization at INNER wall of the TPC
  fSystematicErrorClusterInner[0]=0.5;   // 0.5 cm
  fSystematicErrorClusterInner[1]=5;     // 5 cm slope  
  //
  fSystematicErrorCluster[0]=0;   // sy cluster error
  fSystematicErrorCluster[1]=0;   // sz cluster error  

  //
  fCutSharedClusters[0]=0.5; // maximal allowed fraction of shared clusters - shorter track
  fCutSharedClusters[1]=0.25; // maximal allowed fraction of shared clusters - longer  track
  fClusterMaxRange[0]=1;     // y - pad      range
  fClusterMaxRange[1]=1;     // z - time bin range
  fKinkAngleCutChi2[0]=9;    // angular cut for kink finder - to create a kink
                             // ~ about 5 % rate  for high pt kink finder
  fKinkAngleCutChi2[1]=12;    // angular cut for kink finder - to use the partial track                             // form kink 
                             // ~ about 2 % rate  for high pt kink finder
}

//_____________________________________________________________________________
AliTPCRecoParam::~AliTPCRecoParam() 
{
  //
  // destructor
  //  
}

void AliTPCRecoParam::Print(const Option_t* /*option*/) const{
  //
  //
  //
  AliTPCRecoParam::Dump();
  printf("Systematic errors:\n");
  const char * cherrs[5]={"sy=","sz=","ssnp=","stheta=","s1pt="};
  for (Int_t i=0; i<5; i++){
    printf("%s%f\n",cherrs[i],fSystematicErrors[i]);
  }
}


AliTPCRecoParam *AliTPCRecoParam::GetLowFluxParam(){
  //
  // make default reconstruction  parameters for low  flux env.
  //
  AliTPCRecoParam *param = new AliTPCRecoParam;
  param->fCtgRange = 10;
  param->fFirstBin = 0;
  param->fLastBin  = 1000;
  param->SetName("Low Flux");
  param->SetTitle("Low Flux");
  return param;
}

AliTPCRecoParam *AliTPCRecoParam::GetHighFluxParam(){
  //
  // make reco parameters for high flux env.
  //
  AliTPCRecoParam *param = new AliTPCRecoParam;
  param->fCtgRange = 1.05;
  param->fFirstBin = 0;
  param->fLastBin  = 1000;  
  param->fUseTotCharge=kFALSE;
  param->SetName("High Flux");
  param->SetTitle("High Flux");
  return param;
}

AliTPCRecoParam *AliTPCRecoParam::GetHLTParam(){
  //
  // make reco parameters for high flux env.
  //
  AliTPCRecoParam *param = new AliTPCRecoParam;
  param->fCtgRange = 1.05;
  param->fFirstBin = 80;
  param->fLastBin  = 1000;  
  param->fMaxSnpTracker = 0.9; 
  param->fMaxC          = 0.06; 
  //
  param->SetName("Hlt Param");
  param->SetTitle("Hlt Param"); 
  param->fBKinkFinder   = kFALSE;
  return param;
}

AliTPCRecoParam *AliTPCRecoParam::GetLaserTestParam(Bool_t bPedestal){
  //
  // special setting for laser
  //
  AliTPCRecoParam *param = new AliTPCRecoParam;
  param->fDumpSignal=kTRUE;
  param->fCtgRange = 10.05;
  param->fFirstBin = 0;
  param->fLastBin  = 1000;
  param->fBCalcPedestal = bPedestal;
  param->fBDoUnfold     = kFALSE;
  param->fDumpAmplitudeMin = 150;
  param->fBKinkFinder   = kFALSE;
  param->fMaxSnpTracker = 0.98;
  param->fMaxC          = 0.02;
  param->fBSpecialSeeding = kTRUE;
  param->fUseTOFCorrection=kFALSE;
  param->fUseHLTClusters=1; // always RAW data
  //
  //
  param->SetName("Laser Flux");
  param->SetTitle("Laser Flux");
  return param;
}

AliTPCRecoParam *AliTPCRecoParam::GetCosmicTestParam(Bool_t bPedestal){
  //
  // special setting for cosmic 
  // 
  AliTPCRecoParam *param = new AliTPCRecoParam;
  param->fDumpSignal=kTRUE;
  param->fCtgRange = 10.05;    // full TPC
  param->fFirstBin = 60;
  param->fLastBin  = 1000;
  param->fBCalcPedestal = bPedestal;
  param->fBDoUnfold     = kFALSE;
  param->fBSpecialSeeding = kTRUE;
  param->fMaxC          = 0.07;
  param->fBKinkFinder   = kFALSE;
  param->fUseTOFCorrection =kFALSE;
  param->SetName("Cosmic Flux");
  param->SetTitle("Cosmic Flux");

  return param;
}


Bool_t  AliTPCRecoParam::GetUseTimeCalibration(){ 
  //
  // get
  //
  return fgUseTimeCalibration;
}
void    AliTPCRecoParam::SetUseTimeCalibration(Bool_t useTimeCalibration) {
  //
  // set 
  //
  fgUseTimeCalibration = useTimeCalibration;
}

 AliTPCRecoParam.cxx:1
 AliTPCRecoParam.cxx:2
 AliTPCRecoParam.cxx:3
 AliTPCRecoParam.cxx:4
 AliTPCRecoParam.cxx:5
 AliTPCRecoParam.cxx:6
 AliTPCRecoParam.cxx:7
 AliTPCRecoParam.cxx:8
 AliTPCRecoParam.cxx:9
 AliTPCRecoParam.cxx:10
 AliTPCRecoParam.cxx:11
 AliTPCRecoParam.cxx:12
 AliTPCRecoParam.cxx:13
 AliTPCRecoParam.cxx:14
 AliTPCRecoParam.cxx:15
 AliTPCRecoParam.cxx:16
 AliTPCRecoParam.cxx:17
 AliTPCRecoParam.cxx:18
 AliTPCRecoParam.cxx:19
 AliTPCRecoParam.cxx:20
 AliTPCRecoParam.cxx:21
 AliTPCRecoParam.cxx:22
 AliTPCRecoParam.cxx:23
 AliTPCRecoParam.cxx:24
 AliTPCRecoParam.cxx:25
 AliTPCRecoParam.cxx:26
 AliTPCRecoParam.cxx:27
 AliTPCRecoParam.cxx:28
 AliTPCRecoParam.cxx:29
 AliTPCRecoParam.cxx:30
 AliTPCRecoParam.cxx:31
 AliTPCRecoParam.cxx:32
 AliTPCRecoParam.cxx:33
 AliTPCRecoParam.cxx:34
 AliTPCRecoParam.cxx:35
 AliTPCRecoParam.cxx:36
 AliTPCRecoParam.cxx:37
 AliTPCRecoParam.cxx:38
 AliTPCRecoParam.cxx:39
 AliTPCRecoParam.cxx:40
 AliTPCRecoParam.cxx:41
 AliTPCRecoParam.cxx:42
 AliTPCRecoParam.cxx:43
 AliTPCRecoParam.cxx:44
 AliTPCRecoParam.cxx:45
 AliTPCRecoParam.cxx:46
 AliTPCRecoParam.cxx:47
 AliTPCRecoParam.cxx:48
 AliTPCRecoParam.cxx:49
 AliTPCRecoParam.cxx:50
 AliTPCRecoParam.cxx:51
 AliTPCRecoParam.cxx:52
 AliTPCRecoParam.cxx:53
 AliTPCRecoParam.cxx:54
 AliTPCRecoParam.cxx:55
 AliTPCRecoParam.cxx:56
 AliTPCRecoParam.cxx:57
 AliTPCRecoParam.cxx:58
 AliTPCRecoParam.cxx:59
 AliTPCRecoParam.cxx:60
 AliTPCRecoParam.cxx:61
 AliTPCRecoParam.cxx:62
 AliTPCRecoParam.cxx:63
 AliTPCRecoParam.cxx:64
 AliTPCRecoParam.cxx:65
 AliTPCRecoParam.cxx:66
 AliTPCRecoParam.cxx:67
 AliTPCRecoParam.cxx:68
 AliTPCRecoParam.cxx:69
 AliTPCRecoParam.cxx:70
 AliTPCRecoParam.cxx:71
 AliTPCRecoParam.cxx:72
 AliTPCRecoParam.cxx:73
 AliTPCRecoParam.cxx:74
 AliTPCRecoParam.cxx:75
 AliTPCRecoParam.cxx:76
 AliTPCRecoParam.cxx:77
 AliTPCRecoParam.cxx:78
 AliTPCRecoParam.cxx:79
 AliTPCRecoParam.cxx:80
 AliTPCRecoParam.cxx:81
 AliTPCRecoParam.cxx:82
 AliTPCRecoParam.cxx:83
 AliTPCRecoParam.cxx:84
 AliTPCRecoParam.cxx:85
 AliTPCRecoParam.cxx:86
 AliTPCRecoParam.cxx:87
 AliTPCRecoParam.cxx:88
 AliTPCRecoParam.cxx:89
 AliTPCRecoParam.cxx:90
 AliTPCRecoParam.cxx:91
 AliTPCRecoParam.cxx:92
 AliTPCRecoParam.cxx:93
 AliTPCRecoParam.cxx:94
 AliTPCRecoParam.cxx:95
 AliTPCRecoParam.cxx:96
 AliTPCRecoParam.cxx:97
 AliTPCRecoParam.cxx:98
 AliTPCRecoParam.cxx:99
 AliTPCRecoParam.cxx:100
 AliTPCRecoParam.cxx:101
 AliTPCRecoParam.cxx:102
 AliTPCRecoParam.cxx:103
 AliTPCRecoParam.cxx:104
 AliTPCRecoParam.cxx:105
 AliTPCRecoParam.cxx:106
 AliTPCRecoParam.cxx:107
 AliTPCRecoParam.cxx:108
 AliTPCRecoParam.cxx:109
 AliTPCRecoParam.cxx:110
 AliTPCRecoParam.cxx:111
 AliTPCRecoParam.cxx:112
 AliTPCRecoParam.cxx:113
 AliTPCRecoParam.cxx:114
 AliTPCRecoParam.cxx:115
 AliTPCRecoParam.cxx:116
 AliTPCRecoParam.cxx:117
 AliTPCRecoParam.cxx:118
 AliTPCRecoParam.cxx:119
 AliTPCRecoParam.cxx:120
 AliTPCRecoParam.cxx:121
 AliTPCRecoParam.cxx:122
 AliTPCRecoParam.cxx:123
 AliTPCRecoParam.cxx:124
 AliTPCRecoParam.cxx:125
 AliTPCRecoParam.cxx:126
 AliTPCRecoParam.cxx:127
 AliTPCRecoParam.cxx:128
 AliTPCRecoParam.cxx:129
 AliTPCRecoParam.cxx:130
 AliTPCRecoParam.cxx:131
 AliTPCRecoParam.cxx:132
 AliTPCRecoParam.cxx:133
 AliTPCRecoParam.cxx:134
 AliTPCRecoParam.cxx:135
 AliTPCRecoParam.cxx:136
 AliTPCRecoParam.cxx:137
 AliTPCRecoParam.cxx:138
 AliTPCRecoParam.cxx:139
 AliTPCRecoParam.cxx:140
 AliTPCRecoParam.cxx:141
 AliTPCRecoParam.cxx:142
 AliTPCRecoParam.cxx:143
 AliTPCRecoParam.cxx:144
 AliTPCRecoParam.cxx:145
 AliTPCRecoParam.cxx:146
 AliTPCRecoParam.cxx:147
 AliTPCRecoParam.cxx:148
 AliTPCRecoParam.cxx:149
 AliTPCRecoParam.cxx:150
 AliTPCRecoParam.cxx:151
 AliTPCRecoParam.cxx:152
 AliTPCRecoParam.cxx:153
 AliTPCRecoParam.cxx:154
 AliTPCRecoParam.cxx:155
 AliTPCRecoParam.cxx:156
 AliTPCRecoParam.cxx:157
 AliTPCRecoParam.cxx:158
 AliTPCRecoParam.cxx:159
 AliTPCRecoParam.cxx:160
 AliTPCRecoParam.cxx:161
 AliTPCRecoParam.cxx:162
 AliTPCRecoParam.cxx:163
 AliTPCRecoParam.cxx:164
 AliTPCRecoParam.cxx:165
 AliTPCRecoParam.cxx:166
 AliTPCRecoParam.cxx:167
 AliTPCRecoParam.cxx:168
 AliTPCRecoParam.cxx:169
 AliTPCRecoParam.cxx:170
 AliTPCRecoParam.cxx:171
 AliTPCRecoParam.cxx:172
 AliTPCRecoParam.cxx:173
 AliTPCRecoParam.cxx:174
 AliTPCRecoParam.cxx:175
 AliTPCRecoParam.cxx:176
 AliTPCRecoParam.cxx:177
 AliTPCRecoParam.cxx:178
 AliTPCRecoParam.cxx:179
 AliTPCRecoParam.cxx:180
 AliTPCRecoParam.cxx:181
 AliTPCRecoParam.cxx:182
 AliTPCRecoParam.cxx:183
 AliTPCRecoParam.cxx:184
 AliTPCRecoParam.cxx:185
 AliTPCRecoParam.cxx:186
 AliTPCRecoParam.cxx:187
 AliTPCRecoParam.cxx:188
 AliTPCRecoParam.cxx:189
 AliTPCRecoParam.cxx:190
 AliTPCRecoParam.cxx:191
 AliTPCRecoParam.cxx:192
 AliTPCRecoParam.cxx:193
 AliTPCRecoParam.cxx:194
 AliTPCRecoParam.cxx:195
 AliTPCRecoParam.cxx:196
 AliTPCRecoParam.cxx:197
 AliTPCRecoParam.cxx:198
 AliTPCRecoParam.cxx:199
 AliTPCRecoParam.cxx:200
 AliTPCRecoParam.cxx:201
 AliTPCRecoParam.cxx:202
 AliTPCRecoParam.cxx:203
 AliTPCRecoParam.cxx:204
 AliTPCRecoParam.cxx:205
 AliTPCRecoParam.cxx:206
 AliTPCRecoParam.cxx:207
 AliTPCRecoParam.cxx:208
 AliTPCRecoParam.cxx:209
 AliTPCRecoParam.cxx:210
 AliTPCRecoParam.cxx:211
 AliTPCRecoParam.cxx:212
 AliTPCRecoParam.cxx:213
 AliTPCRecoParam.cxx:214
 AliTPCRecoParam.cxx:215
 AliTPCRecoParam.cxx:216
 AliTPCRecoParam.cxx:217
 AliTPCRecoParam.cxx:218
 AliTPCRecoParam.cxx:219
 AliTPCRecoParam.cxx:220
 AliTPCRecoParam.cxx:221
 AliTPCRecoParam.cxx:222
 AliTPCRecoParam.cxx:223
 AliTPCRecoParam.cxx:224
 AliTPCRecoParam.cxx:225
 AliTPCRecoParam.cxx:226
 AliTPCRecoParam.cxx:227
 AliTPCRecoParam.cxx:228
 AliTPCRecoParam.cxx:229
 AliTPCRecoParam.cxx:230
 AliTPCRecoParam.cxx:231
 AliTPCRecoParam.cxx:232
 AliTPCRecoParam.cxx:233
 AliTPCRecoParam.cxx:234
 AliTPCRecoParam.cxx:235
 AliTPCRecoParam.cxx:236
 AliTPCRecoParam.cxx:237
 AliTPCRecoParam.cxx:238
 AliTPCRecoParam.cxx:239
 AliTPCRecoParam.cxx:240
 AliTPCRecoParam.cxx:241
 AliTPCRecoParam.cxx:242
 AliTPCRecoParam.cxx:243
 AliTPCRecoParam.cxx:244
 AliTPCRecoParam.cxx:245
 AliTPCRecoParam.cxx:246
 AliTPCRecoParam.cxx:247
 AliTPCRecoParam.cxx:248
 AliTPCRecoParam.cxx:249
 AliTPCRecoParam.cxx:250
 AliTPCRecoParam.cxx:251
 AliTPCRecoParam.cxx:252
 AliTPCRecoParam.cxx:253
 AliTPCRecoParam.cxx:254
 AliTPCRecoParam.cxx:255
 AliTPCRecoParam.cxx:256
 AliTPCRecoParam.cxx:257
 AliTPCRecoParam.cxx:258
 AliTPCRecoParam.cxx:259
 AliTPCRecoParam.cxx:260
 AliTPCRecoParam.cxx:261
 AliTPCRecoParam.cxx:262
 AliTPCRecoParam.cxx:263
 AliTPCRecoParam.cxx:264
 AliTPCRecoParam.cxx:265
 AliTPCRecoParam.cxx:266