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
24 #include "AliMpPlaneType.h"
25 #include "AliMpStationType.h"
27 class AliMpVPadIterator;
29 class AliMpMotifPosition;
35 class AliMpVSegmentation : public TObject
39 virtual ~AliMpVSegmentation();
46 /// Create iterator over pads in the given area
47 virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
49 /// Create a pad iterator over the whole area
50 virtual AliMpVPadIterator* CreateIterator() const = 0;
52 /// Fill the array with the pads that are neighbours of pad. Returns
53 /// the number of neighbours.
54 virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
55 Bool_t includeSelf=kFALSE,
56 Bool_t includeVoid=kFALSE) const = 0;
58 /// Find pad by location
59 virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel,
60 Bool_t warning = true) const = 0;
61 /// Find pad by indices
62 virtual AliMpPad PadByIndices (Int_t ix, Int_t iy,
63 Bool_t warning = true) const = 0;
64 /// Find pad by position
65 virtual AliMpPad PadByPosition(const TVector2& position,
66 Bool_t warning = true) const = 0;
67 /// Return true if the pad with given indices exists.
68 /// Compared with the PadByIndices method, this one can generally be implemented
69 /// faster, as one does not have to create an AliMpPad object...
70 virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const;
72 /// Return true if the pad with given location exists
73 virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const;
75 /// Return maximum pad index in X direction
76 virtual Int_t MaxPadIndexX() const = 0;
77 /// Return maximum pad index in Y direction
78 virtual Int_t MaxPadIndexY() const = 0;
79 /// Return the number of pads in the detection element
80 virtual Int_t NofPads() const = 0;
82 /// Fill the given array with the electronic card IDs
83 virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
85 /// Get the number of electronic card IDs
86 virtual Int_t GetNofElectronicCards() const = 0;
88 /// Whether or not we have a given manu
89 virtual Bool_t HasMotifPosition(Int_t manuId) const = 0;
91 /// Return the position of a given manu (aka motifPosition)
92 virtual AliMpMotifPosition* MotifPosition(Int_t manuId) const = 0;
94 /// Return the plane type
95 virtual AliMp::PlaneType PlaneType() const = 0;
97 /// Return the station type
98 virtual AliMp::StationType StationType() const = 0;
100 /// Return the half-sizes of the detection element
101 virtual TVector2 Dimensions() const = 0;
103 /// Return the position of the origine of the detection element
104 virtual TVector2 Position() const = 0;
107 ClassDef(AliMpVSegmentation,1) // Segmentation
110 #endif //ALI_MP_V_SEGMENTATION_H