]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCv3.cxx
- implemented function that allows selection of HLT triggered events (Hege)
[u/mrichter/AliRoot.git] / ZDC / AliZDCv3.cxx
index f5ea30f43954bd6218a3b83dace87f92520f1206..e58ff641611efa0f3a5c32a6c5b24634b3693f5a 100644 (file)
 #include <TVirtualMC.h>
 #include <TGeoManager.h>
 #include <TGeoMatrix.h>
+#include <TGeoTube.h>
 #include <TGeoCone.h>
 #include <TGeoShape.h>
+#include <TGeoScaledShape.h>
 #include <TGeoCompositeShape.h>
 #include <TParticle.h>
 
@@ -311,12 +313,23 @@ void AliZDCv3::CreateBeamLine()
   tubpar[0] = 18.6/2.;
   tubpar[1] = 7.6/2.;
   tubpar[2] = totLength1/2.;
-  gMC->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3);  
+//  gMC->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3);  
+  // temporary replace with a scaled tube (AG)
+  TGeoTube *tubeQE01 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+  TGeoScale *scaleQE01 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+  TGeoScaledShape *sshapeQE01 = new TGeoScaledShape(tubeQE01, scaleQE01);
+  new TGeoVolume("QE01", sshapeQE01, gGeoManager->GetMedium(idtmed[7]));
 
   tubpar[0] = 18.0/2.;
   tubpar[1] = 7.0/2.;
   tubpar[2] = totLength1/2.;
-  gMC->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3);  
+//  gMC->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3);  
+  // temporary replace with a scaled tube (AG)
+  TGeoTube *tubeQE02 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+  TGeoScale *scaleQE02 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+  TGeoScaledShape *sshapeQE02 = new TGeoScaledShape(tubeQE02, scaleQE02);
+  new TGeoVolume("QE02", sshapeQE02, gGeoManager->GetMedium(idtmed[10]));
+
   gMC->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); 
   gMC->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY");  
   // Ch.debug
@@ -936,13 +949,23 @@ void AliZDCv3::CreateBeamLine()
   tubpar[0] = 18.4/2.;
   tubpar[1] = 7.4/2.;
   tubpar[2] = 313.3/2.;
-  gMC->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3);  
+//  gMC->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3);  
+  // temporary replace with a scaled tube (AG)
+  TGeoTube *tubeQA06 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+  TGeoScale *scaleQA06 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+  TGeoScaledShape *sshapeQA06 = new TGeoScaledShape(tubeQA06, scaleQA06);
+  new TGeoVolume("QA06", sshapeQA06, gGeoManager->GetMedium(idtmed[7]));
   //printf("   QA06 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
 
   tubpar[0] = 18.0/2.;
   tubpar[1] = 7.0/2.;
   tubpar[2] = 313.3/2.;
-  gMC->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3);  
+//  gMC->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3);  
+  // temporary replace with a scaled tube (AG)
+  TGeoTube *tubeQA07 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+  TGeoScale *scaleQA07 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+  TGeoScaledShape *sshapeQA07 = new TGeoScaledShape(tubeQA07, scaleQA07);
+  new TGeoVolume("QA07", sshapeQA07, gGeoManager->GetMedium(idtmed[10]));
   //printf("   QA07 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
   gMC->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); 
   gMC->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY");  
@@ -2086,6 +2109,7 @@ void AliZDCv3::CreateMaterials()
   Float_t stmin  = 0.01;   // Min. value 4 max. step (cm)
   Float_t stemax = 1.;     // Max. step permitted (cm) 
   Float_t tmaxfd = 0.;     // Maximum angle due to field (degrees) 
+  Float_t tmaxfdv = 0.1;   // Maximum angle due to field (degrees) 
   Float_t deemax = -1.;    // Maximum fractional energy loss
   Float_t nofieldm = 0.;   // Max. field value (no field)
   Float_t fieldm = 45.;    // Max. field value (with field)
@@ -2105,7 +2129,7 @@ void AliZDCv3::CreateMaterials()
   AliMedium(8, "ZIRONN",8, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(9, "ZCOPL", 6, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(10,"ZVOID",10, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
-  AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
+  AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfdv, stemax, deemax, epsil, stmin);
   AliMedium(12,"ZAIR", 12, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(13,"ZTANT",13, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
   AliMedium(14, "ZIRONT", 7, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);