]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDv1.cxx
Geometry transformed into new coordinate system (test version).
[u/mrichter/AliRoot.git] / PMD / AliPMDv1.cxx
index 6da118ba7dfeb4f3ec40689c6896e788bb698dc2..abc20aca21025a331238ef13439f831f0bf01316 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/*
-$Log$
-Revision 1.16  2001/05/21 17:44:04  hristov
-Backslash to continue strings
-
-Revision 1.15  2001/05/21 10:59:49  morsch
-Lost changes from revision 1.13 recovered.
-
-Revision 1.14  2001/05/21 09:39:28  morsch
-Minor modifications on the geometry. (Tapan Nayak)
-
-Revision 1.13  2001/05/16 14:57:19  alibrary
-New files for folders and Stack
 
-Revision 1.12  2001/05/14 14:01:04  morsch
-AliPMDv0 coarse geometry and AliPMDv1 detailed simulation, completely revised versions by Tapan Nayak.
+/* $Id$ */
 
-*/
 //
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -44,12 +29,14 @@ AliPMDv0 coarse geometry and AliPMDv1 detailed simulation, completely revised ve
 ///////////////////////////////////////////////////////////////////////////////
 ////
 
-#include "AliPMDv1.h"
-#include "AliRun.h"
-#include "AliMC.h" 
+#include "Riostream.h"
+
+#include <TVirtualMC.h>
+
 #include "AliConst.h" 
 #include "AliMagF.h" 
-#include "Riostream.h"
+#include "AliPMDv1.h"
+#include "AliRun.h"
  
 static Int_t   kdet, ncell_sm, ncell_hole;
 static Float_t zdist, zdist1;
@@ -217,7 +204,7 @@ void AliPMDv1::CreateSupermodule()
 
   // --- place  inner hex inside outer hex 
 
-  gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
+  gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
 
 // Rhombus shaped supermodules (defined by PARA) 
 
@@ -271,7 +258,7 @@ void AliPMDv1::CreateSupermodule()
     }
     for (i = 1; i <= ncell_sm; ++i) {
       number = i+(j-1)*ncell_sm;
-      gMC->Gsposp("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+      gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
       xb += (hexd1[6]*2.);
     }
     xrow = xrow+1;
@@ -348,7 +335,7 @@ void AliPMDv1::CreateSupermodule()
     }
     for (i = 1; i <= ncell_sm; ++i) {
       number = i+(j-1)*ncell_sm;
-         gMC->Gsposp("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+         gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
       xb += (hexd1[6]*2.);
     }
     xrow = xrow+1;
@@ -425,7 +412,7 @@ void AliPMDv1::CreateSupermodule()
     }
     for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
       number = i+(j-1)*(ncell_sm - ncell_hole);
-         gMC->Gsposp("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+      gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
       xb += (hexd1[6]*2.);
     }
     xrow = xrow+1;
@@ -717,16 +704,16 @@ void AliPMDv1::CreatePMD()
   num_mod=0;
   for (j=0; j<3; ++j)
     {
-      gMC->Gsposp("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY", Al_rod, 3);
+      gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
       x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
       y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
 
-      gMC->Gsposp("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY", dpara_emm2, 6);
+      gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
 
       x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
       y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
 
-      gMC->Gsposp("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY", dpara_emm3, 6);
+      gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
 
       for (i=1; i<9; ++i)
        {
@@ -741,7 +728,7 @@ void AliPMDv1::CreatePMD()
          if(fDebug) 
              printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
 
-         gMC->Gsposp("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
+         gMC->Gspos("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
 
        }
     }
@@ -854,7 +841,7 @@ void AliPMDv1::CreateMaterials()
  
   //   define gas-mixtures 
   
-  char namate[21];
+  char namate[21]="";
   gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
   ag[1] = a;
   zg[1] = z;
@@ -1007,7 +994,7 @@ void AliPMDv1::StepManager()
 
     gMC->Gdtom(center,hits,1);
     hits[3] = destep*1e9; //Number in eV
-    AddHit(gAlice->CurrentTrack(), vol, hits);
+    AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
   }
 }
 
@@ -1053,3 +1040,4 @@ void AliPMDv1::GetParameters()
 
 
 
+