]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDDetector.h
Initialization of some data members. Copy constructor and assignment operators made...
[u/mrichter/AliRoot.git] / FMD / AliFMDDetector.h
CommitLineData
1a1fdef7 1#ifndef ALIFMDDETECTOR_H
2#define ALIFMDDETECTOR_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 */
10#ifndef ROOT_TNamed
11# include <TNamed.h>
12#endif
13class AliFMDRing;
bf000c32 14class TGeoMatrix;
1a1fdef7 15
9f662337 16/** @defgroup FMD_base Basic classes */
1a1fdef7 17//__________________________________________________________________
18/** Base class for the geometry description and parameters of the FMD
19 sub detectors FMD1, FMD2, and FMD3.
20
21 This class hold common parameters of the specific FMD detectors.
9f662337 22 @ingroup FMD_base
1a1fdef7 23*/
24class AliFMDDetector : public TNamed
25{
26public:
9f662337 27 /** Constructor
28 @param id Detector number
29 @param inner Pointer to inner ring geometry
30 @param outer Pointer to inner outer geometry
31 @return */
1a1fdef7 32 AliFMDDetector(Int_t id, AliFMDRing* inner, AliFMDRing* outer);
9f662337 33 /** Copy CTOR
34 @param other Object to copy from. */
088f8e79 35 AliFMDDetector(const AliFMDDetector& other);
9f662337 36 /** Assignment operator
37 @param other Object to assign from
38 @return reference to this object */
088f8e79 39 AliFMDDetector& operator=(const AliFMDDetector& other);
1a1fdef7 40 virtual ~AliFMDDetector() {}
41 /** Initialize the geometry */
42 virtual void Init();
bf000c32 43 /** Find the transformations that correspond to modules of this
44 detector, and store them in the arrays. */
45 virtual void InitTransformations();
46
1a1fdef7 47 /** @param x Detector number */
48 void SetId(Int_t x) { fId = x; }
49 /** @param x Position of outer ring along z */
50 void SetInnerZ(Double_t x) { fInnerZ = x; }
51 /** @param x Position of outer ring along z */
52 void SetOuterZ(Double_t x) { fOuterZ = x; }
53 /** @param x Thickness of honeycomb plate */
54 void SetHoneycombThickness(Double_t x=1) { fHoneycombThickness = x; }
55 /** @param x Thickness of aluminium of honeycomb */
56 void SetAlThickness(Double_t x=.1) { fAlThickness = x; }
57 /** @param x Inner radius of inner honeycomb */
58 void SetInnerHoneyLowR(Double_t x) { fInnerHoneyLowR = x; }
59 /** @param x Outer radius of inner honeycomb */
60 void SetInnerHoneyHighR(Double_t x) { fInnerHoneyHighR = x; }
61 /** @param x Inner radius of outer honeycomb */
62 void SetOuterHoneyLowR(Double_t x) { fOuterHoneyLowR = x; }
63 /** @param x Outer radius of outer honeycomb */
64 void SetOuterHoneyHighR(Double_t x) { fOuterHoneyHighR = x; }
65
66 /** @return Detector number */
67 Int_t GetId() const { return fId; }
68 /** @return Position of outer ring along z */
69 Double_t GetInnerZ() const { return fInnerZ; }
70 /** @return Position of outer ring along z */
71 Double_t GetOuterZ() const { return fOuterZ; }
72 /** @return Thickness of honeycomb plate */
73 Double_t GetHoneycombThickness() const { return fHoneycombThickness; }
74 /** @return Thickness of aluminium of honeycomb */
75 Double_t GetAlThickness() const { return fAlThickness; }
76 /** @return Inner radius of inner honeycomb */
77 Double_t GetInnerHoneyLowR() const { return fInnerHoneyLowR; }
78 /** @return Outer radius of inner honeycomb */
79 Double_t GetInnerHoneyHighR() const { return fInnerHoneyHighR; }
80 /** @return Inner radius of outer honeycomb */
81 Double_t GetOuterHoneyLowR() const { return fOuterHoneyLowR; }
82 /** @return Outer radius of outer honeycomb */
83 Double_t GetOuterHoneyHighR() const { return fOuterHoneyHighR; }
84
85 /** @return Inner ring information */
86 AliFMDRing* GetInner() const { return fInner; }
87 /** @return Outer ring information */
88 AliFMDRing* GetOuter() const { return fOuter; }
89 /** @param id Id of ring to get
90 @return Pointer to ring, 0 on failure */
91 AliFMDRing* GetRing(Char_t id) const;
92 /** @param id Id of ring to get
93 @return Z position of ring or 0 on failure */
94 Double_t GetRingZ(Char_t id) const;
95
9f662337 96 /** Translate detector coordinates (detector, ring, sector, strip)
97 to spatial coordinates (x, y, z) in the master reference frame
98 of ALICE. The member function uses the transformations
99 previously obtained from the TGeoManager.
100 @param ring Ring id
101 @param sector Sector number
102 @param strip Strip number
103 @param x On return, X coordinate
104 @param y On return, Y coordinate
105 @param z On return, Z coordinate */
1a1fdef7 106 void Detector2XYZ(Char_t ring, UShort_t sector, UShort_t strip,
107 Double_t& x, Double_t& y, Double_t& z) const;
9f662337 108 /** Translate spatial coordinates (x,y,z) in the master reference
109 frame of ALICE to the detector coordinates (detector, ring,
110 sector, strip). Note, that if this method is to be used in
111 reconstruction or the like, then the input z-coordinate should
112 be corrected for the events interactions points z-coordinate,
113 like
114 @code
115 geom->XYZ2Detector(x,y,z-ipz,d,r,s,t);
116 @endverbatim
117 @param x X coordinate
118 @param y Y coordinate
119 @param z Z coordinate
120 @param ring On return, Ring id
121 @param sector On return, Sector number
122 @param strip On return, Strip number
123 @return @c false of (@a x, @a y, @a z) is not within this
124 detector. */
54e415a8 125 Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z,
126 Char_t& ring, UShort_t& sector, UShort_t& strip) const;
1a1fdef7 127protected:
9f662337 128 /** Check if we have all transformations for a ring
129 @param ring Ring to check for
130 @return @c true if we got all transforms */
bf000c32 131 Bool_t HasAllTransforms(Char_t ring) const;
9f662337 132 /** Get transformation matrix for a sector in a ring
133 @param ring Ring id
134 @param sector Sector numberr
135 @return Matrix on success, 0 otherwise */
bf000c32 136 TGeoMatrix* FindTransform(Char_t ring, UShort_t sector) const;
1a1fdef7 137 Int_t fId; // Detector number
138 Double_t fInnerZ; // Position of outer ring along z
139 Double_t fOuterZ; // Position of outer ring along z
140 Double_t fHoneycombThickness; // Thickness of honeycomb plate
141 Double_t fAlThickness; // Thickness of aluminium of honeycomb
142 Double_t fInnerHoneyLowR; // Inner radius of inner honeycomb
143 Double_t fInnerHoneyHighR; // Outer radius of inner honeycomb
144 Double_t fOuterHoneyLowR; // Inner radius of outer honeycomb
145 Double_t fOuterHoneyHighR; // Outer radius of outer honeycomb
146 AliFMDRing* fInner; // Pointer to inner ring information
147 AliFMDRing* fOuter; // Pointer to outer ring information
9f662337 148 TObjArray* fInnerTransforms; // List of inner module global
149 TObjArray* fOuterTransforms; // List of outer module global
bf000c32 150
1a1fdef7 151 ClassDef(AliFMDDetector, 1); //
152};
153
154#endif
155//____________________________________________________________________
156//
157// Local Variables:
158// mode: C++
159// End:
160//
161// EOF
162//