]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpMotifSpecial.h
Adding new libraries
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifSpecial.h
CommitLineData
dee1d5f1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
5f91c9e8 4// $Id$
13985652 5// $MpId: AliMpMotifSpecial.h,v 1.11 2006/05/24 13:58:18 ivana Exp $
dee1d5f1 6
7/// \ingroup motif
8/// \class AliMpMotifSpecial
9/// \brief A special motif with varying pad dimensions
10///
13985652 11/// \author David Guez, Ivana Hrivnacova; IPN Orsay
5f91c9e8 12
13#ifndef ALI_MP_MOTIF_SPECIAL_H
14#define ALI_MP_MOTIF_SPECIAL_H
15
5006ec94 16#include "AliMpContainers.h"
17
2a7ea2e6 18#include "AliMpVMotif.h"
5006ec94 19#ifdef WITH_ROOT
5006ec94 20#include "AliMpExMap.h"
21#endif
22
5f91c9e8 23#include <TVector2.h>
2a7ea2e6 24#ifdef WITH_ROOT
25#include <TObjArray.h>
26#endif
5f91c9e8 27
2a7ea2e6 28#ifdef WITH_STL
29#include <vector>
30#endif
5f91c9e8 31
2998a151 32class TString;
33
5f91c9e8 34class AliMpMotifSpecial : public AliMpVMotif
35{
5006ec94 36 public:
37#ifdef WITH_STL
f5671fc3 38 /// Dimensions map type
5006ec94 39 typedef std::vector< TVector2 > DimensionsMap;
f5671fc3 40 /// Dimensions map iterator type
5006ec94 41 typedef std::vector< TVector2 > DimensionsMap2;
42#endif
43#ifdef WITH_ROOT
f5671fc3 44 /// Dimensions map type
5006ec94 45 typedef AliMpExMap DimensionsMap;
f5671fc3 46 /// Dimensions map iterator type
5006ec94 47 typedef TObjArray DimensionsMap2;
48#endif
49
5f91c9e8 50 public:
51 AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
52 AliMpMotifSpecial();
2998a151 53 virtual ~AliMpMotifSpecial();
5f91c9e8 54
55 // Access methods
56 virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const;
57 virtual Int_t GetNofPadDimensions() const;
58 virtual TVector2 GetPadDimensions(Int_t i) const;
59
60 // Set methods
61 void SetPadDimensions(const AliMpIntPair& localIndices,
62 const TVector2& dimensions);
63
64 // Geometry
d7885370 65 void CalculateDimensions();
5f91c9e8 66 virtual TVector2 Dimensions() const;
67
68 // Other methods
69 virtual TVector2 PadPositionLocal(const AliMpIntPair& localIndices) const;
70 virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
71
72 private:
5f91c9e8 73 // methods
74 Int_t VectorIndex(const AliMpIntPair& indices) const;
75
76 // data members
829425a5 77 TVector2 fDimensions; ///< motif dimensions
78 DimensionsMap fPadDimensionsVector; ///< the vector of pad dimensions
79 DimensionsMap2 fPadDimensionsVector2; ///< the vector of different pad dimensions
5f91c9e8 80
d7885370 81 ClassDef(AliMpMotifSpecial,2) // A motif with its ID
5f91c9e8 82};
83
84#endif //ALI_MP_MOTIF_SPECIAL_H