]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterParam.cxx
Update of warning/debug messages in SDD simulation
[u/mrichter/AliRoot.git] / ITS / AliITSClusterParam.cxx
index 2c247421fc4fe804bc948d86c5c7e7748f68d358..c4e19c850e662573b9aa6c9c2bf721bbb4d90c12 100644 (file)
@@ -112,7 +112,8 @@ 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
@@ -133,11 +134,15 @@ Int_t AliITSClusterParam::GetError(Int_t layer,
     break;
   }
 
-  // add error due to misalignment (to be improved)
-  Float_t errmisal2 = AliITSReconstructor::GetRecoParam()->GetClusterMisalError()
-                     *AliITSReconstructor::GetRecoParam()->GetClusterMisalError();
-  erry = TMath::Sqrt(erry*erry+errmisal2);
-  errz = TMath::Sqrt(errz*errz+errmisal2);
+  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;