]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDv1.cxx
up from Rosi
[u/mrichter/AliRoot.git] / PMD / AliPMDv1.cxx
index fab9622d82da1e8a6ae70fb38089808488c06966..0f9e2fb640d5f337281e23f85ae7a2a99a53525d 100644 (file)
@@ -41,6 +41,7 @@
 ////
 
 #include <Riostream.h>
+#include <TGeoManager.h>
 #include <TGeoGlobalMagField.h>
 #include <TVirtualMC.h>
 
@@ -2012,47 +2013,6 @@ void AliPMDv1::CreatePMD()
 
 //_____________________________________________________________________________
 
-void AliPMDv1::DrawModule() const
-{
-  // Draw a shaded view of the Photon Multiplicity Detector
-  //
-  //  cout << " Inside Draw Modules " << endl;
-  
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-  
-  // Set ALIC mother transparent
-  gMC->Gsatt("ALIC", "seen", 0);
-  //
-  // Set the visibility of the components
-  // 
-  gMC->Gsatt("ECAR","seen",0);
-  gMC->Gsatt("ECCU","seen",1);
-  gMC->Gsatt("EST1","seen",1);
-  gMC->Gsatt("EST2","seen",1);
-  gMC->Gsatt("EUM1","seen",1);
-  gMC->Gsatt("EUM2","seen",1);
-  
-  gMC->Gsatt("EPMD","seen",1);
-  
-  //
-  gMC->Gdopt("hide", "on");
-  gMC->Gdopt("shad", "on");
-  gMC->Gsatt("*", "fill", 7);
-  gMC->SetClipBox(".");
-  gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
-  gMC->DefaultRange();
-  gMC->Gdraw("ALIC", 40, 30, 0, 22, 20.5, .02, .02);
-  gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
-  
-  //gMC->Gdman(17, 5, "MAN");
-  gMC->Gdopt("hide", "off");
-  
-  AliDebug(1,"Outside Draw Modules");
-}
-
-//_____________________________________________________________________________
-
 void AliPMDv1::CreateMaterials()
 {
   // Create materials for the PMD
@@ -2172,120 +2132,82 @@ void AliPMDv1::Init()
   Int_t *idtmed = fIdtmed->GetArray()-599;
   fMedSens=idtmed[605-1];
   // --- Generate explicitly delta rays in the iron, aluminium and lead --- 
-  gMC->Gstpar(idtmed[600], "LOSS", 3.);
-  gMC->Gstpar(idtmed[600], "DRAY", 1.);
-  
-  gMC->Gstpar(idtmed[603], "LOSS", 3.);
-  gMC->Gstpar(idtmed[603], "DRAY", 1.);
-  
-  gMC->Gstpar(idtmed[604], "LOSS", 3.);
-  gMC->Gstpar(idtmed[604], "DRAY", 1.);
-  
-  gMC->Gstpar(idtmed[605], "LOSS", 3.);
-  gMC->Gstpar(idtmed[605], "DRAY", 1.);
-  
-  gMC->Gstpar(idtmed[607], "LOSS", 3.);
-  gMC->Gstpar(idtmed[607], "DRAY", 1.);
-  
-  // --- Energy cut-offs in the Pb and Al to gain time in tracking --- 
-  // --- without affecting the hit patterns --- 
-  gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
-  gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
-  gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
-  gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
-
-  gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
-  gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
-  gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
-  gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
-
-  gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
-  gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
-  gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
-  gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
-
-  //   gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
-  //   gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
-  //   gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
-  //   gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
-  
-  // --- Prevent particles stopping in the gas due to energy cut-off --- 
-  gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
-  gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
-  gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
-  gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
-  gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
-
+  // Gstpar is removed from this place and 
+  // the energy cut offs in the medium moved to galice.cuts
+  
+  //gMC->Gstpar(idtmed[605], "LOSS", 3.);
+  //gMC->Gstpar(idtmed[605], "DRAY", 1.);
+  
   // Visualization of volumes
-  gMC->Gsatt("ECAR", "SEEN", 0);
-  gMC->Gsatt("ECCU", "SEEN", 1);
-  gMC->Gsatt("ECCU", "COLO", 4);
-  gMC->Gsatt("EST1", "SEEN", 0);
-  gMC->Gsatt("EST2", "SEEN", 0);
-  gMC->Gsatt("EHC1", "SEEN", 0);  
-  gMC->Gsatt("EHC2", "SEEN", 0);
-  gMC->Gsatt("EDGA", "SEEN", 1);
-  gMC->Gsatt("EDGB", "SEEN", 1);
-  gMC->Gsatt("EEGA", "SEEN", 1);
-  gMC->Gsatt("EEGB", "SEEN", 1);
-  gMC->Gsatt("EUM1", "SEEN", 0);
-  gMC->Gsatt("EUV1", "SEEN", 0);
-  gMC->Gsatt("EUM2", "SEEN", 0);
-  gMC->Gsatt("EUV2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("ECCU", "COLO", 4);
+  gGeoManager->SetVolumeAttribute("EST1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EST2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 0);  
+  gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EDGA", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EDGB", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EEGA", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EEGB", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EUM1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EUV1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EUM2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EUV2", "SEEN", 0);
 
  
-  gMC->Gsatt("EFEE", "SEEN", 0);
-  gMC->Gsatt("EFEE", "COLO", 4);
-  gMC->Gsatt("EFBA", "SEEN", 1);
-  gMC->Gsatt("EFBA", "COLO", 4);
-  gMC->Gsatt("EFBB", "SEEN", 0);
-  gMC->Gsatt("EFBB", "COLO", 4);
-
-  gMC->Gsatt("ELDA", "SEEN", 0);
-  gMC->Gsatt("ELDB", "SEEN", 0);
-
-  gMC->Gsatt("EFE1", "SEEN", 0); 
-  gMC->Gsatt("EFE2", "SEEN", 0);
-  gMC->Gsatt("EFE3", "SEEN", 0);
-  gMC->Gsatt("EFE4", "SEEN", 0);
-
-  gMC->Gsatt("ESC1", "SEEN", 0);
-  gMC->Gsatt("ECC1", "COLO", 2);
-  gMC->Gsatt("ESC2", "SEEN", 0);
-  gMC->Gsatt("ECC2", "COLO", 2);
-  gMC->Gsatt("ESC3", "SEEN", 0);
-  gMC->Gsatt("ECC3", "COLO", 2);
-  gMC->Gsatt("ESC4", "SEEN", 0);
-  gMC->Gsatt("ECC4", "COLO", 2);
-
-  gMC->Gsatt("ECC1", "SEEN", 0);
-  gMC->Gsatt("ECC2", "SEEN", 0);
-  gMC->Gsatt("ECC3", "SEEN", 0);
-  gMC->Gsatt("ECC4", "SEEN", 0);
-
-  gMC->Gsatt("EPM1", "SEEN", 1);
-  gMC->Gsatt("EPM2", "SEEN", 1);
-  gMC->Gsatt("EPM3", "SEEN", 1);
-  gMC->Gsatt("EPM4", "SEEN", 1);
-
-  gMC->Gsatt("ECB1", "SEEN", 0);
-  gMC->Gsatt("ECB2", "SEEN", 0);
-  gMC->Gsatt("ECB3", "SEEN", 0);
-  gMC->Gsatt("ECB4", "SEEN", 0);
-
-  gMC->Gsatt("ELMB", "SEEN", 0);
-  
-  gMC->Gsatt("ESV1", "SEEN", 0);
-  gMC->Gsatt("ESV2", "SEEN", 0);
-  gMC->Gsatt("ESV3", "SEEN", 0);
-  gMC->Gsatt("ESV4", "SEEN", 0);
-
-  gMC->Gsatt("EVV1", "SEEN", 0);
-  gMC->Gsatt("EVV2", "SEEN", 0);
-  gMC->Gsatt("EVV3", "SEEN", 0);
-  gMC->Gsatt("EVV4", "SEEN", 0);
-
-  gMC->Gsatt("EFGD", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EFEE", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EFEE", "COLO", 4);
+  gGeoManager->SetVolumeAttribute("EFBA", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EFBA", "COLO", 4);
+  gGeoManager->SetVolumeAttribute("EFBB", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EFBB", "COLO", 4);
+
+  gGeoManager->SetVolumeAttribute("ELDA", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ELDB", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("EFE1", "SEEN", 0); 
+  gGeoManager->SetVolumeAttribute("EFE2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EFE3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EFE4", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("ESC1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC1", "COLO", 2);
+  gGeoManager->SetVolumeAttribute("ESC2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC2", "COLO", 2);
+  gGeoManager->SetVolumeAttribute("ESC3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC3", "COLO", 2);
+  gGeoManager->SetVolumeAttribute("ESC4", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC4", "COLO", 2);
+
+  gGeoManager->SetVolumeAttribute("ECC1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECC4", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("EPM1", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EPM2", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EPM3", "SEEN", 1);
+  gGeoManager->SetVolumeAttribute("EPM4", "SEEN", 1);
+
+  gGeoManager->SetVolumeAttribute("ECB1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECB2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECB3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ECB4", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("ELMB", "SEEN", 0);
+  
+  gGeoManager->SetVolumeAttribute("ESV1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ESV2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ESV3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("ESV4", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("EVV1", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EVV2", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EVV3", "SEEN", 0);
+  gGeoManager->SetVolumeAttribute("EVV4", "SEEN", 0);
+
+  gGeoManager->SetVolumeAttribute("EFGD", "SEEN", 0);
 }
 
 //_____________________________________________________________________________