]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Take care of B=0 in ExB effect
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Dec 2006 13:08:26 +0000 (13:08 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Dec 2006 13:08:26 +0000 (13:08 +0000)
TRD/AliTRDCommonParam.cxx
TRD/AliTRDcalibDB.cxx

index cfbb617ef1d1915ea07944293a313da2c7f2278c..da3e6b56b2e8a38274be2ecb65f3eea33d95d212 100644 (file)
@@ -63,7 +63,8 @@ void AliTRDCommonParam::Terminate()
 {
   //
   // Singleton implementation
-  // Deletes the instance of this class and sets the terminated flag, instances cannot be requested anymore
+  // Deletes the instance of this class and sets the terminated flag,
+  // instances cannot be requested anymore
   // This function can be called several times.
   //
   
index 36044fe8dcc85f40572993d1514dafa063c0e5d0..102721da5e56d5a614b06d136caf2be2cc4789f5 100644 (file)
@@ -779,16 +779,27 @@ Float_t AliTRDcalibDB::GetOmegaTau(Float_t vdrift, Float_t bz)
   Float_t p2[kNb] = { -0.008682, -0.012896, -0.016987, -0.020880, -0.024623 };
   Float_t p3[kNb] = {  0.000155,  0.000238,  0.000330,  0.000428,  0.000541 };
 
-  Int_t ib = ((Int_t) (10 * (fieldAbs - 0.15)));
-  ib       = TMath::Max(  0,ib);
-  ib       = TMath::Min(kNb,ib);
+  // No ExB if field is too small (or zero)
+  if (fieldAbs < 0.01) {
 
-  Float_t alphaL = p0[ib] 
-                 + p1[ib] * vdrift
-                 + p2[ib] * vdrift*vdrift
-                 + p3[ib] * vdrift*vdrift*vdrift;
+    return 0.0;
 
-  return TMath::Tan(fieldSgn * alphaL);
+  }
+  // Calculate ExB from parametrization
+  else {
+
+    Int_t ib = ((Int_t) (10 * (fieldAbs - 0.15)));
+    ib       = TMath::Max(  0,ib);
+    ib       = TMath::Min(kNb,ib);
+
+    Float_t alphaL = p0[ib] 
+                   + p1[ib] * vdrift
+                   + p2[ib] * vdrift*vdrift
+                   + p3[ib] * vdrift*vdrift*vdrift;
+
+    return TMath::Tan(fieldSgn * alphaL);
+
+  }
 
 }