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