]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSt1GeometryBuilderV2.cxx
AliTriggerAnalysis: added switch to disable FMD histograms (runs much faster) (consta...
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1GeometryBuilderV2.cxx
index b2049b4894689bb077635ac73fa47bd239550f83..a6fb1e64ae8cf8369825d629d67033c6840b88fe 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "AliMpSegmentation.h"
 #include "AliMpDEManager.h"
-#include "AliMpContainers.h"
 #include "AliMpConstants.h"
 #include "AliMpCDB.h"
 #include "AliMpSector.h"
 #include <TVector2.h>
 #include <TVector3.h>
 #include <TVirtualMC.h>
-
-#ifdef WITH_STL
-  #include <vector>
-#endif
-
-#ifdef WITH_ROOT
-  #include "TArrayI.h"
-#endif
+#include <TArrayI.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMUONSt1GeometryBuilderV2)
@@ -429,8 +421,14 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
   
   Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
   TExMapIter it(&specialMap);
+#if ROOT_SVN_REVISION >= 29598
+  Long64_t key;
+  Long64_t value;
+#else
   Long_t key;
   Long_t value;
+#endif  
+  
   while ( it.Next(key,value) == kTRUE ) { 
     delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
   }
@@ -453,7 +451,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)
@@ -1165,7 +1163,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;
@@ -1976,14 +1974,8 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
   
   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);
@@ -1997,10 +1989,11 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
       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");
@@ -2018,8 +2011,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");
         }  
@@ -2035,12 +2028,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 (i<nofAlreadyDone && !isDone) {
@@ -2048,7 +2035,6 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
            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;  
@@ -2062,8 +2048,8 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
           // 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 ) {
@@ -2083,14 +2069,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