X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONSt1GeometryBuilderV2.cxx;h=d768080f2199c72cd6c48b212251a31b214bf75d;hb=60935290fbf931695e754078c2e98eecf663e6a3;hp=61aaca937198ffb7cb41539a424394fa9b40b80b;hpb=f3ed9a445a24b75614a1a5fa5b2de7c622c6c8ec;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONSt1GeometryBuilderV2.cxx b/MUON/AliMUONSt1GeometryBuilderV2.cxx index 61aaca93719..d768080f219 100644 --- a/MUON/AliMUONSt1GeometryBuilderV2.cxx +++ b/MUON/AliMUONSt1GeometryBuilderV2.cxx @@ -33,7 +33,6 @@ #include "AliMpSegmentation.h" #include "AliMpDEManager.h" -#include "AliMpContainers.h" #include "AliMpConstants.h" #include "AliMpCDB.h" #include "AliMpSector.h" @@ -47,26 +46,20 @@ #include "AliMagF.h" #include "AliLog.h" -#include -#include -#include -#include #include -#include -#include +#include +#include +#include #include -#include +#include #include +#include #include -#include - -#ifdef WITH_STL - #include -#endif - -#ifdef WITH_ROOT - #include "TArrayI.h" -#endif +#include +#include +#include +#include +#include /// \cond CLASSIMP ClassImp(AliMUONSt1GeometryBuilderV2) @@ -428,8 +421,15 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane); TExMapIter it(&specialMap); +#if ROOT_VERSION_CODE >= 334081 +//#if ROOT_VERSION_CODE >= 333824 // needed with Root v5.24.00-patches + Long64_t key; + Long64_t value; +#else Long_t key; Long_t value; +#endif + while ( it.Next(key,value) == kTRUE ) { delete reinterpret_cast(value); } @@ -452,7 +452,7 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) //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) @@ -1164,7 +1164,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) // TopAnode1 - layer 2 of 2 par[2] = kHzTA12; - gMC->Gsvolu("SQ09","BOX",idFR4,par,11); + gMC->Gsvolu("SQ09","BOX",idFR4,par,3); // TopAnode2 - layer 1 of 2 par[0] = kHzTA21; @@ -1975,14 +1975,8 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, GReal_t posX,posY,posZ; -#ifdef WITH_STL - vector alreadyDone; -#endif - -#ifdef WITH_ROOT TArrayI alreadyDone(20); Int_t nofAlreadyDone = 0; -#endif for (Int_t irow=0;irowGetNofRows();irow++){ // for each row AliMpRow* row = sector->GetRow(irow); @@ -1996,10 +1990,11 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, if ( value == 0 ){ //if this is a normal segment (ie. not part of ) // 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"); @@ -2017,8 +2012,8 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, 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"); } @@ -2034,12 +2029,6 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, 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 (iPosition().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 ) { @@ -2082,14 +2070,10 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, 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 @@ -2227,8 +2211,8 @@ void AliMUONSt1GeometryBuilderV2::CreateMaterials() 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);