]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpTransformer.h
Added ConnectionMapCIterator typedef
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTransformer.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: basic
3//
4// Class AliMpTransformer
5// ----------------------
6// Class contains definition of transformation and
7// provides functions for transforming pads.
8//
9// Transformation of pad characteristics according to sectors:
10//
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.
15//
16// Where (posId', Guassi') is the location of the pad
17// in the clipped sector.
18//
19// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
20
21#ifndef ALI_MP_TRANSFORMER_H
22#define ALI_MP_TRANSFORMER_H
23
24#include <TVector2.h>
25#include <TObject.h>
26
27#include "AliMpIntPair.h"
28#include "AliMpArea.h"
29#include "AliMpPad.h"
30
31class AliMpTransformer : public TObject
32{
33 public:
34 AliMpTransformer(const TVector2& offset, const AliMpIntPair& scale);
35 AliMpTransformer();
36 virtual ~AliMpTransformer();
37
38 // public methods
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;
48
49 // get methods
50 TVector2 GetOffset() const;
51 AliMpIntPair GetScale() const;
52
53 private:
54 // methods
55 void CutInterval(Double_t x1, Double_t x2, Double_t x0, Double_t s,
56 Double_t& pos, Double_t& dx) const;
57
58 // data members
59 TVector2 fOffset; // translation transformation
60 AliMpIntPair fScale; // reflection transformation
61
62 ClassDef(AliMpTransformer,1) // Transformer
63};
64
65// inline functions
66
67inline TVector2 AliMpTransformer::GetOffset() const { return fOffset; }
68inline AliMpIntPair AliMpTransformer::GetScale() const { return fScale; }
69
70#endif //ALI_MP_TRANSFORMER_H
71