]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDGeometry.h
Added new library libFMDutil. This library contains utility classes that
[u/mrichter/AliRoot.git] / FMD / AliFMDGeometry.h
CommitLineData
1a1fdef7 1#ifndef ALIFMDGEOMETRY_H
2#define ALIFMDGEOMETRY_H
3//____________________________________________________________________
4//
5// $Id$
6//
69b696b9 7// Forward Multiplicity Detector based on Silicon wafers.
8//
9// This class is a singleton that handles the geometry parameters of
10// the FMD detectors.
11//
1a1fdef7 12#ifndef ALIGEOMETRY_H
13# include <AliGeometry.h>
14#endif
1a1fdef7 15class TVector3;
16class TMatrix;
17class TParticle;
18class AliRecPoint;
19class AliFMDRing;
20class AliFMDDetector;
21class AliFMD1;
22class AliFMD2;
23class AliFMD3;
54e415a8 24#ifndef USE_PRE_MOVE
25#ifndef ROOT_TArrayI
26# include <TArrayI.h>
27#endif
28class AliFMDGeometryBuilder;
29class TArrayI;
30#endif
1a1fdef7 31
32
33//__________________________________________________________________
34/** Singleton object of FMD geometry descriptions and parameters.
35 */
36class AliFMDGeometry : public AliGeometry
37{
38public:
39 static AliFMDGeometry* Instance();
40 virtual void Init();
41 AliFMDRing* GetInner() const { return fInner; }
42 AliFMDRing* GetOuter() const { return fOuter; }
43 AliFMD1* GetFMD1() const { return (fUseFMD1 ? fFMD1 : 0); }
44 AliFMD2* GetFMD2() const { return (fUseFMD2 ? fFMD2 : 0); }
45 AliFMD3* GetFMD3() const { return (fUseFMD3 ? fFMD3 : 0); }
46 AliFMDDetector* GetDetector(Int_t i) const;
47 AliFMDRing* GetRing(Char_t i) const;
48 void Disable(Int_t i);
49 void Enable(Int_t i);
50 Double_t GetSiDensity() const { return 2.33; }
54e415a8 51 void Detector2XYZ(UShort_t detector, Char_t ring,
52 UShort_t sector, UShort_t strip,
53 Double_t& x, Double_t& y, Double_t& z) const;
54 Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z,
55 UShort_t& detector, Char_t& ring,
56 UShort_t& sector, UShort_t& strip) const;
57#ifndef USE_PRE_MOVE
58 void Build();
59 Int_t GetDetectorOff() const { return fDetectorOff; }
60 Int_t GetModuleOff() const { return fModuleOff; }
61 Int_t GetRingOff() const { return fRingOff; }
62 Int_t GetSectorOff() const { return fSectorOff; }
63 void SetDetectorOff(Int_t off) { fDetectorOff = off; }
64 void SetModuleOff(Int_t off) { fModuleOff = off; }
65 void SetRingOff(Int_t off) { fRingOff = off; }
66 void SetSectorOff(Int_t off) { fSectorOff = off; }
67 Bool_t IsActive(Int_t vol) const;
68 void SetActive(Int_t* active, Int_t n);
69 void AddActive(Int_t id);
70 void SetBuilder(AliFMDGeometryBuilder* b) { fBuilder = b; }
71 void ExtractGeomInfo();
72 void SetDetailed(Bool_t det) { fDetailed = det; }
73 Bool_t IsDetailed() const { return fDetailed; }
74 void UseAssembly(Bool_t ass) { fUseAssembly = ass; }
75#endif
1a1fdef7 76
77 // AliGeometry member functions
78 virtual void GetGlobal(const AliRecPoint* p, TVector3& pos,
79 TMatrix& mat) const;
80 virtual void GetGlobal(const AliRecPoint* p, TVector3& pos) const;
81 virtual Bool_t Impact(const TParticle* particle) const;
82protected:
69b696b9 83 Bool_t fIsInitialized; // Whether singleton is initalized
1a1fdef7 84 AliFMDRing* fInner; // Inner ring geometry information
85 AliFMDRing* fOuter; // Outer ring geometry information
86 AliFMD1* fFMD1; // FMD1 geometry information
87 AliFMD2* fFMD2; // FMD2 geometry information
88 AliFMD3* fFMD3; // FMD3 geometry information
89 Bool_t fUseFMD1; // Wheter to Use FMD1 or not
90 Bool_t fUseFMD2; // Wheter to Use FMD2 or not
91 Bool_t fUseFMD3; // Wheter to Use FMD3 or not
69b696b9 92 static AliFMDGeometry* fgInstance; // Singleton instance
1a1fdef7 93 AliFMDGeometry();
69b696b9 94 AliFMDGeometry(const AliFMDGeometry& other);
95 AliFMDGeometry& operator=(const AliFMDGeometry& other);
1a1fdef7 96 virtual ~AliFMDGeometry() {}
69b696b9 97
54e415a8 98#ifndef USE_PRE_MOVE
99 AliFMDGeometryBuilder* fBuilder;
100 Int_t fDetectorOff;
101 Int_t fModuleOff;
102 Int_t fRingOff;
103 Int_t fSectorOff;
104 TArrayI fActive;
105 Bool_t fDetailed;
106 Bool_t fUseAssembly;
107#endif
108
1a1fdef7 109 ClassDef(AliFMDGeometry,1); //
110};
111
112
113#endif
114//____________________________________________________________________
115//
116// Local Variables:
117// mode: C++
118// End:
119//
120// EOF
121//