]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometryModule.cxx
From Laurent:
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModule.cxx
index b5c815b0fef73d4890b2520fedd8b7be532168d1..1ce97cadab0fbdf20039ffb7c30ad75a75d2dfa9 100644 (file)
@@ -44,8 +44,10 @@ ClassImp(AliMUONGeometryModule)
 //______________________________________________________________________________
 AliMUONGeometryModule::AliMUONGeometryModule(Int_t moduleId)
  : TObject(),
+   fIsVirtual(true),
    fModuleId(moduleId),
    fMotherVolume("ALIC"),
+   fVolume("NONE"),
    fNofSVs(0),
    fSVVolumeIds(0),
    fTransformation(0),
@@ -79,8 +81,10 @@ AliMUONGeometryModule::AliMUONGeometryModule(Int_t moduleId)
 //______________________________________________________________________________
 AliMUONGeometryModule::AliMUONGeometryModule()
  : TObject(),
+   fIsVirtual(true),
    fModuleId(0),
    fMotherVolume(),
+   fVolume(),
    fNofSVs(0),
    fSVVolumeIds(0),
    fTransformation(0),
@@ -215,6 +219,16 @@ void  AliMUONGeometryModule::Local2Global(Int_t detElemId,
    detElement->Local2Global(xl, yl, zl, xg, yg, zg); 
 }
 
+//______________________________________________________________________________
+void AliMUONGeometryModule::SetVolume(const TString& volumeName)
+{ 
+// Sets the concrete volume associated with this module.
+// The module in not virtual in this case
+
+  fVolume = volumeName;
+  fIsVirtual = false;
+}
+
 //______________________________________________________________________________
 void  AliMUONGeometryModule::SetTranslation(const TGeoTranslation& translation)
 {
@@ -320,7 +334,9 @@ AliMUONGeometryModule::GetDetElement(Int_t detElemId) const
      = (AliMUONGeometryDetElement*) fDetElements->Get(detElemId);
 
    if (!detElement) {
-     AliError(Form("Detection element %d not found", detElemId));
+     AliErrorStream() 
+       << "Detection element " << detElemId
+       << " not found in module " << fModuleId << endl;
      return 0;
    }