#include "AliMpSegmentation.h"
#include "AliMpDEManager.h"
-#include "AliMpContainers.h"
#include "AliMpConstants.h"
#include "AliMpCDB.h"
-#include "AliMpSectorSegmentation.h"
#include "AliMpSector.h"
#include "AliMpRow.h"
#include "AliMpVRowSegment.h"
#include "AliMagF.h"
#include "AliLog.h"
-#include <TVector2.h>
-#include <TVector3.h>
-#include <TGeoMatrix.h>
-#include <TClonesArray.h>
#include <Riostream.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
+#include <TClonesArray.h>
+#include <TGeoCompositeShape.h>
+#include <TGeoGlobalMagField.h>
#include <TGeoManager.h>
-#include <TGeoVolume.h>
+#include <TGeoMatrix.h>
#include <TGeoTube.h>
+#include <TGeoVolume.h>
#include <TGeoXtru.h>
-#include <TGeoCompositeShape.h>
-
-#ifdef WITH_STL
- #include <vector>
-#endif
-
-#ifdef WITH_ROOT
- #include "TArrayI.h"
-#endif
+#include <TSystem.h>
+#include <TVector2.h>
+#include <TVector3.h>
+#include <TVirtualMC.h>
+#include <TArrayI.h>
/// \cond CLASSIMP
ClassImp(AliMUONSt1GeometryBuilderV2)
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 ) {
+ const AliMpSector* kSector1
+ = AliMpSegmentation::Instance()->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane));
+ if ( ! kSector1 ) {
AliFatal("Could not access sector segmentation !");
}
- const AliMpSector* kSector1 = kSegmentation1->GetSector();
-
//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.);
// Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
// in the true position)
- 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
+ = AliMpSegmentation::Instance()
+ ->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane));
+ if ( ! kSector2 ) {
+ AliFatal("Could not access sector !");
}
-
- const AliMpSector* kSector2 = kSegmentation2->GetSector();
//reflectZ = false;
reflectZ = true;
- TVector2 offset = kSector2->Position();
+ TVector2 offset = TVector2(kSector2->GetPositionX(), kSector2->GetPositionY());
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)
GReal_t posX,posY,posZ;
-#ifdef WITH_STL
- vector<Int_t> alreadyDone;
-#endif
-
-#ifdef WITH_ROOT
TArrayI alreadyDone(20);
Int_t nofAlreadyDone = 0;
-#endif
for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
AliMpRow* row = sector->GetRow(irow);
if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
// create the cathode part
- CreatePlaneSegment(segNum, seg->Dimensions(), seg->GetNofMotifs());
+ CreatePlaneSegment(segNum, TVector2(seg->GetDimensionX(),seg->GetDimensionY()),
+ seg->GetNofMotifs());
- posX = where.X() + seg->Position().X();
- posY = where.Y() + seg->Position().Y();
+ posX = where.X() + seg->GetPositionX();
+ posY = where.Y() + seg->GetPositionY();
posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
gMC->Gspos(PlaneSegmentName(segNum).Data(), 1,
QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
// Position
- posX = where.X() + motifPos->Position().X() + fgkOffsetX;
- posY = where.Y() + motifPos->Position().Y() + fgkOffsetY;
+ posX = where.X() + motifPos->GetPositionX() + fgkOffsetX;
+ posY = where.Y() + motifPos->GetPositionY() + fgkOffsetY;
posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
}
Int_t motifPosId = seg->GetMotifPositionId(motifNum);
-#ifdef WITH_STL
- if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
- != alreadyDone.end()) continue; // don't treat the same motif twice
-
-#endif
-#ifdef WITH_ROOT
Bool_t isDone = false;
Int_t i=0;
while (i<nofAlreadyDone && !isDone) {
i++;
}
if (isDone) continue; // don't treat the same motif twice
-#endif
AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
AliDebugStream(2) << chamber << " processing special motif: " << motifPosId << endl;
// place the hole for the motif, wrt the requested rotation angle
Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
- posX = where.X() + motifPos->Position().X() + spMot.GetDelta().X();
- posY = where.Y() + motifPos->Position().Y() + spMot.GetDelta().Y();
+ posX = where.X() + motifPos->GetPositionX() + spMot.GetDelta().X();
+ posY = where.Y() + motifPos->GetPositionY() + spMot.GetDelta().Y();
posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
// Shift the hole for special motif 46 to avoid debording into S047
if ( copyNo == 2070 ) {
posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
-#ifdef WITH_STL
- alreadyDone.push_back(motifPosId);// mark this motif as done
-#endif
-#ifdef WITH_ROOT
if (nofAlreadyDone == alreadyDone.GetSize())
alreadyDone.Set(2*nofAlreadyDone);
alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
-#endif
+
AliDebugStream(2) << chamber << " processed motifPosId: " << motifPosId << endl;
}
// COMMENT OUT END
}// end of special motif case
}
}
-/// \endcond
}
//______________________________________________________________________________
GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
// GReal_t maxStepGas = fMUON->GetMaxStepGas();
- Int_t iSXFLD = gAlice->Field()->PrecInteg();
- Float_t sXMGMX = gAlice->Field()->Max();
+ Int_t iSXFLD = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->PrecInteg();
+ Float_t sXMGMX = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);