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