]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometryTransformer.cxx
In AddMisAlignModule/DetElement(): use AliAlignObj::LayerToVolUID
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryTransformer.cxx
index fbcdb921d154278461193d83e0a2688d6586890a..717631548649ace71a48521af074ae9df10acedf 100644 (file)
 
 // $Id$
 //
+// ----------------------------
 // Class AliMUONGeometryTransformer
 // ----------------------------
 // Top container class for geometry transformations
-//
 // Author: Ivana Hrivnacova, IPN Orsay
 
 #include "AliMUONGeometryTransformer.h"
@@ -29,6 +29,7 @@
 
 #include "AliLog.h"
 #include "AliAlignObjMatrix.h"
+#include "AliAlignObj.h"
 
 #include <Riostream.h>
 #include <TSystem.h>
@@ -822,10 +823,13 @@ void  AliMUONGeometryTransformer::AddMisAlignModule(Int_t moduleId,
   // Get path  
   TString path = kTransformer->GetVolumePath(); 
   
+  // Get unique align object ID
+  Int_t volId = AliAlignObj::LayerToVolUID(AliAlignObj::kMUON, moduleId); 
+
   // Create mis align matrix
   TClonesArray& refArray =*fMisAlignArray;
   Int_t pos = fMisAlignArray->GetEntriesFast();
-  new (refArray[pos]) AliAlignObjMatrix(path.Data(), moduleId, 
+  new (refArray[pos]) AliAlignObjMatrix(path.Data(), volId, 
                               const_cast<TGeoHMatrix&>(matrix));
 }
 
@@ -850,10 +854,13 @@ void  AliMUONGeometryTransformer::AddMisAlignDetElement(Int_t detElemId,
   // Get path  
   TString path = kDetElement->GetVolumePath(); 
   
+  // Get unique align object ID
+  Int_t volId = AliAlignObj::LayerToVolUID(AliAlignObj::kMUON, detElemId); 
+
   // Create mis align matrix
   TClonesArray& refArray =*fMisAlignArray;
   Int_t pos = fMisAlignArray->GetEntriesFast();
-  new(refArray[pos]) AliAlignObjMatrix(path.Data(), detElemId, 
+  new(refArray[pos]) AliAlignObjMatrix(path.Data(), volId, 
                               const_cast<TGeoHMatrix&>(matrix));
 }
 
@@ -865,7 +872,7 @@ void AliMUONGeometryTransformer::Global2Local(Int_t detElemId,
 /// Transform point from the global reference frame (ALIC)
 /// to the local reference frame of the detection element specified
 /// by detElemId.
-   
+
   const AliMUONGeometryModuleTransformer* kTransformer 
     = GetModuleTransformerByDEId(detElemId);
   
@@ -881,7 +888,7 @@ void AliMUONGeometryTransformer::Global2Local(Int_t detElemId,
 /// Transform point from the global reference frame (ALIC)
 /// to the local reference frame of the detection element specified
 /// by detElemId.
-   
+
   const AliMUONGeometryModuleTransformer* kTransformer 
     = GetModuleTransformerByDEId(detElemId);