// $Id$
//
-// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
-//
+//-----------------------------------------------------------------------------
// Class AliMUONSt1GeometryBuilderV2
// ---------------------------------
// MUON Station1 detailed geometry construction class.
// (Originally defined in AliMUONv2.cxx - now removed.)
// Included in AliRoot 2004/01/23
+// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMUONSt1GeometryBuilderV2.h"
#include "AliMUONSt1SpecialMotif.h"
#include "AliMUONGeometryModule.h"
#include "AliMUONGeometryEnvelopeStore.h"
+#include "AliMpSegmentation.h"
+#include "AliMpDEManager.h"
#include "AliMpContainers.h"
#include "AliMpConstants.h"
-#include "AliMpFiles.h"
-#include "AliMpSectorReader.h"
+#include "AliMpCDB.h"
+#include "AliMpSectorSegmentation.h"
#include "AliMpSector.h"
#include "AliMpRow.h"
#include "AliMpVRowSegment.h"
//______________________________________________________________________________
AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
- : AliMUONVGeometryBuilder(0, 1),
+ : AliMUONVGeometryBuilder(0, 2),
fMUON(muon)
{
/// Standard constructor
-
- // set path to mapping data files
- if (! gSystem->Getenv("MINSTALL")) {
- TString dirPath = gSystem->Getenv("ALICE_ROOT");
- dirPath += "/MUON/mapping";
- AliMpFiles::SetTopPath(dirPath);
- gSystem->Setenv("MINSTALL", dirPath.Data());
- //cout << "AliMpFiles top path set to " << dirPath << endl;
- }
- //else
- // cout << gSystem->Getenv("MINSTALL") << endl;
}
//______________________________________________________________________________
{
/// Default Constructor
}
-
-//______________________________________________________________________________
-AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
- : AliMUONVGeometryBuilder(rhs)
-{
-/// Dummy copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
//______________________________________________________________________________
AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
}
-//______________________________________________________________________________
-AliMUONSt1GeometryBuilderV2&
-AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
-{
-/// Assignment operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// Private methods
//
// Gas Medium
Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
- //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
+ Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
//Int_t idCopper = idtmed[1109]; // medium 10 = copper
- Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
+ //Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
Int_t idCopper = idtmed[1121]; // medium 22 = copper
Float_t par[11];
specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
#endif
- AliMpSectorReader reader1(kStation1, kBendingPlane);
- AliMpSector* sector1 = reader1.BuildSector();
-
+ // Load mapping from OCDB
+ if ( ! AliMpSegmentation::Instance() ) {
+ AliFatal("Mapping has to be loaded first !");
+ }
+
+ const AliMpSectorSegmentation* kSegmentation1
+ = dynamic_cast<const AliMpSectorSegmentation*>(
+ AliMpSegmentation::Instance()
+ ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane)));
+ if ( ! kSegmentation1 ) {
+ AliFatal("Could not access sector segmentation !");
+ }
+
+ const AliMpSector* kSector1 = kSegmentation1->GetSector();
+/*
+ AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane);
+ AliMpSector* kSector1 = reader1.BuildSector();
+*/
//Bool_t reflectZ = true;
Bool_t reflectZ = false;
//TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
- PlaceSector(sector1, specialMap, where, reflectZ, chamber);
+ PlaceSector(kSector1, specialMap, where, reflectZ, chamber);
#ifdef WITH_STL
specialMap.clear();
#endif
#ifdef WITH_ROOT
- Int_t nb = AliMpConstants::ManuMask(kNonBendingPlane);
+ Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
specialMap.Delete();
specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
// in the true position)
// Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
#endif
-
- AliMpSectorReader reader2(kStation1, kNonBendingPlane);
+/*
+ AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane);
AliMpSector* sector2 = reader2.BuildSector();
-
+*/
+ const AliMpSectorSegmentation* kSegmentation2
+ = dynamic_cast<const AliMpSectorSegmentation*>(
+ AliMpSegmentation::Instance()
+ ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane)));
+ if ( ! kSegmentation2 ) {
+ AliFatal("Could not access sector segmentation !");
+ }
+
+ const AliMpSector* kSector2 = kSegmentation2->GetSector();
+
//reflectZ = false;
reflectZ = true;
- TVector2 offset = sector2->Position();
+ TVector2 offset = kSector2->Position();
where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
// Add the half-pad shift of the non-bending plane wrt bending plane
// (The shift is defined in the mapping as sector offset)
// Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
- PlaceSector(sector2, specialMap, where, reflectZ, chamber);
+ PlaceSector(kSector2, specialMap, where, reflectZ, chamber);
#ifdef WITH_ROOT
specialMap.Delete();
// Replace the volume shape with a composite shape
// with substracted overlap with beam shield (YMOT)
- if ( gMC->IsRootGeometrySupported() &&
- TString(gMC->ClassName()) != "TGeant4") {
+ if ( gMC->IsRootGeometrySupported() ) {
// Get shape
TGeoVolume* mlayer
}
//______________________________________________________________________________
-void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap specialMap,
+void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
+ SpecialMap specialMap,
const TVector3& where, Bool_t reflectZ, Int_t chamber)
{
/// Place all the segments in the mother volume, at the position defined
AliMpMotifPosition* motifPos =
sector->GetMotifMap()->FindMotifPosition(motifPosId);
Int_t copyNo = motifPosId;
- if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
+ if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
// Position
posX = where.X() + motifPos->Position().X() + fgkOffsetX;
// Copy number
Int_t copyNo = motifPosId;
- if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
+ if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
// place the hole for the motif, wrt the requested rotation angle
Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
// AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
// AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
// AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
+// AliMedium(24, "FrameCH$ ", 44, 1, iSXFLD, ...
//
// --- Define materials for GEANT ---
// --- Define mixtures for GEANT ---
//
- // Ar-CO2 gas II (80%+20%)
- Float_t ag1[2] = { 39.95, 44.01};
- Float_t zg1[2] = { 18., 22.};
- Float_t wg1[2] = { .8, 0.2};
- Float_t dg1 = .001821;
- fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
- // was id: 22
- // use wg1 weighting factors (6th arg > 0)
+ // // Ar-CO2 gas II (80%+20%)
+// Float_t ag1[2] = { 39.95, 44.01};
+// Float_t zg1[2] = { 18., 22.};
+// Float_t wg1[2] = { .8, 0.2};
+// Float_t dg1 = .001821;
+// fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
+// // was id: 22
+// // use wg1 weighting factors (6th arg > 0)
// Rohacell 51 II - imide methacrylique
Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
GReal_t stmin = -.8;
GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
- GReal_t maxStepGas = fMUON->GetMaxStepGas();
+ // GReal_t maxStepGas = fMUON->GetMaxStepGas();
Int_t iSXFLD = gAlice->Field()->PrecInteg();
Float_t sXMGMX = gAlice->Field()->Max();
fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
- // was med: 15 mat: 31
- fMUON->AliMedium(24, "FrameCH$", 44, 1, iSXFLD, sXMGMX,
- 10.0, 0.001, 0.001, 0.001, 0.001);
// was med: 20 mat: 36
- fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
- tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
- // was med: 9 mat: 22
+ // fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
+// tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
+// // was med: 9 mat: 22
fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
// was med: 16 mat: 32