]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Moved all the constants from AliL3Defs.h to static AliL3Transform. No
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 May 2002 15:46:52 +0000 (15:46 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 May 2002 15:46:52 +0000 (15:46 +0000)
longer need for AliL3Defs.h, and it has therefore been removed.

HLT/src/AliL3Defs.h [deleted file]
HLT/src/AliL3Track.cxx
HLT/src/AliL3Transform.cxx
HLT/src/AliL3Transform.h

diff --git a/HLT/src/AliL3Defs.h b/HLT/src/AliL3Defs.h
deleted file mode 100644 (file)
index 59f919e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _ALIL3DEFS_H_
-#define _ALIL3DEFS_H_
-
-#include "AliL3RootTypes.h"
-
-const Int_t NPatches = 6;
-const Int_t NRowsSlice = 176;
-const Int_t NRows[6][2] = {{0,31},{32,63},{64,91},{92,119},{120,143},{144,175}};
-const Int_t NumRows[6] = {32,32,28,28,24,32};
-const Double_t Pi = 3.14159265358979323846;
-const Double_t ToRad = Pi/180.;
-const Int_t MaxNPads = 256;
-const Int_t MaxNTimeBins = 512;
-
-#endif /* _ALIL3DEFS_H_ */
index e8d908e2ada52ef47d1b274f143b35ecbc8ffe4c..10737eec8f730d6d034db69f803a9bac40834124 100644 (file)
@@ -218,12 +218,12 @@ Bool_t AliL3Track::GetCrossingPoint(Int_t padrow,Float_t *xyz)
   
   Double_t yHit = xyz[1];
   Double_t angle1 = atan2((yHit - GetCenterY()),(xHit - GetCenterX()));
-  if(angle1 < 0) angle1 += 2.*Pi;
+  if(angle1 < 0) angle1 += 2.*AliL3Transform::Pi();
   Double_t angle2 = atan2((GetFirstPointY() - GetCenterY()),(GetFirstPointX() - GetCenterX()));
-  if(angle2 < 0) angle2 += 2.*Pi;
+  if(angle2 < 0) angle2 += 2.*AliL3Transform::Pi();
   Double_t diff_angle = angle1 - angle2;
-  diff_angle = fmod(diff_angle,2*Pi);
-  if((GetCharge()*diff_angle) > 0) diff_angle = diff_angle - GetCharge()*2.*Pi;
+  diff_angle = fmod(diff_angle,2*AliL3Transform::Pi());
+  if((GetCharge()*diff_angle) > 0) diff_angle = diff_angle - GetCharge()*2.*AliL3Transform::Pi();
   Double_t s_tot = fabs(diff_angle)*GetRadius();
   Double_t zHit = GetFirstPointZ() + s_tot*GetTgl();
   xyz[2] = zHit;
@@ -233,7 +233,7 @@ Bool_t AliL3Track::GetCrossingPoint(Int_t padrow,Float_t *xyz)
 
 
 Bool_t AliL3Track::CalculateReferencePoint(Double_t angle,Double_t radius){
-  // Global coordinate: crossing point with y = ax+ b; a=tan(angle-Pi/2);
+  // Global coordinate: crossing point with y = ax+ b; a=tan(angle-AliL3Transform::Pi()/2);
   //
   const Double_t rr=radius;//132; //position of referece plane
   const Double_t xr = cos(angle) *rr;
@@ -409,15 +409,15 @@ void AliL3Track::GetClosestPoint(AliL3Vertex *vertex,Double_t &closest_x,Double_
   
   //Get the z coordinate:
   Double_t angle1 = atan2((closest_y-GetCenterY()),(closest_x-GetCenterX()));
-  if(angle1 < 0) angle1 = angle1 + 2*Pi;
+  if(angle1 < 0) angle1 = angle1 + 2*AliL3Transform::Pi();
  
   Double_t angle2 = atan2((GetFirstPointY()-GetCenterY()),(GetFirstPointX()-GetCenterX()));
-  if(angle2 < 0) angle2 = angle2 + 2*Pi;
+  if(angle2 < 0) angle2 = angle2 + 2*AliL3Transform::Pi();
   
   Double_t diff_angle = angle1 - angle2;
-  diff_angle = fmod(diff_angle,2*Pi);
+  diff_angle = fmod(diff_angle,2*AliL3Transform::Pi());
   
-  if((GetCharge()*diff_angle) < 0) diff_angle = diff_angle + GetCharge()*2*Pi;
+  if((GetCharge()*diff_angle) < 0) diff_angle = diff_angle + GetCharge()*2*AliL3Transform::Pi();
   Double_t s_tot = fabs(diff_angle)*GetRadius();
   
   closest_z = GetFirstPointZ() - s_tot*GetTgl();
index bd6c4fd376b59aaa876c5a309a9d6cdd75a9506b..daa933d4dc00f5f29e756e066e3af6d9144a94b7 100644 (file)
@@ -52,6 +52,9 @@ Int_t AliL3Transform::fNSlice = 36 ;
 Int_t AliL3Transform::fNRow = 176 ;
 Double_t AliL3Transform::fNRotShift = 0.5 ;
 Double_t AliL3Transform::fPi = 3.141592653589793 ;
+Int_t AliL3Transform::fNPatches = 6;
+Int_t AliL3Transform::fRows[6][2] = {{0,31},{32,63},{64,91},{92,119},{120,143},{144,175}};
+Int_t AliL3Transform::fNRows[6] = {32,32,28,28,24,32};
 Double_t AliL3Transform::fX[176] = {84.570007324218750,
                                     85.320007324218750,
                                     86.070007324218750,
index 0ec7810d16a24c5b6577b2c7dfbd848c37335f9d..18ade80f993aed33619bdb027edbaa0ebacf19b9 100644 (file)
@@ -27,13 +27,21 @@ class AliL3Transform {
   static Int_t fNPads[176]; //fill this following Init
   static Double_t fX[176];  //fill this following Init
   static Int_t fVersion; //flags which version one is using
+  static Int_t fRows[6][2];
+  static Int_t fNRows[6];
+  static Int_t fNPatches;
 
  public:
   
   static void Init(const Char_t* path); //new init for all AliRoot versions
   
   static void SetBField(Double_t f) {fBField = f;}
+  static Int_t GetFirstRow(Int_t patch) {return fRows[patch][0];}
+  static Int_t GetLastRow(Int_t patch) {return fRows[patch][1];}
+  static Int_t GetNRows(Int_t patch) {return fNRows[patch];}
+  static Int_t GetNPatches() {return fNPatches;}
   static Double_t GetBField() {return fBField;}
+  static Double_t Pi() {return fPi;}
   static Int_t GetVersion(){return fVersion;}
   static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
   static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}