AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFMDGeometry.h
Go to the documentation of this file.
1 #ifndef ALIFMDGEOMETRY_H
2 #define ALIFMDGEOMETRY_H
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  */
15 //____________________________________________________________________
16 //
17 // Forward Multiplicity Detector based on Silicon wafers.
18 //
19 // This class is a singleton that handles the geometry parameters of
20 // the FMD detectors.
21 // The actual code is done by various separate classes.
22 //
23 #ifndef ALIGEOMETRY_H
24 # include <AliGeometry.h>
25 #endif
26 #ifndef ROOT_TArrayI
27 # include <TArrayI.h>
28 #endif
29 #ifndef ROOT_TMatrixFfwd
30 # include <TMatrixFfwd.h>
31 #endif
32 class TVector3;
33 class TParticle;
34 class AliRecPoint;
35 class AliFMDRing;
36 class AliFMDDetector;
37 class AliFMD1;
38 class AliFMD2;
39 class AliFMD3;
41 
42 
43 //__________________________________________________________________
83 class AliFMDGeometry : public AliGeometry
84 {
85 public:
91  static AliFMDGeometry* Instance();
95  virtual void Init();
99  virtual void InitTransformations(Bool_t force=kFALSE);
103  AliFMDRing* GetInner() const { return fInner; }
107  AliFMDRing* GetOuter() const { return fOuter; }
111  AliFMD1* GetFMD1() const { return (fUseFMD1 ? fFMD1 : 0); }
115  AliFMD2* GetFMD2() const { return (fUseFMD2 ? fFMD2 : 0); }
119  AliFMD3* GetFMD3() const { return (fUseFMD3 ? fFMD3 : 0); }
126  AliFMDDetector* GetDetector(Int_t i) const;
135  AliFMDRing* GetRing(Char_t i) const;
141  void Disable(Int_t i);
147  void Enable(Int_t i);
151  Double_t GetSiDensity() const { return 2.33; }
166  void Detector2XYZ(UShort_t detector, Char_t ring,
167  UShort_t sector, UShort_t strip,
168  Double_t& x, Double_t& y, Double_t& z) const;
190  Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z,
191  UShort_t& detector, Char_t& ring,
192  UShort_t& sector, UShort_t& strip) const;
196  void Build();
200  Int_t GetDetectorOff() const { return fDetectorOff; }
204  Int_t GetModuleOff() const { return fModuleOff; }
208  Int_t GetRingOff() const { return fRingOff; }
212  Int_t GetSectorOff() const { return fSectorOff; }
216  void SetDetectorOff(Int_t off) { fDetectorOff = off; }
220  void SetModuleOff(Int_t off) { fModuleOff = off; }
224  void SetRingOff(Int_t off) { fRingOff = off; }
228  void SetSectorOff(Int_t off) { fSectorOff = off; }
235  Bool_t IsActive(Int_t vol) const;
242  void SetActive(Int_t* active, Int_t n);
248  void AddActive(Int_t id);
254  const TArrayI& ActiveIds() const { return fActive; }
272  void ExtractGeomInfo();
278  void SetDetailed(Bool_t det) { fDetailed = det; }
282  Bool_t IsDetailed() const { return fDetailed; }
286  void UseAssembly(Bool_t ass) { fUseAssembly = ass; }
287 
288  // AliGeometry member functions
296  virtual void GetGlobal(const AliRecPoint* p, TVector3& pos,
297  TMatrixF& mat) const;
304  virtual void GetGlobal(const AliRecPoint* p, TVector3& pos) const;
313  virtual Bool_t Impact(const TParticle* particle) const;
317  virtual void SetAlignableVolumes() const;
318 
319 
336  static Bool_t XYZ2REtaPhiTheta(Double_t x, Double_t y,
337  Double_t z,
338  Double_t& r, Double_t& eta,
339  Double_t& phi, Double_t& theta);
340 
341 protected:
342  Bool_t fIsInitialized; // Whether singleton is initalized
343  AliFMDRing* fInner; // Inner ring geometry information
344  AliFMDRing* fOuter; // Outer ring geometry information
345  AliFMD1* fFMD1; // FMD1 geometry information
346  AliFMD2* fFMD2; // FMD2 geometry information
347  AliFMD3* fFMD3; // FMD3 geometry information
348  Bool_t fUseFMD1; // Wheter to Use FMD1 or not
349  Bool_t fUseFMD2; // Wheter to Use FMD2 or not
350  Bool_t fUseFMD3; // Wheter to Use FMD3 or not
351  Bool_t fIsInitTrans; // Transforms initialised?
352  static AliFMDGeometry* fgInstance; // Singleton instance
356  AliFMDGeometry();
362  AliFMDGeometry(const char* name);
368  AliFMDGeometry(const AliFMDGeometry& other);
375  AliFMDGeometry& operator=(const AliFMDGeometry& other);
379  virtual ~AliFMDGeometry() {}
380 
381  AliFMDGeometryBuilder* fBuilder; // Geometry builder
382  Int_t fDetectorOff; // Detector off-set
383  Int_t fModuleOff; // Module off-set
384  Int_t fRingOff; // ring offset
385  Int_t fSectorOff; // Sector offset
386  TArrayI fActive; // Active volumes
387  Bool_t fDetailed; // Whether to make detailed geom
388  Bool_t fUseAssembly; // Whther to use assemblies
389 
390  ClassDef(AliFMDGeometry,1); // Geometry parameters and manager
391 };
392 
393 
394 #endif
395 //____________________________________________________________________
396 //
397 // Local Variables:
398 // mode: C++
399 // End:
400 //
401 // EOF
402 //
Int_t GetRingOff() const
void SetDetailed(Bool_t det)
TBrowser b
Definition: RunAnaESD.C:12
ring
Definition: AliFMDv1.cxx:69
Geometry parameters of the FMD3 detector. FMD3 has a fairly complicated support structure. The cone also supports the beam-pipe.
Definition: AliFMD3.h:27
AliFMDDetector * GetDetector(Int_t i) const
sector
Definition: AliFMDv1.cxx:91
virtual void InitTransformations(Bool_t force=kFALSE)
virtual void SetAlignableVolumes() const
AliFMDRing * fInner
void SetSectorOff(Int_t off)
Bool_t IsDetailed() const
TMatrixD mat
Definition: AnalyzeLaser.C:9
void Disable(Int_t i)
void SetModuleOff(Int_t off)
AliFMDGeometryBuilder * fBuilder
Base class for the geometry description and parameters of the FMD sub detectors FMD1, FMD2, and FMD3.
AliFMDRing * fOuter
static AliFMDGeometry * fgInstance
Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z, UShort_t &detector, Char_t &ring, UShort_t &sector, UShort_t &strip) const
virtual Bool_t Impact(const TParticle *particle) const
virtual ~AliFMDGeometry()
Singleton object of FMD geometry descriptions and parameters. This class is a singleton that handles ...
AliFMDRing * GetInner() const
ClassDef(AliFMDGeometry, 1)
AliFMDGeometry & operator=(const AliFMDGeometry &other)
AliFMD3 * GetFMD3() const
Geometry description and parameters of the FMD1 detector. The FMD1 has only one ring.
Definition: AliFMD1.h:26
Builder of FMD geometry. This class takes care of actually building the geometry using the TGeo class...
void Detector2XYZ(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Double_t &x, Double_t &y, Double_t &z) const
virtual void Init()
Double_t theta
Definition: AliFMDv1.cxx:78
static AliFMDGeometry * Instance()
Int_t GetSectorOff() const
AliFMD1 * GetFMD1() const
detector
Definition: AliFMDv1.cxx:71
void SetActive(Int_t *active, Int_t n)
void UseAssembly(Bool_t ass)
Bool_t IsActive(Int_t vol) const
Double_t GetSiDensity() const
void AddActive(Int_t id)
static Bool_t XYZ2REtaPhiTheta(Double_t x, Double_t y, Double_t z, Double_t &r, Double_t &eta, Double_t &phi, Double_t &theta)
Int_t det
Definition: AliFMDv1.cxx:70
Geometry description and parameters of a ring in the FMD detector.
Definition: AliFMDRing.h:41
Double_t phi
Definition: AliFMDv1.cxx:88
Int_t GetDetectorOff() const
Int_t GetModuleOff() const
AliFMDRing * GetRing(Char_t i) const
Geometry parameters of the FMD2 detector. This has two rings.
Definition: AliFMD2.h:27
strip
Definition: AliFMDv1.cxx:85
const TArrayI & ActiveIds() const
AliFMDRing * GetOuter() const
void SetRingOff(Int_t off)
void Enable(Int_t i)
void SetBuilder(AliFMDGeometryBuilder *b)
void SetDetectorOff(Int_t off)
Double_t r
Definition: AliFMDv1.cxx:82
virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrixF &mat) const
AliFMD2 * GetFMD2() const