]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpPlaneSegmentation.h
Mapping test macros (D. Guez, I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPlaneSegmentation.h
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"
27 #include "AliMpTransformer.h"
28 #include "AliMpIntPair.h"
29 #include "AliMpPad.h"
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;
52
53     virtual Int_t    Zone(const AliMpPad& pad, Bool_t warning = kTRUE) const;
54     virtual TVector2 PadDimensions(Int_t zone, Bool_t warning = kTRUE) const;
55
56     virtual Bool_t HasPad(const AliMpIntPair& indices) const;
57     Bool_t CircleTest(const AliMpIntPair& indices) const;
58
59     // get methods
60     Int_t GetNofTransformers() const;
61     AliMpTransformer* GetTransformer(Int_t i) const;
62     AliMpSectorSegmentation* GetSectorSegmentation(
63                                    const AliMpIntPair& scale) const;
64
65   protected:
66     AliMpPlaneSegmentation(const AliMpPlaneSegmentation& right);
67     AliMpPlaneSegmentation&  operator = (const AliMpPlaneSegmentation& right);
68
69   private:
70     // methods    
71     const AliMpTransformer* GetTransformer(const AliMpIntPair& scale) const;
72     AliMpIntPair GetScale(const AliMpIntPair& pair) const;
73     AliMpIntPair GetScale(const TVector2& vector) const;
74     AliMpIntPair GetLocationScale(const AliMpIntPair& location) const;    
75     AliMpSectorSegmentation* GetSectorSegmentation(Int_t motifPositionId) const;
76
77     // data members        
78     const AliMpPlane*         fkPlane;                 // plane
79     AliMpSectorSegmentation*  fFrontSectorSegmentation;// front sector segmentation
80     AliMpSectorSegmentation*  fBackSectorSegmentation; // back sector segmentation
81     TransformerVector         fTransformers;    // transformer for each quadrant
82
83   ClassDef(AliMpPlaneSegmentation,1)  // Plane segmentation
84 };
85
86 #endif //ALI_MP_PLANE_SEGMENTATION_H
87