]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDrecoParam.cxx
Updates by Ionut
[u/mrichter/AliRoot.git] / TRD / AliTRDrecoParam.cxx
index 6d9f598a2ef395217ae0e9c653488663db3c7da9..294d074d9c4a2e0261cbb6806130911ca6863226 100644 (file)
@@ -63,6 +63,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fNumberOfConfigs(3)
   ,fFlags(0)
   ,fRawStreamVersion("DEFAULT")
+  ,fdzdxXcrossFactor(0.)
   ,fMinMaxCutSigma(4.)
   ,fMinLeftRightCutSigma(8.)
   ,fClusMaxThresh(4.5)
@@ -100,6 +101,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   SetImproveTracklets();
   SetLUT();
   SetTailCancelation();
+  SetTrackletParams();
 }
 
 //______________________________________________________________
@@ -133,6 +135,7 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fNumberOfConfigs(ref.fNumberOfConfigs)
   ,fFlags(ref.fFlags)
   ,fRawStreamVersion(ref.fRawStreamVersion)
+  ,fdzdxXcrossFactor(ref.fdzdxXcrossFactor)
   ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
   ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
   ,fClusMaxThresh(ref.fClusMaxThresh)
@@ -149,6 +152,12 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
   memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
   memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
+
+  // tracklet params
+  memcpy(fdzdxCorrFactor, ref.fdzdxCorrFactor, 2*sizeof(Double_t));
+  memcpy(fdzdxCorrRCbias, ref.fdzdxCorrRCbias, 2*sizeof(Double_t));
+  memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 12*sizeof(Double_t));
+  memcpy(fS2Ycorr, ref.fS2Ycorr, 4*sizeof(Double_t));
 }
 
 //______________________________________________________________
@@ -188,6 +197,7 @@ AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
   fNumberOfConfigs      = ref.fNumberOfConfigs;
   fFlags                = ref.fFlags;
   fRawStreamVersion     = ref.fRawStreamVersion;
+  fdzdxXcrossFactor     = ref.fdzdxXcrossFactor;
   fMinMaxCutSigma       = ref.fMinMaxCutSigma;
   fMinLeftRightCutSigma = ref.fMinLeftRightCutSigma;
   fClusMaxThresh        = ref.fClusMaxThresh;
@@ -201,6 +211,12 @@ AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
   memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
   memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
   memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
+
+  // tracklet params
+  memcpy(fdzdxCorrFactor, ref.fdzdxCorrFactor, 2*sizeof(Double_t));
+  memcpy(fdzdxCorrRCbias, ref.fdzdxCorrRCbias, 2*sizeof(Double_t));
+  memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 12*sizeof(Double_t));
+  memcpy(fS2Ycorr, ref.fS2Ycorr, 4*sizeof(Double_t));
   return *this;
 }
 
@@ -322,3 +338,56 @@ void AliTRDrecoParam::SetPIDLQslices(Int_t s)
   }
 }
 
+//___________________________________________________
+void  AliTRDrecoParam::SetTrackletParams(Double_t *par)
+{
+  // Load tracklet reconstruction parameters. If none are set use defaults
+  if(par){
+    // correct dzdx for the bias in z
+    fdzdxCorrFactor[0] = par[0];  // !RC 
+    fdzdxCorrFactor[1] = par[1];  // RC
+    // correct dzdx in RC tracklets for the bias in cluster attachment
+    fdzdxCorrRCbias[0] = par[2];   // dz/dx > 0  
+    fdzdxCorrRCbias[1] = par[3];   // dz/dx < 0
+    /// correct x_cross for the bias in dzdx
+    fdzdxXcrossFactor  = par[4];
+    // y correction due to wrong tail cancellation. 
+    fYcorrTailCancel[0][0] = par[5];fYcorrTailCancel[0][1] = par[6];fYcorrTailCancel[0][2] = par[7]; 
+    fYcorrTailCancel[1][0] = par[8];fYcorrTailCancel[1][1] = par[9];fYcorrTailCancel[1][2] = par[10]; 
+    fYcorrTailCancel[2][0] = par[11];fYcorrTailCancel[2][1] = par[12];fYcorrTailCancel[2][3] = par[13];
+    fYcorrTailCancel[3][0] = par[14];fYcorrTailCancel[3][1] = par[15];fYcorrTailCancel[3][3] = par[16];
+    // inflation factor of error parameterization in r-phi due to wrong estimation of residuals. 
+    fS2Ycorr[0] = par[17];
+    fS2Ycorr[1] = par[18];
+    fS2Ycorr[2] = par[19];
+    fS2Ycorr[3] = par[20];
+    
+  } else {
+    // correct dzdx for the bias in z
+    fdzdxCorrFactor[0] = 1.09;  // !RC 
+    fdzdxCorrFactor[1] = 1.05;  // RC
+    // correct dzdx in RC tracklets for the bias in cluster attachment
+    fdzdxCorrRCbias[0] = 0.;     // dz/dx > 0  
+    fdzdxCorrRCbias[1] = -0.012; // dz/dx < 0
+    /// correct x_cross for the bias in dzdx
+    fdzdxXcrossFactor  = 0.14;
+    // y correction due to wrong tail cancellation. 
+        // bz<0 && !RC
+    fYcorrTailCancel[0][0] = 0.04; fYcorrTailCancel[0][1] = 2.151; fYcorrTailCancel[0][2] = 0.013;
+        // bz>0 && !RC
+    fYcorrTailCancel[1][0] = 0.034; fYcorrTailCancel[1][1] = 1.817; fYcorrTailCancel[1][2] = -0.01;
+        // bz<0 && RC
+    fYcorrTailCancel[2][0] = 0.04; fYcorrTailCancel[2][1] = 2.513; fYcorrTailCancel[2][2] = 0.015;
+        // bz>0 && RC
+    fYcorrTailCancel[3][0] = 0.034; fYcorrTailCancel[3][1] = 2.476; fYcorrTailCancel[3][2] = -0.01;
+    // inflation factor of error parameterization in r-phi due to wrong estimation of residuals. 
+        // chg<0 && !RC
+    fS2Ycorr[0] = 5.52; 
+        // chg>0 && !RC
+    fS2Ycorr[1] = 3.61; 
+        // chg<0 && RC
+    fS2Ycorr[2] = 4.84; 
+        // chg>0 && RC
+    fS2Ycorr[3] = 3.24; 
+  }
+}