1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpVSegmentation.h,v 1.12 2006/05/24 13:58:07 ivana Exp $
8 /// \class AliMpVSegmentation
9 /// \brief The abstract base class for the segmentation.
11 /// Provides methods related to pads:
12 /// conversion between pad indices, pad location, pad position;
13 /// finding pad neighbour.
15 /// \author David Guez, Ivana Hrivnacova, IPN Orsay;
16 /// Laurent Aphecetche, SUBATECH
18 #ifndef ALI_MP_V_SEGMENTATION_H
19 #define ALI_MP_V_SEGMENTATION_H
23 #include "AliMpPadPair.h"
25 #include "AliMpPlaneType.h"
26 #include "AliMpStationType.h"
28 class AliMpVPadIterator;
36 class AliMpVSegmentation : public TObject
40 virtual ~AliMpVSegmentation();
43 /// Create iterator over pads in the given area
44 virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
46 /// Create a pad iterator over the whole area
47 virtual AliMpVPadIterator* CreateIterator() const = 0;
49 /// Fill the array with the pads that are neighbours of pad. Returns
50 /// the number of neighbours.
51 virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
52 Bool_t includeSelf=kFALSE,
53 Bool_t includeVoid=kFALSE) const = 0;
57 /// Find pad by location
58 virtual AliMpPad PadByLocation(const AliMpIntPair& location,
59 Bool_t warning = true) const = 0;
60 /// Find pad by indices
61 virtual AliMpPad PadByIndices (const AliMpIntPair& indices,
62 Bool_t warning = true) const = 0;
63 /// Find pad by position
64 virtual AliMpPad PadByPosition(const TVector2& position,
65 Bool_t warning = true) const = 0;
67 virtual AliMpPadPair PadsUp(const AliMpPad& pad) const;
68 virtual AliMpPadPair PadsDown(const AliMpPad& pad) const;
69 virtual AliMpPadPair PadsLeft(const AliMpPad& pad) const;
70 virtual AliMpPadPair PadsRight(const AliMpPad& pad) const;
72 /// Return maximum pad index in X direction
73 virtual Int_t MaxPadIndexX() const = 0;
74 /// Return maximum pad index in Y direction
75 virtual Int_t MaxPadIndexY() const = 0;
76 /// Return the number of pads in the detection element
77 virtual Int_t NofPads() const = 0;
79 /// Return true if the pad with given indices exists
80 virtual Bool_t HasPad(const AliMpIntPair& indices) const = 0;
82 /// Fill the given array with the electronic card IDs
83 virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
85 /// Return the plane type
86 virtual AliMp::PlaneType PlaneType() const = 0;
88 /// Return the station type
89 virtual AliMp::StationType StationType() const = 0;
91 /// Return the half-sizes of the detection element
92 virtual TVector2 Dimensions() const = 0;
96 AliMpPadPair FindPads(const TVector2& position1,
97 const TVector2& position2) const;
99 ClassDef(AliMpVSegmentation,1) // Segmentation
102 #endif //ALI_MP_V_SEGMENTATION_H