]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliHALL.cxx
Adding extra check for GPU_FORCE_64BIT_PTR env var
[u/mrichter/AliRoot.git] / STRUCT / AliHALL.cxx
index 2c6012ad639e269e89f7890ba5b7b73f660348ca..3b7a229479ef5b41fe1ffe30c768c2f83291ce27 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.7  2000/01/12 15:33:28  morsch
-Muon filter removed
-
-Revision 1.6  1999/09/29 09:24:30  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -44,9 +36,15 @@ Introduction of the Copyright and cvs Log
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <TGeoGlobalMagField.h>
+#include <TVirtualMC.h>
+#include <TArrayI.h>
+
+#include "AliConst.h"
 #include "AliHALL.h"
+#include "AliMagF.h"
 #include "AliRun.h"
-#include "AliConst.h"
+#include "AliLog.h"
  
 ClassImp(AliHALL)
  
@@ -65,9 +63,9 @@ AliHALL::AliHALL(const char *name, const char *title)
   //
   // Standard constructor for the experimental Hall
   //
-  SetMarkerColor(7);
-  SetMarkerStyle(2);
-  SetMarkerSize(0.4);
+  //PH  SetMarkerColor(7);
+  //PH  SetMarkerStyle(2);
+  //PH  SetMarkerSize(0.4);
 }
  
 //_____________________________________________________________________________
@@ -102,11 +100,11 @@ void AliHALL::CreateGeometry()
 
   
   Float_t r2;
-  Float_t phid, phim, tpar[3], pbox[3], h, r, tspar[5];
+  Float_t phid, phim, pbox[3], h, r, tspar[5];
   Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
   Int_t idrotm[1999];
   Float_t trdpar[4], trapar[11], hullen;
-  Float_t dz, phi, par[3], zFilterIn;
+  Float_t phi;
   
   Int_t *idtmed = fIdtmed->GetArray()-1899;
   
@@ -116,17 +114,17 @@ void AliHALL::CreateGeometry()
   h   = 140.;
   phi = TMath::ACos(h / r);
   xl  = r * TMath::Sin(phi);
-  dr  = 100.;
+  dr  = 1600.;
   dh  = dr * TMath::Cos(phi);
   dl  = dr * TMath::Sin(phi);
   if (gAlice->GetModule("ZDC") == 0) {
     
     //     No ZDC 
-    hullen = 250.;
+    hullen = 370.;
   } else {
     
     //     ZDC is present 
-    hullen = 6400.;
+    hullen = 6520.;
   }
   trdpar[0] = xl + dl;
   trdpar[1] = xl;
@@ -135,8 +133,8 @@ void AliHALL::CreateGeometry()
   AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
   AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
   gMC->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4);
-  r2 = hullen + 2020.;
-  gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , r2, idrotm[1900], "ONLY");
+  r2 = hullen + 1900.;
+  gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY");
   
   //     RB24/26 wall 
   
@@ -147,25 +145,10 @@ void AliHALL::CreateGeometry()
   tspar[3] = phid - 90.;
   tspar[4] = 270. - phid;
   gMC->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5);
-  gMC->Gspos("HUWA", 1, "ALIC", 70., 40.,2020+hullen , 0, "ONLY");
-  
-  //     tunnelplug 
-  
-  tpar[0] = 0.;
-  tpar[1] = 50.;
-  tpar[2] = 60.;
-  gMC->Gsvolu("HUP2", "TUBE", idtmed[1954], tpar, 3);
+  gMC->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY");
   
-  //     END WALL 
-  
-  pbox[0] = 1200.;
-  pbox[1] = 1300.;
-  pbox[2] = 60.;
-  gMC->Gsvolu("HEW1", "BOX ", idtmed[1956], pbox, 3);
-  gMC->Gspos("HUP2", 1, "HEW1", 0.,-404., 0.,   0, "ONLY");
-  gMC->Gspos("HEW1", 1, "ALIC", 0., 404., 1960, 0, "ONLY");
-  
-  //     hall floor 
+
+  //     Hall floor 
   
   phid      = 16.197;
   trdpar[0] = 700.;
@@ -176,7 +159,7 @@ void AliHALL::CreateGeometry()
   gMC->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY");
   gMC->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY");
   
-  //     hall side walls 
+  //     Hall side walls 
   
   trapar[0] = 550.;
   trapar[1] = 0.;
@@ -259,28 +242,28 @@ void AliHALL::CreateGeometry()
   //     pillars for working platform 
   
   pbox[0] = 40.;
-  pbox[1] = 120.;
+  pbox[1] = 96.;
   pbox[2] = 550.;
   gMC->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3);
-  gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , 1350., 0, "ONLY");
-  gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , 1350., 0, "ONLY");
-  
-  //     concrete beam shield 
-  
-  pbox[0] = 402.5;
-  pbox[1] = 260.;
-  pbox[2] = 120.;
-  gMC->Gsvolu("HMBS", "BOX ", idtmed[1956], pbox, 3);
-  pbox[0] = 85.;
-  pbox[1] = 100.;
-  gMC->Gsvolu("HBBS", "BOX ", idtmed[1956], pbox, 3);
-  gMC->Gspos("HBBS", 1, "HMBS", -157.5, 0., 0., 0, "ONLY");
-  pbox[0] = 40.;
-  pbox[1] = 130.;
-  gMC->Gsvolu("HPBS", "BOX ", idtmed[1956], pbox, 3);
-  gMC->Gspos("HPBS", 1, "HMBS", 202.5,  30.,    0., 0, "ONLY");
-  gMC->Gspos("HMBS", 1, "ALIC", 157.5, -50., -820., 0, "ONLY");
-  
+  gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY");
+  gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY");
+  
+  //     simple concrete beam shield 
+  
+  Float_t ppgon[10];
+  ppgon[0] =    45.;
+  ppgon[1] =   360.;
+  ppgon[2] =     4.;
+  ppgon[3] =     2.;
+  ppgon[7] =  1800.;
+  ppgon[8] =   150.;
+  ppgon[9] =   250.;
+  ppgon[4] =   720.;
+  ppgon[5] =   150.;
+  ppgon[6] =   250.;
+
+  gMC->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10);
+  gMC->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY");
 }
 
 //_____________________________________________________________________________
@@ -289,28 +272,43 @@ void AliHALL::CreateMaterials()
   //
   // Create materials for the experimental hall
   //
-  
-
-  Int_t   isxfld = gAlice->Field()->Integ();
-  Float_t sxmgmx = gAlice->Field()->Max();
+    
+  Int_t   isxfld = 0;
+  Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
   
   Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
   Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
   Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
   
+  Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
+  Float_t zAir[4]={6.,7.,8.,18.};
+  Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
+  Float_t dAir = 1.20479E-3;
+
+// Steel  
+  Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
+  Float_t zsteel[4] = { 26.,24.,28.,14. };
+  Float_t wsteel[4] = { .715,.18,.1,.005 };
+
   Float_t epsil, stmin, deemax, tmaxfd, stemax;
 
-  //     FOR CONCRETE 
   
-  AliMaterial(10, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
-  AliMaterial(30, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
-  AliMaterial(50, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
-  AliMaterial(15, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
-  AliMaterial(35, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
-  AliMaterial(55, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500);
-  AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
-  AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
-  AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
+  AliMixture(15, "AIR0$      ", aAir, zAir, dAir, 4, wAir);
+  AliMixture(35, "AIR1$      ", aAir, zAir, dAir, 4, wAir);
+  AliMixture(55, "AIR2$      ", aAir, zAir, dAir, 4, wAir);
+
+  AliMixture(17, "CONCRETE0$", aconc, zconc, 2.35, 10, wconc);
+  AliMixture(37, "CONCRETE1$", aconc, zconc, 2.35, 10, wconc);
+  AliMixture(57, "CONCRETE2$", aconc, zconc, 2.35, 10, wconc);
+
+  //     Stainless Steel 
+  AliMixture(10, "STAINLESS STEEL1", asteel, zsteel, 7.88, 4, wsteel);
+  AliMixture(30, "STAINLESS STEEL2", asteel, zsteel, 7.88, 4, wsteel);
+  AliMixture(50, "STAINLESS STEEL3", asteel, zsteel, 7.88, 4, wsteel);
+  // Iron
+  //
+  AliMaterial(52, "IRON", 55.85, 26., 7.87, 1.76, 17.1);
+  
   
   // **************** 
   //     Defines tracking media parameters. 
@@ -323,11 +321,10 @@ void AliHALL::CreateMaterials()
   stmin  = -.8;
   // *************** 
   
-  //     IRON 
-  
-  AliMedium(10, "FE_C0             ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
-  AliMedium(30, "FE_C1             ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
-  AliMedium(50, "FE_C2             ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  //  Stainless Steel
+  AliMedium(10, "STST_C0             ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  AliMedium(30, "STST_C1             ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  AliMedium(50, "STST_C2             ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
   
   //    Air 
   
@@ -340,6 +337,9 @@ void AliHALL::CreateMaterials()
   AliMedium(17, "CC_C0            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(37, "CC_C1            ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(57, "CC_C2            ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+
+  // Iron
+  AliMedium(52, "FE_C2            ", 52, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
 }
 
 //_____________________________________________________________________________
@@ -350,69 +350,16 @@ void AliHALL::Init()
   //
   Int_t i;
   //
-  printf("\n");
-  for(i=0;i<35;i++) printf("*");
-  printf(" HALL_INIT ");
-  for(i=0;i<35;i++) printf("*");
-  printf("\n");
-  //
-  // Here the HALL initialisation code (if any!)
-  for(i=0;i<80;i++) printf("*");
-  printf("\n");
-}
-
-//_____________________________________________________________________________
-void AliHALL::DrawModule()
-{
-  //
-  // Draw a shaded view of Experimental Hall
-  //
-
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-  // 
-  // Set ALIC mother transparent
-  gMC->Gsatt("ALIC","SEEN",0);
-  //
-  // Set the volumes visible
-  gMC->Gsatt("HUFL","seen",1);
-  gMC->Gsatt("HUWA","seen",1);
-  gMC->Gsatt("HUP2","seen",1);
-  gMC->Gsatt("HEW1","seen",1);
-  gMC->Gsatt("HHF1","seen",1);
-  gMC->Gsatt("HHW1","seen",1);
-  gMC->Gsatt("HBW1","seen",1);
-  gMC->Gsatt("HHW2","seen",1);
-  gMC->Gsatt("HHW3","seen",1);
-  gMC->Gsatt("HHC1","seen",1);
-  gMC->Gsatt("HHF2","seen",1);
-  gMC->Gsatt("HPIL","seen",1);
-  gMC->Gsatt("HMBS","seen",1);
-  gMC->Gsatt("HBBS","seen",1);
-  gMC->Gsatt("HPBS","seen",1);
-  gMC->Gsatt("HXFI","seen",1);
-  gMC->Gsatt("HXII","seen",1);
-  //
-  gMC->Gdopt("hide", "on");
-  gMC->Gdopt("shad", "on");
-  gMC->Gsatt("*", "fill", 7);
-  gMC->SetClipBox(".");
-  if (gAlice->GetModule("ZDC") == 0) {
-    //
-    // ZDC is not present
+  if(AliLog::GetGlobalDebugLevel()>0) {
+    printf("\n%s: ",ClassName());
+    for(i=0;i<35;i++) printf("*");
+    printf(" HALL_INIT ");
+    for(i=0;i<35;i++) printf("*");
+    printf("\n%s: ",ClassName());
     //
-    gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
-    gMC->DefaultRange();
-    gMC->Gdraw("alic", 40, 30, 0, 12, 7.5, .005, .005);
-  } else {
-    //
-    // ZDC is present
-    //
-    gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 16000);
-    gMC->DefaultRange();
-    gMC->Gdraw("alic", 40, 30, 0, 17.5, 10, .0019, .0019);
+    // Here the HALL initialisation code (if any!)
+    for(i=0;i<80;i++) printf("*");
+    printf("\n");
   }
-  gMC->Gdhead(1111, "Experimental Hall");
-  gMC->Gdman(18, 2, "MAN");
 }
+