]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometrySegmentation.cxx
Using the recommended way of forward declarations for TVector and TMatrix (see v5...
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometrySegmentation.cxx
index c877ee887f950396df8951bae13737f96c7e861d..8010ac4aadb108d035b5f3b4806b47c21dedd536 100644 (file)
 
 /* $Id$ */
 
-#include <Riostream.h>
-#include <TObjString.h>
-#include <TClass.h>
-
-#include "AliLog.h"
-
 #include "AliMUONGeometrySegmentation.h"
 #include "AliMUONVGeometryDESegmentation.h"
 #include "AliMUONGeometryModuleTransformer.h"
 #include "AliMUONGeometryDetElement.h"
 #include "AliMUONGeometryStore.h"
 
+#include "AliLog.h"
+
+#include <Riostream.h>
+#include <TObjString.h>
+#include <TClass.h>
+
 ClassImp(AliMUONGeometrySegmentation)
 
 const Float_t  AliMUONGeometrySegmentation::fgkMaxDistance = 1.0e6;
@@ -288,6 +288,21 @@ AliMUONGeometrySegmentation::HasPad(Int_t detElemId, Int_t ix, Int_t iy)
   return fCurrentSegmentation->HasPad(ix,iy);
 }
                                     
+//______________________________________________________________________________
+Bool_t
+AliMUONGeometrySegmentation::HasPad(Int_t detElemId, 
+                                    Float_t& xg, Float_t& yg, Float_t& zg)
+{
+// Tells if a given pad exists in a given detector element
+
+  if (!OwnNotify(detElemId)) return false;
+       
+  Float_t xl, yl, zl;
+  fCurrentDetElement->Global2Local(xg, yg, zg, xl, yl, zl); 
+
+  return fCurrentSegmentation->HasPad(xl, yl, zl);
+}
+                                    
 //______________________________________________________________________________
 Bool_t  
 AliMUONGeometrySegmentation::GetPadC(Int_t detElemId,