LCOV - code coverage report
Current view: top level - TPC/TPCbase - AliTPCRecoParam.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 95 171 55.6 %
Date: 2016-06-14 17:26:59 Functions: 8 17 47.1 %

          Line data    Source code
       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             : /// \class AliTPCRecoParam
      18             : /// \brief Class with TPC reconstruction parameters
      19             : ///
      20             : /// The reconstruction parameters are used in the AliTPCclusterer and AliTPCtracker
      21             : ///
      22             : /// They are retrieved:
      23             : /// 0. User speciefied it in reconstruction macro
      24             : /// 1. if (not 0) from OCDB  - AliTPCcalibDB::GetRecoParam(eventtype)
      25             : /// 2. if (not 0 or 1) default parameter - High flux enevironment used
      26             : ///
      27             : /// Setting for systematic errors addition:
      28             : /// [0] - systematic RMSY
      29             : /// [1] - systematic RMSZ
      30             : /// [2] - systematic RMSSNP
      31             : /// [3] - systematic RMSTheta
      32             : /// [4] - systematic RMSCuravture -  systematic error in 1/cm not in 1/pt
      33             : ///
      34             : /// How to add it example - 3 mm systematic error y, 3 cm systematic error z (drift)
      35             : /// ~~~{.cxx}
      36             : /// Double_t sysError[5]={0.3,3, 0.3/150., 3./150.,0.3/(150*150.)}
      37             : /// param->SetSystematicError(sysError);
      38             : /// ~~~
      39             : 
      40             : 
      41             : #include "AliTPCRecoParam.h"
      42             : #include "AliLumiTools.h"
      43             : 
      44             : /// \cond CLASSIMP
      45          24 : ClassImp(AliTPCRecoParam)
      46             : /// \endcond
      47             : 
      48             : TVectorD* AliTPCRecoParam::fgSystErrClustCustom = 0;  // normally will be set as AliTPCReconstructor::SetSystematicErrorCluster alias
      49             : TVectorD* AliTPCRecoParam::fgPrimaryDCACut = 0;       // normally will be set as AliTPCReconstructor::SetPrimaryDCACut alias
      50             : 
      51             : Bool_t AliTPCRecoParam::fgUseTimeCalibration=kTRUE; // flag usage the time dependent calibration
      52             :                                       // to be switched off for pass 0 reconstruction
      53             :                                       // Use static function, other option will be to use
      54             :                                       // additional specific storage ?
      55             : 
      56             : //_____________________________________________________________________________
      57             : AliTPCRecoParam::AliTPCRecoParam():
      58          14 :   AliDetectorRecoParam(),
      59          14 :   fUseHLTClusters(4),  // use HLTorRAW data
      60          14 :   fUseHLTPreSeeding(0), // no pre-seeding for now
      61          14 :   fBClusterSharing(kTRUE),
      62          14 :   fCtgRange(1.05),
      63          14 :   fMaxSnpTracker(0.95),
      64          14 :   fMaxSnpTrack(0.999),
      65          14 :   fUseOuterDetectors(kFALSE),
      66          14 :   fMaxChi2TPCTRD(36),     // maximal allowed chi2 between the TRD in and TPC out to be accepted for refit
      67          14 :   fMaxChi2TPCITS(36),     // maximal allowed chi2 between the ITS in and TPC out to be accepted for backpropagation
      68          14 :   fUseOulierClusterFilter(0),  // swith to use outlier cluster filter
      69          14 :   fDumpSignal(kFALSE),
      70          14 :   fFirstBin(0),
      71          14 :   fLastBin(-1),
      72          14 :   fBCalcPedestal(kFALSE),
      73          14 :   fBDoUnfold(kTRUE),
      74          14 :   fDumpAmplitudeMin(100),
      75          14 :   fMaxNoise(2.),
      76             :   //
      77          14 :   fUseOnePadCluster(kTRUE),
      78          14 :   fUseHLTOnePadCluster(kFALSE),
      79          14 :   fMinMaxCutAbs(4.),
      80          14 :   fMinLeftRightCutAbs(6.),
      81          14 :   fMinUpDownCutAbs(6.),
      82             :   //
      83          14 :   fMinMaxCutSigma(4.),
      84          14 :   fMinLeftRightCutSigma(7.),
      85          14 :   fMinUpDownCutSigma(8.),
      86          14 :   fMaxC(0.3),
      87          14 :   fBSpecialSeeding(kFALSE),
      88          14 :   fBKinkFinder(kTRUE),
      89          14 :   fLastSeedRowSec(120),
      90          14 :   fSeedGapPrim(6),
      91          14 :   fSeedGapSec(6),
      92          14 :   fUseFieldCorrection(0),      // use field correction
      93          14 :   fUseComposedCorrection(kFALSE),      // use field correction
      94          14 :   fUseRPHICorrection(0),      // use rphi correction
      95          14 :   fUseRadialCorrection(0),    // use radial correction
      96          14 :   fUseQuadrantAlignment(0),   // use quadrant alignment
      97          14 :   fUseSectorAlignment(0),     // use sector alignment
      98          14 :   fUseDriftCorrectionTime(1), // use drift correction time
      99          14 :   fUseDriftCorrectionGY(1),   // use drif correction global y
     100          14 :   fUseGainCorrectionTime(0),  // use gain correction time
     101          14 :   fUseExBCorrection(1),  // use ExB correction
     102          14 :   fUseMultiplicityCorrectionDedx(kTRUE), // use Dedx multiplicity correction
     103          14 :   fUseAlignmentTime(kTRUE),              // use time dependent alignment correction
     104          14 :   fUseIonTailCorrection(0),   // no ion tail correction for now
     105          14 :   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
     106          14 :   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
     107             :  //
     108          14 :   fUseTotCharge(kTRUE),          // switch use total or max charge
     109          14 :   fMinFraction(0.01),           // truncated mean - lower threshold
     110          14 :   fMaxFaction(0.7),            // truncated mean - upper threshold
     111          14 :   fNeighborRowsDedx(2),           // neighbour rows for below threshold dEdx calculation
     112          14 :   fGainCorrectionHVandPTMode(0), // switch for the usage of GainCorrectionHVandPT (see AliTPCcalibDB::GetGainCorrectionHVandPT
     113          14 :   fAccountDistortions(kFALSE),
     114          14 :   fSkipTimeBins(5),              // number of time bins to be skiiped (corrupted signal druing gating opening)
     115          14 :   fUseTOFCorrection(kTRUE),
     116          14 :   fUseCorrectionMap(kFALSE),
     117          14 :   fCorrMapTimeDepMethod(kCorrMapInterpolation),
     118          14 :   fUseLumiType(AliLumiTools::kLumiCTP),
     119          14 :   fSystErrClInnerRegZ(0),
     120          14 :   fSystErrClInnerRegZSigInv(0),
     121          14 :   fUseSystematicCorrelation(kTRUE)
     122          70 : {
     123             :   /// constructor
     124             : 
     125          14 :   SetName("TPC");
     126          14 :   SetTitle("TPC");
     127         168 :   for (Int_t i=0;i<5;i++) fSystematicErrors[i]=0;
     128             :   // systematic error parameterization at INNER wall of the TPC
     129          14 :   fSystematicErrorClusterInner[0]=0.5;   // 0.5 cm
     130          14 :   fSystematicErrorClusterInner[1]=5;     // 5 cm slope
     131             :   //
     132          14 :   fSystematicErrorCluster[0]=0;   // sy cluster error
     133          14 :   fSystematicErrorCluster[1]=0;   // sz cluster error
     134             :   //
     135          14 :   fDistortionFractionAsErrorYZ[0] = 0.1; // fraction of used distortion correction is used as an error
     136          14 :   fDistortionFractionAsErrorYZ[1] = 0.1; // fraction of used distortion correction is used as an error
     137             : 
     138          14 :   fDistDispFractionAsErrorYZ[0] = 1.0; // fraction of used distortion correction is used as an error
     139          14 :   fDistDispFractionAsErrorYZ[1] = 1.0; // fraction of used distortion correction is used as an error
     140             :   //
     141          14 :   fCutSharedClusters[0]=0.5; // maximal allowed fraction of shared clusters - shorter track
     142          14 :   fCutSharedClusters[1]=0.25; // maximal allowed fraction of shared clusters - longer  track
     143          14 :   fClusterMaxRange[0]=1;     // y - pad      range
     144          14 :   fClusterMaxRange[1]=1;     // z - time bin range
     145          14 :   fKinkAngleCutChi2[0]=9;    // angular cut for kink finder - to create a kink
     146             :                              // ~ about 5 % rate  for high pt kink finder
     147          14 :   fKinkAngleCutChi2[1]=12;    // angular cut for kink finder - to use the partial track                             // form kink
     148             :                              // ~ about 2 % rate  for high pt kink finder
     149             :   //
     150          14 :   SetBadPadMaxDistXYZ(999.,999.,999.); // by default accept any distortions
     151          14 :   SetBadPadMaxErrYZ(999.,999.);        // by default accept any errors
     152          28 : }
     153             : 
     154             : //_____________________________________________________________________________
     155           0 : AliTPCRecoParam::AliTPCRecoParam(const AliTPCRecoParam& src)
     156           0 : {
     157             :   // copy c-tor
     158           0 :   memcpy(this,&src,sizeof(AliTPCRecoParam)); // make 1st a shallow copy
     159             :   // 
     160             :   // now treat the pointers
     161           0 :   if (fSystErrClInnerRegZ)       fSystErrClInnerRegZ       = new TVectorF(*fSystErrClInnerRegZ);
     162           0 :   if (fSystErrClInnerRegZSigInv) fSystErrClInnerRegZSigInv = new TVectorF(*fSystErrClInnerRegZSigInv);
     163           0 : }
     164             : 
     165             : //_____________________________________________________________________________
     166             : AliTPCRecoParam& AliTPCRecoParam::operator=(const AliTPCRecoParam& src)
     167             : {
     168             :   // assignment operator
     169           0 :   if (this!=&src) {
     170           0 :     if (fSystErrClInnerRegZ) delete fSystErrClInnerRegZ;
     171           0 :     if (fSystErrClInnerRegZSigInv) delete fSystErrClInnerRegZSigInv;
     172           0 :     memcpy(this,&src,sizeof(AliTPCRecoParam)); // make 1st a shallow copy
     173             :     // now treat the pointers
     174           0 :     if (fSystErrClInnerRegZ)       fSystErrClInnerRegZ       = new TVectorF(*fSystErrClInnerRegZ);
     175           0 :     if (fSystErrClInnerRegZSigInv) fSystErrClInnerRegZSigInv = new TVectorF(*fSystErrClInnerRegZSigInv);
     176             :   }
     177           0 :   return *this;
     178           0 : }
     179             : 
     180             : //_____________________________________________________________________________
     181             : AliTPCRecoParam::~AliTPCRecoParam()
     182          48 : {
     183             :   /// destructor
     184           8 :   delete fSystErrClInnerRegZ;
     185           8 :   delete fSystErrClInnerRegZSigInv;
     186          24 : }
     187             : 
     188             : void AliTPCRecoParam::Print(const Option_t* /*option*/) const{
     189             :   ///
     190             : 
     191           0 :   AliTPCRecoParam::Dump();
     192           0 :   printf("Systematic errors:\n");
     193           0 :   const char * cherrs[5]={"sy=","sz=","ssnp=","stheta=","s1pt="};
     194           0 :   for (Int_t i=0; i<5; i++){
     195           0 :     printf("%s%f\n",cherrs[i],fSystematicErrors[i]);
     196             :   }
     197           0 : }
     198             : 
     199             : 
     200             : AliTPCRecoParam *AliTPCRecoParam::GetLowFluxParam(){
     201             :   /// make default reconstruction  parameters for low  flux env.
     202             : 
     203           4 :   AliTPCRecoParam *param = new AliTPCRecoParam;
     204           2 :   param->fCtgRange = 10;
     205           2 :   param->fFirstBin = 0;
     206           2 :   param->fLastBin  = 1000;
     207           2 :   param->SetName("Low Flux");
     208           2 :   param->SetTitle("Low Flux");
     209           2 :   return param;
     210           0 : }
     211             : 
     212             : AliTPCRecoParam *AliTPCRecoParam::GetHighFluxParam(){
     213             :   /// make reco parameters for high flux env.
     214             : 
     215           0 :   AliTPCRecoParam *param = new AliTPCRecoParam;
     216           0 :   param->fCtgRange = 1.05;
     217           0 :   param->fFirstBin = 0;
     218           0 :   param->fLastBin  = 1000;
     219           0 :   param->fUseTotCharge=kFALSE;
     220           0 :   param->SetName("High Flux");
     221           0 :   param->SetTitle("High Flux");
     222           0 :   return param;
     223           0 : }
     224             : 
     225             : AliTPCRecoParam *AliTPCRecoParam::GetHLTParam(){
     226             :   /// make reco parameters for high flux env.
     227             : 
     228           0 :   AliTPCRecoParam *param = new AliTPCRecoParam;
     229           0 :   param->fCtgRange = 1.05;
     230           0 :   param->fFirstBin = 80;
     231           0 :   param->fLastBin  = 1000;
     232           0 :   param->fMaxSnpTracker = 0.9;
     233           0 :   param->fMaxC          = 0.06;
     234             :   //
     235           0 :   param->SetName("Hlt Param");
     236           0 :   param->SetTitle("Hlt Param");
     237           0 :   param->fBKinkFinder   = kFALSE;
     238           0 :   return param;
     239           0 : }
     240             : 
     241             : AliTPCRecoParam *AliTPCRecoParam::GetLaserTestParam(Bool_t bPedestal){
     242             :   /// special setting for laser
     243             : 
     244           0 :   AliTPCRecoParam *param = new AliTPCRecoParam;
     245           0 :   param->fDumpSignal=kTRUE;
     246           0 :   param->fCtgRange = 10.05;
     247           0 :   param->fFirstBin = 0;
     248           0 :   param->fLastBin  = 1000;
     249           0 :   param->fBCalcPedestal = bPedestal;
     250           0 :   param->fBDoUnfold     = kFALSE;
     251           0 :   param->fDumpAmplitudeMin = 150;
     252           0 :   param->fBKinkFinder   = kFALSE;
     253           0 :   param->fMaxSnpTracker = 0.98;
     254           0 :   param->fMaxC          = 0.02;
     255           0 :   param->fBSpecialSeeding = kTRUE;
     256           0 :   param->fUseTOFCorrection=kFALSE;
     257           0 :   param->fUseHLTClusters=1; // always RAW data
     258             :   //
     259             :   //
     260           0 :   param->SetName("Laser Flux");
     261           0 :   param->SetTitle("Laser Flux");
     262           0 :   return param;
     263           0 : }
     264             : 
     265             : AliTPCRecoParam *AliTPCRecoParam::GetCosmicTestParam(Bool_t bPedestal){
     266             :   /// special setting for cosmic
     267             : 
     268           0 :   AliTPCRecoParam *param = new AliTPCRecoParam;
     269           0 :   param->fDumpSignal=kTRUE;
     270           0 :   param->fCtgRange = 10.05;    // full TPC
     271           0 :   param->fFirstBin = 60;
     272           0 :   param->fLastBin  = 1000;
     273           0 :   param->fBCalcPedestal = bPedestal;
     274           0 :   param->fBDoUnfold     = kFALSE;
     275           0 :   param->fBSpecialSeeding = kTRUE;
     276           0 :   param->fMaxC          = 0.07;
     277           0 :   param->fBKinkFinder   = kFALSE;
     278           0 :   param->fUseTOFCorrection =kFALSE;
     279           0 :   param->SetName("Cosmic Flux");
     280           0 :   param->SetTitle("Cosmic Flux");
     281             : 
     282           0 :   return param;
     283           0 : }
     284             : 
     285             : 
     286             : Bool_t  AliTPCRecoParam::GetUseTimeCalibration(){
     287             :   /// get
     288             : 
     289      259792 :   return fgUseTimeCalibration;
     290             : }
     291             : void    AliTPCRecoParam::SetUseTimeCalibration(Bool_t useTimeCalibration) {
     292             :   /// set
     293             : 
     294           0 :   fgUseTimeCalibration = useTimeCalibration;
     295           0 : }
     296             : 

Generated by: LCOV version 1.11