Fix Coverity defects
[u/mrichter/AliRoot.git] / TRD / AliTRDrecoParam.cxx
index 3d869db..5348daa 100644 (file)
@@ -43,6 +43,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fkRoad1z(20.0)      
   ,fkRoad2y(3.0)
   ,fkRoad2z(20.0)
+  ,fkPtThreshold(2.0) 
   ,fkPlaneQualityThreshold(5.0)// 4.2? under Investigation
   ,fkRoadzMultiplicator(1.5)
   ,fkFindable(.333)
@@ -50,21 +51,22 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fkChi2Y(.25)
   ,fkChi2YSlope(7.73)
   ,fkChi2ZSlope(0.069)
-       ,fkChi2YCut(0.5)
+  ,fkChi2YCut(0.5)
   ,fkPhiSlope(10.6)
   ,fkNMeanClusters(20.)
   ,fkNSigmaClusters(2.)
   ,fkNClusterNoise(0.)
   ,fkNMeanTracklets(5.5)
   ,fkTrackLikelihood(-15.)
+  ,fNumberOfConfigs(3)
   ,fFlags(0)
   ,fRawStreamVersion("REAL")
-  ,fADCBaseline(0.)
   ,fMinMaxCutSigma(4.)
   ,fMinLeftRightCutSigma(8.)
   ,fClusMaxThresh(4.5)
   ,fClusSigThresh(3.5)
   ,fTCnexp(1)
+  ,fRecEveryNTB(1)
   ,fNumberOfPresamples(0)
   ,fNumberOfPostsamples(0)
 {
@@ -110,6 +112,7 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fkRoad1z(ref.fkRoad1z)      
   ,fkRoad2y(ref.fkRoad2y)
   ,fkRoad2z(ref.fkRoad2z)
+  ,fkPtThreshold(ref.fkPtThreshold) 
   ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
   ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
   ,fkFindable(ref.fkFindable)
@@ -117,21 +120,22 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fkChi2Y(ref.fkChi2Y)
   ,fkChi2YSlope(ref.fkChi2YSlope)
   ,fkChi2ZSlope(ref.fkChi2ZSlope)
-       ,fkChi2YCut(ref.fkChi2YCut)
+  ,fkChi2YCut(ref.fkChi2YCut)
   ,fkPhiSlope(ref.fkPhiSlope)
   ,fkNMeanClusters(ref.fkNMeanClusters)
   ,fkNSigmaClusters(ref.fkNSigmaClusters)
   ,fkNClusterNoise(ref.fkNClusterNoise)
   ,fkNMeanTracklets(ref.fkNMeanTracklets)
   ,fkTrackLikelihood(ref.fkTrackLikelihood)
+  ,fNumberOfConfigs(ref.fNumberOfConfigs)
   ,fFlags(ref.fFlags)
   ,fRawStreamVersion(ref.fRawStreamVersion)
-  ,fADCBaseline(ref.fADCBaseline)
   ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
   ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
   ,fClusMaxThresh(ref.fClusMaxThresh)
   ,fClusSigThresh(ref.fClusSigThresh)
   ,fTCnexp(ref.fTCnexp)
+  ,fRecEveryNTB(ref.fRecEveryNTB)
   ,fNumberOfPresamples(ref.fNumberOfPresamples)
   ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
 {
@@ -154,6 +158,20 @@ AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
   AliTRDrecoParam *rec = new AliTRDrecoParam();
   rec->fkdNchdy = 12.; // pp in TRD
   rec->SetVertexConstrained();
+  rec->SetCheckTimeConsistency();
+  return rec;
+
+}
+
+//______________________________________________________________
+AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
+{
+  //
+  // Parameters for the high flux environment in HLT
+  //
+
+  AliTRDrecoParam *rec = GetLowFluxParam();
+  rec->fNumberOfConfigs = 2;
   return rec;
 
 }
@@ -168,6 +186,20 @@ AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
   AliTRDrecoParam *rec = new AliTRDrecoParam();
   rec->fkdNchdy = 4000.; // PbPb in TRD
   rec->SetVertexConstrained();
+  rec->SetCheckTimeConsistency();
+  return rec;
+
+}
+
+//______________________________________________________________
+AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
+{
+  //
+  // Parameters for the high flux environment in HLT
+  //
+
+  AliTRDrecoParam *rec = GetHighFluxParam();
+  rec->fNumberOfConfigs = 1;
   return rec;
 
 }
@@ -191,9 +223,8 @@ AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
   par->fkNMeanClusters  = 12.89;
   par->fkNSigmaClusters = 2.095;
   par->fkRoadzMultiplicator = 3.;
-  par->fADCBaseline = 10;
   par->fStreamLevel[kTracker] = 1;
-  par->SetArgon();
+  par->SetCheckTimeConsistency();
   return par;
 
 }
@@ -208,3 +239,29 @@ Float_t AliTRDrecoParam::GetNClusters() const
   nclusters *= 1.+fkNClusterNoise;
   return nclusters;
 }
+
+//______________________________________________________________
+void AliTRDrecoParam::SetPIDLQslices(Int_t s)
+{
+// Setting number of slices used by the PID LQ method s={1, 2}
+// If PID NN is set this function will change to PID LQ.
+  if(IsPIDNeuralNetwork()){
+    AliWarning("PID set to NN. Changing to LQ.");
+    SetPIDNeuralNetwork(kFALSE);
+  } 
+
+  switch(s){
+  case 1: 
+    if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
+    break;
+  case 2:
+    SETBIT(fFlags, kLQ2D);
+    break;
+  default:
+    AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
+    SETBIT(fFlags, kLQ2D);
+    break;
+  }
+}
+