00001 #ifndef ALIFMDGEOMETRY_H
00002 #define ALIFMDGEOMETRY_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ALIGEOMETRY_H
00018 # include <AliGeometry.h>
00019 #endif
00020 #ifndef ROOT_TArrayI
00021 # include <TArrayI.h>
00022 #endif
00023 #ifndef ROOT_TMatrixFfwd
00024 # include <TMatrixFfwd.h>
00025 #endif
00026 class TVector3;
00027 class TParticle;
00028 class AliRecPoint;
00029 class AliFMDRing;
00030 class AliFMDDetector;
00031 class AliFMD1;
00032 class AliFMD2;
00033 class AliFMD3;
00034 class AliFMDGeometryBuilder;
00035
00036
00037
00077 class AliFMDGeometry : public AliGeometry
00078 {
00079 public:
00081 static AliFMDGeometry* Instance();
00083 virtual void Init();
00085 virtual void InitTransformations();
00087 AliFMDRing* GetInner() const { return fInner; }
00089 AliFMDRing* GetOuter() const { return fOuter; }
00091 AliFMD1* GetFMD1() const { return (fUseFMD1 ? fFMD1 : 0); }
00093 AliFMD2* GetFMD2() const { return (fUseFMD2 ? fFMD2 : 0); }
00095 AliFMD3* GetFMD3() const { return (fUseFMD3 ? fFMD3 : 0); }
00099 AliFMDDetector* GetDetector(Int_t i) const;
00103 AliFMDRing* GetRing(Char_t i) const;
00105 void Disable(Int_t i);
00107 void Enable(Int_t i);
00109 Double_t GetSiDensity() const { return 2.33; }
00121 void Detector2XYZ(UShort_t detector, Char_t ring,
00122 UShort_t sector, UShort_t strip,
00123 Double_t& x, Double_t& y, Double_t& z) const;
00142 Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z,
00143 UShort_t& detector, Char_t& ring,
00144 UShort_t& sector, UShort_t& strip) const;
00146 void Build();
00148 Int_t GetDetectorOff() const { return fDetectorOff; }
00150 Int_t GetModuleOff() const { return fModuleOff; }
00152 Int_t GetRingOff() const { return fRingOff; }
00154 Int_t GetSectorOff() const { return fSectorOff; }
00156 void SetDetectorOff(Int_t off) { fDetectorOff = off; }
00158 void SetModuleOff(Int_t off) { fModuleOff = off; }
00160 void SetRingOff(Int_t off) { fRingOff = off; }
00162 void SetSectorOff(Int_t off) { fSectorOff = off; }
00166 Bool_t IsActive(Int_t vol) const;
00170 void SetActive(Int_t* active, Int_t n);
00172 void AddActive(Int_t id);
00175 void SetBuilder(AliFMDGeometryBuilder* b) { fBuilder = b; }
00177 void ExtractGeomInfo();
00180 void SetDetailed(Bool_t det) { fDetailed = det; }
00182 Bool_t IsDetailed() const { return fDetailed; }
00184 void UseAssembly(Bool_t ass) { fUseAssembly = ass; }
00185
00186
00191 virtual void GetGlobal(const AliRecPoint* p, TVector3& pos,
00192 TMatrixF& mat) const;
00196 virtual void GetGlobal(const AliRecPoint* p, TVector3& pos) const;
00201 virtual Bool_t Impact(const TParticle* particle) const;
00202 protected:
00203 Bool_t fIsInitialized;
00204 AliFMDRing* fInner;
00205 AliFMDRing* fOuter;
00206 AliFMD1* fFMD1;
00207 AliFMD2* fFMD2;
00208 AliFMD3* fFMD3;
00209 Bool_t fUseFMD1;
00210 Bool_t fUseFMD2;
00211 Bool_t fUseFMD3;
00212 static AliFMDGeometry* fgInstance;
00214 AliFMDGeometry();
00217 AliFMDGeometry(const AliFMDGeometry& other);
00221 AliFMDGeometry& operator=(const AliFMDGeometry& other);
00222 virtual ~AliFMDGeometry() {}
00223
00224 AliFMDGeometryBuilder* fBuilder;
00225 Int_t fDetectorOff;
00226 Int_t fModuleOff;
00227 Int_t fRingOff;
00228 Int_t fSectorOff;
00229 TArrayI fActive;
00230 Bool_t fDetailed;
00231 Bool_t fUseAssembly;
00232
00233 ClassDef(AliFMDGeometry,1);
00234 };
00235
00236
00237 #endif
00238
00239
00240
00241
00242
00243
00244
00245