]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding Convention Violations
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2005 03:31:22 +0000 (03:31 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Apr 2005 03:31:22 +0000 (03:31 +0000)
STEER/AliExternalTrackParam.cxx
STEER/AliTrackParam.cxx
STEER/AliTrackParam.h

index ed02c3a39a2174135ab61f5348088f24f4e15c61..c5ae4d05367231b77645fdb1297ecba1efb7c3c1 100644 (file)
@@ -33,6 +33,8 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <TMath.h>
+#include <TVector3.h>
 
 #include "AliExternalTrackParam.h"
 #include "AliKalmanTrack.h"
index cf9ae3155d56a8ee331b0f584089dc57f13203c1..996e661dd39b872cf6609baa5a7e1cb65d7be2b5 100644 (file)
 
 /* $Id$ */
 
+#include <TVector3.h>
+#include <TMath.h>
+
+#include "AliTrackParam.h"
+#include "AliExternalTrackParam.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for fast math                                                       //
+//                                                                           //
+// Class with a table for fast calculation of the                            //
+// asins. The valuse are calculated via                                      //
+// linear interpolation. The values and the deltas are stored                //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+Double_t AliFastMath::fgFastAsin[20000];
+
+AliFastMath::AliFastMath()
+{
+  //
+  // Standard constructor
+  // Initialises the asin tables
+  //
+  for (Int_t i=0;i<10000;i++){
+    fgFastAsin[2*i] = TMath::ASin(i/10000.);
+    fgFastAsin[2*i+1] = (TMath::ASin((i+1)/10000.)-fgFastAsin[2*i]);
+  }
+}
+
+Double_t AliFastMath::FastAsin(Double_t x)
+{
+  //
+  // Fast interpolation for the Asin
+  //
+  if (x>0){
+    Int_t index = int(x*10000);
+    return fgFastAsin[2*index]+(x*10000.-index)*fgFastAsin[2*index+1];
+  } else {
+    x*=-1;
+    Int_t index = int(x*10000);
+    return -(fgFastAsin[2*index]+(x*10000.-index)*fgFastAsin[2*index+1]);
+  }
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 // base class for track parameters                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 
-#include "AliTrackParam.h"
-#include "AliExternalTrackParam.h"
-#include "AliRunLoader.h"
-#include "AliRun.h"
-#include "AliMagF.h"
-
-
-Double_t FastMath::fgFastAsin[20000];
-
-FastMath::FastMath()
-{
-  for (Int_t i=0;i<10000;i++){
-    fgFastAsin[2*i] = TMath::ASin(i/10000.);
-    fgFastAsin[2*i+1] = (TMath::ASin((i+1)/10000.)-fgFastAsin[2*i]);
-  }
-}
-
-Double_t FastMath::FastAsin(Double_t x)
-{
-  if (x>0){
-    Int_t index = int(x*10000);
-    return fgFastAsin[2*index]+(x*10000.-index)*fgFastAsin[2*index+1];
-  }
-  x*=-1;
-  Int_t index = int(x*10000);
-  return -(fgFastAsin[2*index]+(x*10000.-index)*fgFastAsin[2*index+1]);
-}
-
-FastMath gFastMath;
-
-
-
 ClassImp(AliTrackParam)
 
-
-
-
 //_____________________________________________________________________________
 Bool_t AliTrackParam::RotateAndPropagateTo(Double_t alpha, Double_t x, 
                                           Double_t* length)
index 561a9396f7a031e04831798288fe0f66f784074a..6d36395ccde760dce682da52885f66d28a1fd98d 100644 (file)
@@ -5,25 +5,34 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for fast math                                                       //
+//                                                                           //
+// Class for generic track parameters                                        //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 
 #include <TObject.h>
-#include <TVector3.h>
+class TVector3;
 
 class AliCluster;
 class AliExternalTrackParam;
 
 
-class FastMath {
+class AliFastMath {
 public:
-  FastMath();  
+  AliFastMath();  
   static Double_t FastAsin(Double_t x);   
  private: 
-  static Double_t fgFastAsin[20000];
+  static Double_t fgFastAsin[20000];  //Array to contain the asin values
 };
 
 
 class AliTrackParam: public TObject {
- public:
+public:
+  virtual ~AliTrackParam() {}
   virtual const Double_t* GetParameter() const = 0;
   virtual const Double_t* GetCovariance() const = 0;
   virtual Double_t     X() const = 0;