]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsegmentationSSD.cxx
fRefVolumeId for reference volume identification added.
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSSD.cxx
index 38347a5c1c6ef3fd153d2487707ffecf127b3562..95e20d00c0b149cc644eb7db1f2dbd539b4edef7 100644 (file)
  **************************************************************************/
 /*
 $Log$
+Revision 1.15  2001/05/16 14:57:16  alibrary
+New files for folders and Stack
+
+Revision 1.14  2001/05/14 06:21:49  barbera
+Some unuseful printout commented
+
+Revision 1.13  2001/05/14 05:44:11  barbera
+Version 1.11 reput in place to avoid problem with reconstruction
+
+Revision 1.11  2001/05/03 16:12:37  nilsen
+Fixed up LocalToDet, DetToLocal, GetCrossing, GetPadTxz to work with different
+angles in layer 5 and 6.
+
+Revision 1.10  2001/05/01 22:42:22  nilsen
+Update of SSD simulation and reconstruction code by Boris and Enrico.
+
 Revision 1.9  2001/04/27 14:16:50  nilsen
 Remove dead and/or unused code and printout lines. i.e. cleaned it up a bit.
 
@@ -21,9 +37,11 @@ Remove dead and/or unused code and printout lines. i.e. cleaned it up a bit.
 
 #include <TMath.h>
 #include <TF1.h>
-#include <iostream.h>
+#include <Riostream.h>
 #include "AliITSsegmentationSSD.h"
 #include "AliITSgeom.h"
+#include "AliRun.h"
+#include "AliModule.h"
 
 ClassImp(AliITSsegmentationSSD)
 AliITSsegmentationSSD::AliITSsegmentationSSD(){
@@ -121,8 +139,10 @@ void AliITSsegmentationSSD::GetPadTxz(Float_t &x,Float_t &z){
                      |0/
     // expects x, z in microns
     */
-    Float_t tanP = TMath::Tan(fStereoP);
-    Float_t tanN = TMath::Tan(-fStereoN);
+    Float_t StereoP, StereoN;
+    Angles(StereoP,StereoN);
+    Float_t tanP = TMath::Tan(StereoP);
+    Float_t tanN = TMath::Tan(-StereoN);
     Float_t x1 = x;
     Float_t z1 = z;
     x1 += fDx/2;
@@ -193,7 +213,7 @@ void AliITSsegmentationSSD::GetPadCxz(Int_t iP,Int_t iN,Float_t &x,Float_t &z){
     z = (Dz*kN-xP+xN)/(kP+kN); 
     x -= Dx/2;
     z -= Dz/2;
-    if(TMath::Abs(z) > Dz/2) cout<<"Warning, wrong z local ="<<z<<endl; 
+    //if(TMath::Abs(z) > Dz/2) cout<<"Warning, wrong z local ="<<z<<endl; 
     // Check that zL is inside the detector for the 
     // correspondent xP and xN coordinates
 
@@ -269,6 +289,8 @@ void AliITSsegmentationSSD::DetToLocal(Int_t ix,Int_t iPN,
     const Double_t kconst = 1.0E-04; // convert microns to cm.
     Float_t flag=kconst*Dx(); // error value
     Double_t th=0.0,dx,dz,i,a,b=0.0,xb[4],zb[4];
+    Float_t StereoP, StereoN;
+    Angles(StereoP,StereoN);
 
     z = 0.0;  // Strip center in z.
     if(iPN<0 || iPN>1){// if error return full detector size in x.
@@ -284,10 +306,10 @@ void AliITSsegmentationSSD::DetToLocal(Int_t ix,Int_t iPN,
     dz = 0.5*kconst*Dz();    // half distance in z in cm
     a  = kconst*Dpx(ix)*(i+0.5)-dx; // Min x value.
     if(iPN==0){ //P-side angle defined backwards.
-       th = TMath::Tan(fStereoP); 
+       th = TMath::Tan(StereoP); 
        b  = dz*th;
     }else if(iPN==1){ // N-side
-        th = TMath::Tan(-fStereoN);
+        th = TMath::Tan(-StereoN);
         b  = -dz*th;
     } // end if
     // compute average/center position of the strip.
@@ -337,9 +359,11 @@ Bool_t AliITSsegmentationSSD::GetCrossing(Int_t iP,Int_t iN,
     */
     const Double_t kconst = 1.0E-04; // convert microns to cm.
     Double_t thp,thn,th,dx,dz,p,ip,in;
+    Float_t StereoP, StereoN;
+    Angles(StereoP,StereoN);
     
-    thp = TMath::Tan(fStereoP);
-    thn = TMath::Tan(-fStereoN);
+    thp = TMath::Tan(StereoP);
+    thn = TMath::Tan(-StereoN);
     th  = thp-thn;
     if(th==0.0) { // parall strips then never cross.
        x = 0.0;