]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSt2GeometryBuilder.cxx
o Updates by Remi
[u/mrichter/AliRoot.git] / MUON / AliMUONSt2GeometryBuilder.cxx
index bf15341fb932fed5a7b331418c741f4c13579f70..5d09a8eda1c1bf4cfd53f3b2cf974944cd0c3d43 100644 (file)
  **************************************************************************/
 
 // $Id$
-//
+
+//-----------------------------------------------------------------------------
 // Class AliMUONSt2GeometryBuilder
 // -------------------------------
 // MUON Station2 coarse geometry construction class.
 // Extracted from AliMUONv1
 // Dummy version of station 2 with the right DE id (Ch. Finck)
+//-----------------------------------------------------------------------------
 
 #include <TVirtualMC.h>
 #include <TGeoMatrix.h>
+#include <TArrayI.h>
 
 #include "AliLog.h"
 
@@ -41,7 +44,7 @@ AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(AliMUON* muon)
  : AliMUONVGeometryBuilder(2, 2), 
    fMUON(muon)
 {
-// Standard constructor
+/// Standard constructor
 
 }
 
@@ -50,13 +53,14 @@ AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder()
  : AliMUONVGeometryBuilder(),
    fMUON(0)
 {
-// Default constructor
+/// Default constructor
 }
 
 
 //______________________________________________________________________________
-AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() {
-//
+AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() 
+{
+/// Destructor
 }
 
 //
@@ -66,7 +70,7 @@ AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() {
 //______________________________________________________________________________
 void AliMUONSt2GeometryBuilder::CreateGeometry() 
 {
-// From AliMUONv1::CreateGeometry()
+/// From AliMUONv1::CreateGeometry()
 
 //
 //********************************************************************
@@ -132,8 +136,8 @@ void AliMUONSt2GeometryBuilder::CreateGeometry()
   
 //     
 //   Sensitive volumes
-     gMC->Gsvolu("S03G", "TUBS", idGas, tpar, 5);
-     gMC->Gsvolu("S04G", "TUBS", idGas, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("S03G", "TUBS", idGas, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("S04G", "TUBS", idGas, tpar, 5);
 
      Int_t detElemId;
 
@@ -142,35 +146,35 @@ void AliMUONSt2GeometryBuilder::CreateGeometry()
      posz = -kDeltaZ;
 
      detElemId = 301;
-     gMC->Gsvolu("LE01", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LE01", "TUBS", idAir, tpar, 5);
      GetEnvelopes(2)->AddEnvelope("LE01", detElemId, true, TGeoTranslation(posx, posy, posz),
                                   TGeoRotation("rot1",90,0,90,90,0,0) );
      detElemId = 401;
-     gMC->Gsvolu("LF01", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LF01", "TUBS", idAir, tpar, 5);
      GetEnvelopes(3)->AddEnvelope("LF01", detElemId, true, TGeoTranslation(posx, posy, posz),
                                   TGeoRotation("rot1",90,0,90,90,0,0) );
      detElemId = 300;
-     gMC->Gsvolu("LE02", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LE02", "TUBS", idAir, tpar, 5);
      GetEnvelopes(2)->AddEnvelope("LE02", detElemId, true, TGeoTranslation(-posx, posy,-posz),
                                  TGeoRotation("rot2",90,180,90,90,180,0) );
      detElemId = 400;
-     gMC->Gsvolu("LF02", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LF02", "TUBS", idAir, tpar, 5);
      GetEnvelopes(3)->AddEnvelope("LF02", detElemId, true, TGeoTranslation(-posx, posy,-posz),
                                  TGeoRotation("rot2",90,180,90,90,180,0) );
      detElemId = 302;
-     gMC->Gsvolu("LE03", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LE03", "TUBS", idAir, tpar, 5);
      GetEnvelopes(2)->AddEnvelope("LE03", detElemId, true, TGeoTranslation(posx, -posy, -posz),
                                  TGeoRotation("rot3",90,0,90,270,180,0) );
      detElemId = 402;
-     gMC->Gsvolu("LF03", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LF03", "TUBS", idAir, tpar, 5);
      GetEnvelopes(3)->AddEnvelope("LF03", detElemId, true, TGeoTranslation(posx, -posy, -posz),
                                  TGeoRotation("rot3",90,0,90,270,180,0) );
      detElemId = 303;
-     gMC->Gsvolu("LE04", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LE04", "TUBS", idAir, tpar, 5);
      GetEnvelopes(2)->AddEnvelope("LE04", detElemId, true, TGeoTranslation(-posx, -posy, posz),
                                  TGeoRotation("rot4",90,180,90,270,0,0) );
      detElemId = 403;
-     gMC->Gsvolu("LF04", "TUBS", idAir, tpar, 5);
+     TVirtualMC::GetMC()->Gsvolu("LF04", "TUBS", idAir, tpar, 5);
      GetEnvelopes(3)->AddEnvelope("LF04", detElemId, true, TGeoTranslation(-posx, -posy, posz),
                                  TGeoRotation("rot4",90,180,90,270,0,0) );
 
@@ -188,14 +192,19 @@ void AliMUONSt2GeometryBuilder::CreateGeometry()
 }
 
 //______________________________________________________________________________
-void AliMUONSt2GeometryBuilder::SetTransformations()
+void AliMUONSt2GeometryBuilder::SetVolumes()
 {
-// Defines the transformations for the station2 chambers.
-// ---
+/// Defines the volumes for the station2 chambers.
 
   // Define chamber volumes as virtual
   SetVolume(2, "SC03", true);
   SetVolume(3, "SC04", true);
+}
+
+//______________________________________________________________________________
+void AliMUONSt2GeometryBuilder::SetTransformations()
+{
+/// Defines the transformations for the station2 chambers.
 
   Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(2); 
   SetTranslation(2, TGeoTranslation(0., 0., zpos1));
@@ -207,8 +216,7 @@ void AliMUONSt2GeometryBuilder::SetTransformations()
 //______________________________________________________________________________
 void AliMUONSt2GeometryBuilder::SetSensitiveVolumes()
 {
-// Defines the sensitive volumes for station2 chambers.
-// ---
+/// Defines the sensitive volumes for station2 chambers.
 
   GetGeometry(2)->SetSensitiveVolume("S03G");
   GetGeometry(3)->SetSensitiveVolume("S04G");