]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/template.cxx
doxy: TPC/macros/data2011 converted
[u/mrichter/AliRoot.git] / TPC / template.cxx
index cc3e70f5987f6ff55d605f58477f84a9ab77acaf..2c528616c39724cb5229b2e2e658dd5140e2414b 100644 (file)
@@ -1,3 +1,5 @@
+/// \class template
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.1.2.2  2000/04/10 11:40:46  kowal2
-
-Needed for tracking
-
-*/
+/* $Id$ */
 
 static int PropagateTo(TVector &x, Double_t fX, Double_t xk) {
   if (TMath::Abs(x(2)*xk - x(3)) >= 0.999) {
@@ -28,8 +24,8 @@ static int PropagateTo(TVector &x, Double_t fX, Double_t xk) {
   }
 
   Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1;//, y1=x(0), z1=x(1);
-  Double_t c1=x(2)*x1 - x(3), r1=sqrt(1.- c1*c1);
-  Double_t c2=x(2)*x2 - x(3), r2=sqrt(1.- c2*c2);
+  Double_t c1=x(2)*x1 - x(3), r1=sqrt((1.-c1)*(1.+c1));
+  Double_t c2=x(2)*x2 - x(3), r2=sqrt((1.-c2)*(1.+c2));
   
   x(0) += dx*(c1+c2)/(r1+r2);
   x(1) += dx*(c1+c2)/(c1*r2 + c2*r1)*x(4);
@@ -44,7 +40,7 @@ static int Rotate(TVector &x, Double_t fX, Double_t alpha) {
   
   fX = x1*ca + y1*sa;
   x(0)=-x1*sa + y1*ca;
-  x(3)=x(3)*ca + (x(2)*y1 + sqrt(1.- r1*r1))*sa;
+  x(3)=x(3)*ca + (x(2)*y1 + sqrt((1.-r1)*(1.+r1)))*sa;
   
   Double_t r2=x(2)*fX - x(3);
   if (TMath::Abs(r2) >= 0.999) {
@@ -52,7 +48,7 @@ static int Rotate(TVector &x, Double_t fX, Double_t alpha) {
     return 0;
   }
   
-  Double_t y0=x(0) + sqrt(1.- r2*r2)/x(2);
+  Double_t y0=x(0) + sqrt((1.-r2)*(1.+r2))/x(2);
   if ((x(0)-y0)*x(2) >= 0.) {
     //cerr<<"Rotation failed !!!\n";
     return 0;
@@ -65,11 +61,10 @@ static int Rotate(TVector &x, Double_t fX, Double_t alpha) {
 static int templ(TVector par, Double_t x, Double_t dy, Double_t dz, 
                     const AliTPCSector *sec, int s, int rf=0) 
 {
-  //-----------------------------------------------------------------
-  // This function tries to find a track prolongation.
-  //
-  // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
-  //-----------------------------------------------------------------
+  /// This function tries to find a track prolongation.
+  ///
+  /// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+
   int accepted=0;
   const int ROWS_TO_SKIP=100;
   int try_again=ROWS_TO_SKIP;