]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpPlaneSegmentation.h
new class AliMUONLoader
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPlaneSegmentation.h
CommitLineData
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"
27#include "AliMpIntPair.h"
28#include "AliMpPad.h"
29#include "AliMpTransformer.h"
30
31class AliMpPlane;
32class AliMpSectorSegmentation;
33class AliMpVPadIterator;
34
35class 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 private:
66 // methods
67 const AliMpTransformer* GetTransformer(const AliMpIntPair& scale) const;
68 AliMpIntPair GetScale(const AliMpIntPair& pair) const;
69 AliMpIntPair GetScale(const TVector2& vector) const;
70 AliMpIntPair GetLocationScale(const AliMpIntPair& location) const;
71 AliMpSectorSegmentation* GetSectorSegmentation(Int_t motifPositionId) const;
72
73 // data members
74 const AliMpPlane* fkPlane; // plane
75 AliMpSectorSegmentation* fFrontSectorSegmentation;// front sector segmentation
76 AliMpSectorSegmentation* fBackSectorSegmentation; // back sector segmentation
77 TransformerVector fTransformers; // transformer for each quadrant
78
79 ClassDef(AliMpPlaneSegmentation,1) // Plane segmentation
80};
81
82#endif //ALI_MP_PLANE_SEGMENTATION_H
83