]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPainterHelper.h
Fixing Doxygen warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterHelper.h
CommitLineData
0145e89a 1#ifndef ALIMUONPAINTERHELPER_H
2#define ALIMUONPAINTERHELPER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup graphics
10/// \class AliMUONPainterHelper
11/// \brief Utility class for the painters display
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ROOT_TObject
16# include "TObject.h"
17#endif
18
19#ifndef ROOT_TString
20# include "TString.h"
21#endif
22
23#ifndef ROOT_TVector2
24# include "TVector2.h"
25#endif
26
27#ifndef ALI_MP_PLANE_TYPE_H
28# include "AliMpPlaneType.h"
29#endif
30
31#ifndef ALI_MP_CATHOD_TYPE_H
32# include "AliMpCathodType.h"
33#endif
34
35#ifndef ALIMUONVPAINTER_H
36# include "AliMUONVPainter.h"
37#endif
38
39#ifndef ALI_MP_PAD_H
40# include "AliMpPad.h"
41#endif
42
8f0acce4 43#ifndef ROOT_TMap
44# include "TMap.h"
45#endif
46
0145e89a 47class AliMUONAttPainter;
8f0acce4 48class AliMUONContour;
0145e89a 49class AliMUONPainterEnv;
0145e89a 50class AliMUONVCalibParam;
51class AliMUONVTrackerData;
52class AliMpExMap;
53class AliMpMotifPosition;
54class AliMpPCB;
55class AliMpSector;
56class AliMpSlat;
57class TArrayI;
58class TList;
59class TMap;
60class TObjArray;
61
62class AliMUONPainterHelper : public TObject
63{
64public:
65 AliMUONPainterHelper();
66 virtual ~AliMUONPainterHelper();
67
68 TString ChamberName(Int_t chamberId) const;
69 TString StationName(Int_t stationId) const;
70 TString DEName(Int_t detElemId) const;
71 TString ManuName(Int_t manuId) const;
72 TString BusPatchName(Int_t busPatchId) const;
73 TString PCBName(Int_t pcbNumber) const;
74
75 TString ChamberPathName(Int_t chamberId) const;
76 TString StationPathName(Int_t stationId) const;
77 TString DEPathName(Int_t detElemId) const;
78 TString ManuPathName(Int_t detElemId, Int_t manuId) const;
79 TString BusPatchPathName(Int_t busPatchId) const;
80 TString PCBPathName(Int_t detElemId, Int_t pcbNumber) const;
81
82 Int_t ColorFromValue(Double_t value, Double_t min, Double_t max) const;
83
0145e89a 84 AliMp::CathodType GetCathodeType(Int_t detElemId, Int_t manuId) const;
85
8f0acce4 86 AliMUONContour* GenerateManuContour(Int_t detElemId, Int_t manuId,
0145e89a 87 AliMUONAttPainter viewType,
88 const char* contourName);
89
8f0acce4 90 AliMUONContour* GetContour(const char* contourName) const;
0145e89a 91
9016a84e 92 /// Return a contour by name
8f0acce4 93 AliMUONContour* GetContour(const TString& contourName) const { return GetContour(contourName.Data()); }
0145e89a 94
95 AliMpMotifPosition* GetMotifPosition(Int_t detElemId, Int_t manuId) const;
96
97 AliMpPCB* GetPCB(Int_t detElemId, AliMp::PlaneType planeType,
98 Int_t pcbNumber) const;
99
100 AliMpPCB* GetPCB(Int_t detElemId, AliMp::CathodType cathodType,
101 Int_t pcbNumber) const;
102
103 AliMp::PlaneType GetPlaneType(Int_t manuId) const;
104
105 const AliMpSector* GetSector(Int_t detElemId, AliMp::PlaneType planeType) const;
106
107 const AliMpSlat* GetSlat(Int_t detElemId, AliMp::PlaneType planeType) const;
108
109 const AliMpSlat* GetSlat(Int_t detElemId, AliMp::CathodType cathodeType) const;
110
111 const AliMpSlat* GetSlat(Int_t detElemId, Int_t manuId) const;
112
113 static AliMUONPainterHelper* Instance();
114
115 AliMpPad PadByExplodedPosition(Int_t detElemId, Int_t manuId, Double_t x, Double_t y) const;
116
117 void Exploded2Real(Int_t detElemId, Double_t xe, Double_t ye, Double_t ze,
118 Double_t& xr, Double_t& yr, Double_t& zr) const;
119
120 void Local2Global(Int_t detElemId, Double_t xl, Double_t yl, Double_t zl,
121 Double_t& xg, Double_t& yg, Double_t& zg) const;
122
123 void Local2GlobalReal(Int_t detElemId, Double_t xl, Double_t yl, Double_t zl,
124 Double_t& xg, Double_t& yg, Double_t& zg) const;
125
126 void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg,
127 Double_t& xl, Double_t& yl, Double_t& zl) const;
128
129 void Global2LocalReal(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg,
130 Double_t& xl, Double_t& yl, Double_t& zl) const;
131
8f0acce4 132 AliMUONContour* MergeContours(const TObjArray& contours,
0145e89a 133 const char* contourName);
134
135 virtual void Print(Option_t* opt="") const;
136
8f0acce4 137 void RegisterContour(AliMUONContour* contour);
0145e89a 138
139 TString FormatValue(const char* name, Double_t value) const;
140
9016a84e 141 /// Return the environment
0145e89a 142 AliMUONPainterEnv* Env() { return fEnv; }
143
144private:
145
146 /// Not implemented
147 AliMUONPainterHelper(const AliMUONPainterHelper&);
148 /// Not implemented
149 AliMUONPainterHelper& operator=(const AliMUONPainterHelper&);
150
151 void GenerateDefaultMatrices();
152 void GenerateGeometry();
0145e89a 153
154private:
155 static AliMUONPainterHelper* fgInstance; ///< global instance
156
0145e89a 157 Double_t fExplodeFactor[2]; ///< explosing factors for representation
158 AliMpExMap* fExplodedGlobalTransformations; ///< global geometric transformations (exploded)
159 AliMpExMap* fRealGlobalTransformations; ///< global geometric transformations (real)
0145e89a 160 TObjArray* fPainterMatrices; ///< default matrices
161 AliMUONPainterEnv* fEnv; ///< resources
8f0acce4 162 TMap fAllContours; ///< all contours
0145e89a 163
8f0acce4 164 ClassDef(AliMUONPainterHelper,2) // Helper class for painters
0145e89a 165};
166
167#endif