From 4e116cd59cd767374a30e36daeaaa4b1a1bd2bcd Mon Sep 17 00:00:00 2001 From: ivana Date: Fri, 23 Apr 2010 16:01:52 +0000 Subject: [PATCH] In AliMUONTrackHitPattern: Correctly handle the geometry in the extrapolation to the trigger chamber for efficiency calculations. (Diego) --- MUON/AliMUONTrackHitPattern.cxx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/MUON/AliMUONTrackHitPattern.cxx b/MUON/AliMUONTrackHitPattern.cxx index 248117982d0..337053251dc 100644 --- a/MUON/AliMUONTrackHitPattern.cxx +++ b/MUON/AliMUONTrackHitPattern.cxx @@ -635,17 +635,25 @@ void AliMUONTrackHitPattern::LocalBoardFromPos(Float_t x, Float_t y, for(Int_t loc=0; locGetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); - if (seg){ - AliMpPad pad = seg->PadByPosition(pos.X(),pos.Y(),kFALSE); - for (Int_t loc=0; locPadByPosition(xl,yl,kFALSE); + if ( ! pad.IsValid() ){ + AliWarning(Form("Pad not found! DetElemId %i position global (%f, %f, %f) local (%f, %f, %f)\n", detElemId, x, y, z, xl, yl, zl)); + return; + } + + AliDebug(2, Form("\nWould match: DetElemId = %i Pad = (%i,%i) = (%.2f,%.2f,%.2f) Board %3i\n",detElemId,pad.GetIx(),pad.GetIy(),xl,yl,zl,pad.GetLocalBoardId(0))); + + for (Int_t loc=0; loc