const AliMUONPad* pad = static_cast<const AliMUONPad*>(obj);
- if (DetElemId() < 0) {
+ if (DetElemId() < 0)
+ {
// AZ - For "pixels" from MLEM cluster finder
+ // we only sort on charge
if (Charge() == pad->Charge()) return 0;
return ( Charge() < pad->Charge() ) ? 1:-1;
}
}
else if ( DetElemId() > pad->DetElemId() )
{
- return 1;
+ return -1;
}
else
{
else
{
// same Y
- return ( Charge() < pad->Charge() ) ? -1:1;
- }
+ if ( Charge() < pad->Charge() )
+ {
+ return -1;
+ }
+ else if ( Charge() > pad->Charge() )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
}
}
}
}
}
+ return 0;
}
//_____________________________________________________________________________
/// Return backup charge
Double_t ChargeBackup() const { return fChargeBackup; }
- virtual Int_t Compare(const TObject* obj) const;
-
/// Return detection element id
Int_t DetElemId() const { return fDetElemId; }
/// Return info whether this pad is saturated or not
Bool_t IsSaturated() const { return fIsSaturated; }
- /// Return true as the function Sort is implemented
+ /// Return true as the function Compare is implemented
Bool_t IsSortable() const { return kTRUE; }
+ virtual Int_t Compare(const TObject* obj) const;
+
/// Return true if is used
Bool_t IsUsed() const { return fClusterId >= 0; }