1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpPad.h,v 1.11 2006/05/24 13:58:07 ivana Exp $
9 /// \brief Class which encapsuate all information about a pad
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
18 #include "AliMpIntPair.h"
21 #include <TClonesArray.h>
23 class AliMpPad : public TObject
26 AliMpPad(const AliMpIntPair& location, const AliMpIntPair& indices,
27 const TVector2& position, const TVector2& dimensions,
28 Bool_t validity = true);
30 AliMpPad(const AliMpPad& src);
36 Bool_t operator == (const AliMpPad& pos2) const;
37 Bool_t operator != (const AliMpPad& pos2) const;
38 AliMpPad& operator = (const AliMpPad& src) ;
43 void PrintOn(ostream& out) const;
44 virtual void Print(const char* /*option*/ = "") const;
49 /// Return invalid pad
50 static AliMpPad Invalid() {return AliMpPad();}
55 Bool_t AddLocation(const AliMpIntPair& location, Bool_t warn = true);
60 /// Return pad location
61 AliMpIntPair GetLocation() const {return fLocation;}
62 /// Return pad indices
63 AliMpIntPair GetIndices() const {return fIndices;}
64 /// Return the pad position (in cm)
65 TVector2 Position() const {return fPosition ;}
66 /// Return the pad dimensions (in cm)
67 TVector2 Dimensions() const {return fDimensions;}
69 Bool_t IsValid() const {return fValidity ;}
71 Int_t GetNofLocations() const;
72 AliMpIntPair GetLocation(Int_t i) const;
73 Bool_t HasLocation(const AliMpIntPair& location) const;
76 // static data members
77 static const Int_t fgkMaxNofLocations; ///< \brief maximum number of pad locations
80 AliMpIntPair* fLocations; ///< collection of pad locations
81 UInt_t fNofLocations; ///< number of locations in fLocations
82 AliMpIntPair fLocation; ///< pad location
83 AliMpIntPair fIndices; ///< pad indices
84 TVector2 fPosition; ///< the pad position (in cm)
85 TVector2 fDimensions; ///< the pad dimensions (in cm)
86 Bool_t fValidity; ///< validity
88 ClassDef(AliMpPad,2) //utility class for the motif type
91 ostream& operator << (ostream &out, const AliMpPad& op);
92 Bool_t operator < (const AliMpPad& left, const AliMpPad& right);