4 // Class AliMpTransformer
5 // ----------------------
6 // Class contains definition of transformation and
7 // provides functions for transforming pads.
9 // Transformation of pad characteristics according to sectors:
11 // I. ( posId, Guassi ), ( i, j), ( x, y) II. | I.
12 // II. ( posId', Guassi'), (-i, j), (-x, y) _____ | ____
13 // III. (-posId, Guassi), (-i,-j), (-x,-y) |
14 // IV. (-posId', Guassi'), ( i,-j), ( x,-y) III. | IV.
16 // Where (posId', Guassi') is the location of the pad
17 // in the clipped sector.
19 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
21 #ifndef ALI_MP_TRANSFORMER_H
22 #define ALI_MP_TRANSFORMER_H
27 #include "AliMpIntPair.h"
28 #include "AliMpArea.h"
31 class AliMpTransformer : public TObject
34 AliMpTransformer(const TVector2& offset, const AliMpIntPair& scale);
36 virtual ~AliMpTransformer();
39 AliMpIntPair Scale(const AliMpIntPair& pair) const;
40 TVector2 Scale(const TVector2& vector) const;
41 AliMpIntPair ScaleLocation(const AliMpIntPair& orig) const;
42 AliMpPad Scale(const AliMpPad& pad) const;
43 TVector2 Transform(const TVector2& vector) const;
44 TVector2 ITransform(const TVector2& vector) const;
45 AliMpPad Transform(const AliMpPad& pad) const;
46 AliMpPad ITransform(const AliMpPad& pad) const;
47 AliMpArea CutArea(const AliMpArea& area) const;
50 TVector2 GetOffset() const;
51 AliMpIntPair GetScale() const;
55 void CutInterval(Double_t x1, Double_t x2, Double_t x0, Double_t s,
56 Double_t& pos, Double_t& dx) const;
59 TVector2 fOffset; // translation transformation
60 AliMpIntPair fScale; // reflection transformation
62 ClassDef(AliMpTransformer,1) // Transformer
67 inline TVector2 AliMpTransformer::GetOffset() const { return fOffset; }
68 inline AliMpIntPair AliMpTransformer::GetScale() const { return fScale; }
70 #endif //ALI_MP_TRANSFORMER_H