**************************************************************************/
// $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"
#include "AliMUONGeometryModule.h"
#include "AliMUONGeometryEnvelopeStore.h"
+/// \cond CLASSIMP
ClassImp(AliMUONSt2GeometryBuilder)
+/// \endcond
//______________________________________________________________________________
AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(AliMUON* muon)
- : AliMUONVGeometryBuilder(2, 3),
+ : AliMUONVGeometryBuilder(2, 2),
fMUON(muon)
{
-// Standard constructor
+/// Standard constructor
}
: AliMUONVGeometryBuilder(),
fMUON(0)
{
-// Default constructor
+/// Default constructor
}
//______________________________________________________________________________
-AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(const AliMUONSt2GeometryBuilder& rhs)
- : AliMUONVGeometryBuilder(rhs)
-{
-// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
-//______________________________________________________________________________
-AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() {
-//
-}
-
-//______________________________________________________________________________
-AliMUONSt2GeometryBuilder&
-AliMUONSt2GeometryBuilder::operator = (const AliMUONSt2GeometryBuilder& rhs)
+AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder()
{
-// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
+/// Destructor
}
//
//______________________________________________________________________________
void AliMUONSt2GeometryBuilder::CreateGeometry()
{
-// From AliMUONv1::CreateGeometry()
+/// From AliMUONv1::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;
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) );
GetEnvelopes(3)->AddEnvelopeConstituent("S04G", "LF04", 4);
}
+//______________________________________________________________________________
+void AliMUONSt2GeometryBuilder::SetVolumes()
+{
+/// 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.
-// ---
+/// Defines the transformations for the station2 chambers.
Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(2);
SetTranslation(2, TGeoTranslation(0., 0., zpos1));
//______________________________________________________________________________
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");