+ return AliMpArea((lowerLeft+upperRight).X()/2,(lowerLeft+upperRight).Y()/2,
+ (upperRight-lowerLeft).X()/2, (upperRight-lowerLeft).Y()/2);
+}
+
+//_____________________________________________________________________________
+AliMpArea
+AliMUONCluster::Area(Int_t cathode) const
+{
+ /// Return the geometrical area covered by this cluster's pads on
+ /// a given cathode
+
+ // Start by finding the (x,y) limits of this cluster
+ TVector2 lowerLeft(1E9,1E9);
+ TVector2 upperRight(-1E9,-1E9);
+
+ for ( Int_t i = 0; i < Multiplicity(); ++i )
+ {
+ AliMUONPad* pad = Pad(i);
+ if ( pad->Cathode() == cathode )
+ {
+ TVector2 ll = pad->Position() - pad->Dimensions();
+ TVector2 ur = pad->Position() + pad->Dimensions();
+ lowerLeft.Set( TMath::Min(ll.X(),lowerLeft.X()),
+ TMath::Min(ll.Y(),lowerLeft.Y()) );
+ upperRight.Set( TMath::Max(ur.X(),upperRight.X()),
+ TMath::Max(ur.Y(),upperRight.Y()) );
+ }
+ }
+
+ // then construct the area from those limits
+ return AliMpArea((lowerLeft+upperRight).X()/2,(lowerLeft+upperRight).Y()/2,
+ (upperRight-lowerLeft).X()/2, (upperRight-lowerLeft).Y()/2);
+}
+
+//_____________________________________________________________________________
+Bool_t
+AliMUONCluster::IsMonoCathode() const
+{
+ /// Whether we have signals only in one of the two cathodes
+ return (Cathode()<2);
+}
+
+//_____________________________________________________________________________
+Int_t
+AliMUONCluster::Cathode() const
+{
+ /// Return the cathode "number" of this cluster :
+ /// 0 if all its pads are on cathode 0
+ /// 1 if all its pads are on cathode 1
+ /// 2 if some pads on cath 0 and some on cath 1
+
+ Int_t cathode(-1);
+ if (Multiplicity(0)>0 && Multiplicity(1)>0)
+ {
+ cathode=2;
+ }
+ else if (Multiplicity(0)>0)
+ {
+ cathode=0;
+ }
+ else if (Multiplicity(1)>0)
+ {
+ cathode=1;
+ }
+
+ return cathode;