]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterParam.cxx
fITSModuleIndexInfo is now copied from the AliITStrackV2 to the AliESDtrack (A. Dainese)
[u/mrichter/AliRoot.git] / ITS / AliITSClusterParam.cxx
index a52e20bcf4e8a78a22b48063714ff8f1326e82f9..c4e19c850e662573b9aa6c9c2bf721bbb4d90c12 100644 (file)
@@ -112,26 +112,40 @@ void AliITSClusterParam::GetNTeor(Int_t layer,const AliITSRecPoint* /*cl*/,
 Int_t AliITSClusterParam::GetError(Int_t layer,
                                   const AliITSRecPoint *cl,
                                   Float_t tgl,Float_t tgphitr,Float_t expQ,
-                                  Float_t &erry,Float_t &errz)
+                                  Float_t &erry,Float_t &errz,
+                                  Bool_t addMisalErr)
 {
   //
   // Calculate cluster position error
   //
+  Int_t retval=0;
   switch(AliITSReconstructor::GetRecoParam()->GetClusterErrorsParam()) {
   case 0: 
-    return GetErrorOrigRecPoint(cl,erry,errz);
+    retval = GetErrorOrigRecPoint(cl,erry,errz);
     break;
   case 1: 
-    return GetErrorParamMI(layer,cl,tgl,tgphitr,expQ,erry,errz);
+    retval = GetErrorParamMI(layer,cl,tgl,tgphitr,expQ,erry,errz);
     break;
   case 2: 
-    return GetErrorParamAngle(layer,cl,tgl,tgphitr,erry,errz);
+    retval = GetErrorParamAngle(layer,cl,tgl,tgphitr,erry,errz);
     break;
   default: 
-    return GetErrorParamMI(layer,cl,tgl,tgphitr,expQ,erry,errz);
+    retval = GetErrorParamMI(layer,cl,tgl,tgphitr,expQ,erry,errz);
     break;
   }
 
+  if(addMisalErr) {
+    // add error due to misalignment (to be improved)
+    Float_t errmisalY2 = AliITSReconstructor::GetRecoParam()->GetClusterMisalErrorY(layer)
+      *AliITSReconstructor::GetRecoParam()->GetClusterMisalErrorY(layer);
+    Float_t errmisalZ2 = AliITSReconstructor::GetRecoParam()->GetClusterMisalErrorZ(layer)
+      *AliITSReconstructor::GetRecoParam()->GetClusterMisalErrorZ(layer);
+    erry = TMath::Sqrt(erry*erry+errmisalY2);
+    errz = TMath::Sqrt(errz*errz+errmisalZ2);
+  }
+
+  return retval;
+
 }
 //--------------------------------------------------------------------------
 Int_t AliITSClusterParam::GetErrorOrigRecPoint(const AliITSRecPoint*cl,