]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: plane | |
3 | // | |
4 | // Class AliMpPlaneSegmentation | |
5 | // ---------------------------- | |
6 | // Class describing the segmentation of the plane. | |
7 | // | |
8 | // Transformation of pad characteristics according to sectors: | |
9 | // | |
10 | // I. ( posId, Guassi ), ( i, j), ( x, y) II. | I. | |
11 | // II. ( posId', Guassi'), (-i, j), (-x, y) _____ | ____ | |
12 | // III. (-posId, Guassi), (-i,-j), (-x,-y) | | |
13 | // IV. (-posId', Guassi'), ( i,-j), ( x,-y) III. | IV. | |
14 | // | |
15 | // Where (posId', Guassi') is the location of the pad | |
16 | // in the clipped sector. | |
17 | // | |
18 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
19 | ||
20 | #ifndef ALI_MP_PLANE_SEGMENTATION_H | |
21 | #define ALI_MP_PLANE_SEGMENTATION_H | |
22 | ||
23 | #include <TVector2.h> | |
24 | ||
25 | #include "AliMpPlaneTypes.h" | |
26 | #include "AliMpVSegmentation.h" | |
2998a151 | 27 | #include "AliMpTransformer.h" |
5f91c9e8 | 28 | #include "AliMpIntPair.h" |
29 | #include "AliMpPad.h" | |
5f91c9e8 | 30 | |
31 | class AliMpPlane; | |
32 | class AliMpSectorSegmentation; | |
33 | class AliMpVPadIterator; | |
34 | ||
35 | class AliMpPlaneSegmentation : public AliMpVSegmentation | |
36 | { | |
37 | public: | |
38 | AliMpPlaneSegmentation(const AliMpPlane* plane); | |
39 | AliMpPlaneSegmentation(); | |
40 | virtual ~AliMpPlaneSegmentation(); | |
41 | ||
42 | // factory method | |
43 | virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const; | |
44 | ||
45 | // methods | |
46 | virtual AliMpPad PadByLocation(const AliMpIntPair& location, | |
47 | Bool_t warning = kTRUE) const; | |
48 | virtual AliMpPad PadByIndices (const AliMpIntPair& indices, | |
49 | Bool_t warning = kTRUE) const; | |
50 | virtual AliMpPad PadByPosition(const TVector2& position, | |
51 | Bool_t warning = kTRUE) const; | |
580c28fd | 52 | |
53 | virtual Int_t MaxPadIndexX(); | |
54 | virtual Int_t MaxPadIndexY(); | |
5f91c9e8 | 55 | |
56 | virtual Int_t Zone(const AliMpPad& pad, Bool_t warning = kTRUE) const; | |
57 | virtual TVector2 PadDimensions(Int_t zone, Bool_t warning = kTRUE) const; | |
58 | ||
59 | virtual Bool_t HasPad(const AliMpIntPair& indices) const; | |
60 | Bool_t CircleTest(const AliMpIntPair& indices) const; | |
61 | ||
62 | // get methods | |
63 | Int_t GetNofTransformers() const; | |
64 | AliMpTransformer* GetTransformer(Int_t i) const; | |
65 | AliMpSectorSegmentation* GetSectorSegmentation( | |
66 | const AliMpIntPair& scale) const; | |
67 | ||
fb1bf5c0 | 68 | protected: |
69 | AliMpPlaneSegmentation(const AliMpPlaneSegmentation& right); | |
70 | AliMpPlaneSegmentation& operator = (const AliMpPlaneSegmentation& right); | |
71 | ||
5f91c9e8 | 72 | private: |
73 | // methods | |
74 | const AliMpTransformer* GetTransformer(const AliMpIntPair& scale) const; | |
75 | AliMpIntPair GetScale(const AliMpIntPair& pair) const; | |
76 | AliMpIntPair GetScale(const TVector2& vector) const; | |
77 | AliMpIntPair GetLocationScale(const AliMpIntPair& location) const; | |
78 | AliMpSectorSegmentation* GetSectorSegmentation(Int_t motifPositionId) const; | |
79 | ||
80 | // data members | |
81 | const AliMpPlane* fkPlane; // plane | |
82 | AliMpSectorSegmentation* fFrontSectorSegmentation;// front sector segmentation | |
83 | AliMpSectorSegmentation* fBackSectorSegmentation; // back sector segmentation | |
84 | TransformerVector fTransformers; // transformer for each quadrant | |
85 | ||
86 | ClassDef(AliMpPlaneSegmentation,1) // Plane segmentation | |
87 | }; | |
88 | ||
89 | #endif //ALI_MP_PLANE_SEGMENTATION_H | |
90 |