**************************************************************************/
// $Id$
-// $MpId: AliMpMotif.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotif.cxx,v 1.8 2006/05/24 13:58:41 ivana Exp $
// Category: motif
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpMotif
// ----------------
// Class that defines a motif with its unique ID
// and the motif type.
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMpMotif.h"
-#include "AliMpMotifType.h"
+
+#include "AliMpConstants.h"
#include "AliMpIntPair.h"
+#include "AliMpMotifType.h"
+/// \cond CLASSIMP
ClassImp(AliMpMotif)
+/// \endcond
//_____________________________________________________________________________
AliMpMotif::AliMpMotif()
/// or (-1,-1) if this position doesn't correspond to any valid
/// connection
- TVector2 lowerLeft = localPos+Dimensions();
+ TVector2 lowerLeft(localPos);
+
+ lowerLeft += Dimensions();
- if ( lowerLeft.X() < 0 || lowerLeft.Y() < 0 )
+ if ( lowerLeft.X() < - AliMpConstants::LengthTolerance() ||
+ lowerLeft.Y() < - AliMpConstants::LengthTolerance() )
{
return AliMpIntPair::Invalid();
}
Int_t ix = (Int_t)(lowerLeft.X()/(2.*fPadDimensions.X()));
Int_t iy = (Int_t)(lowerLeft.Y()/(2.*fPadDimensions.Y()));
- if (!GetMotifType()->FindConnectionByLocalIndices(AliMpIntPair(ix,iy))) {
- //Warning("PadIndicesLocal","Position outside motif");
+ if (!GetMotifType()->FindConnectionByLocalIndices(AliMpIntPair(ix,iy)))
+ {
return AliMpIntPair::Invalid();
}
return AliMpIntPair(ix,iy);