// $Id$
+//-----------------------------------------------------------------------------
/// \class AliMUONVDigit
///
/// This is the base class of a MUON digit that most client code should deal with.
/// the (half) dimensions (in cm) of the pad it corresponds to.
///
/// \author Laurent Aphecetche, Subatech
+//-----------------------------------------------------------------------------
#include "AliMUONVDigit.h"
//_____________________________________________________________________________
AliMUONVDigit::AliMUONVDigit()
+: TObject()
{
/// Default ctor
}
Bool_t
AliMUONVDigit::IsEqual(const TObject* object) const
{
+ /// Whether we're equal to object.
+ /// WARNING : only based on our identifiers (de,manu,channel,cathode), not our
+ /// content (i.e. charge, status...)
+
const AliMUONVDigit* d = static_cast<const AliMUONVDigit*>(object);
return ( DetElemId() == d->DetElemId() &&
Int_t
AliMUONVDigit::Compare(const TObject* object) const
{
+ /// Compare two digits, trying to get as complete an order as possible.
+ /// We sort by DE, then by charge, then by manu, etc...
+ ///
const AliMUONVDigit* d = static_cast<const AliMUONVDigit*>(object);
if ( DetElemId() > d->DetElemId() )
}
else
{
- if ( ManuId() < d->ManuId() )
+ if ( ManuId() > d->ManuId() )
{
return 1;
}
- else if ( ManuId() > d->ManuId() )
+ else if ( ManuId() < d->ManuId() )
{
return -1;
}
else
{
- return ( ManuChannel() < d->ManuChannel() ) ? 1 : -1;
+ if ( ManuChannel() > d->ManuChannel() )
+ {
+ return 1;
+ }
+ else if ( ManuChannel() < d->ManuChannel() )
+ {
+ return -1;
+ }
}
}
}