Removing potentially obsolete macro.
[u/mrichter/AliRoot.git] / FMD / AliFMDv0.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
18*/
19
fe4da5cc 20///////////////////////////////////////////////////////////////////////////////
21// //
22// Forward Multiplicity Detector version 0 //
23// //
24//Begin_Html
25/*
1439f98e 26<img src="picts/AliFMDv0Class.gif">
fe4da5cc 27</pre>
28<br clear=left>
29<font size=+2 color=red>
30<p>The responsible person for this module is
31<a href="mailto:Valeri.Kondratiev@cern.ch">Valeri Kondratiev</a>.
32</font>
33<pre>
34*/
35//End_Html
36// //
37///////////////////////////////////////////////////////////////////////////////
38
39#include "AliRun.h"
40#include "AliFMDv0.h"
41#include "AliMC.h"
99560b47 42#include "stdlib.h"
fe4da5cc 43
44ClassImp(AliFMDv0)
45
46//_____________________________________________________________________________
99560b47 47AliFMDv0::AliFMDv0()
fe4da5cc 48{
49 //
50 // Default constructor for FMD version 0
51 //
52}
53
54//_____________________________________________________________________________
55AliFMDv0::AliFMDv0(const char *name, const char *title)
56 : AliFMD(name,title)
57{
58 //
59 // Standard constructor for FMD version 0
60 //
99560b47 61 AliModule *start = gAlice->GetModule("START");
62 if(start) {
63 Error("ctor","This version of FMD is incompatible with START\n");
64 exit(1);
65 }
fe4da5cc 66}
67
68//___________________________________________
69void AliFMDv0::CreateGeometry()
70{
71 //
72 // Creation of the geometry of the FMD version 0
73 //
74 //Begin_Html
75 /*
1439f98e 76 <img src="picts/AliFMDv0Tree.gif">
fe4da5cc 77 */
78 //End_Html
79 //Begin_Html
80 /*
1439f98e 81 <img src="picts/AliFMDv0.gif">
fe4da5cc 82 */
83 //End_Html
84
fe4da5cc 85
86 Float_t rout, z;
87 Float_t par[3], rin;
88
ad51aeb0 89 Int_t *idtmed = fIdtmed->GetArray()-899;
fe4da5cc 90
91 // ********************************************************
92 // DEFINE RIGHT DISK#3 OF FMD
93 // ********************************************************
94
95 // Define parameters
96
97 rin = 4.5;
98 rout = 10.5;
99 z = 85.;
100 // Ring #1
101 par[0] = rin;
102 par[1] = rout;
103 par[2] = 1.5;
cfce8870 104 gMC->Gsvolu("R1R3", "TUBE", idtmed[900], par, 3);
105 gMC->Gspos("R1R3", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 106 // Ring #2
107 par[0] = rout;
108 par[1] = rout + .65;
109 par[2] = 1.5;
cfce8870 110 gMC->Gsvolu("R2R3", "TUBE", idtmed[901], par, 3);
111 gMC->Gspos("R2R3", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 112 // Ring #3
113 par[0] = rout + .65;
114 par[1] = rout + 5.65;
115 par[2] = .025;
cfce8870 116 gMC->Gsvolu("R3R3", "TUBE", idtmed[902], par, 3);
117 gMC->Gspos("R3R3", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
fe4da5cc 118 // ***********************************************************
119 // DEFINE LEFT DISK#3 OF FMD
120 // ***********************************************************
121
122 // Define parameters
123
124 rin = 4.5;
125 rout = 10.5;
126 z = -85.;
127 // Ring #1
128 par[0] = rin;
129 par[1] = rout;
130 par[2] = 1.5;
cfce8870 131 gMC->Gsvolu("R1L3", "TUBE", idtmed[900], par, 3);
132 gMC->Gspos("R1L3", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 133 // Ring #2
134 par[0] = rout;
135 par[1] = rout + .65;
136 par[2] = 1.5;
cfce8870 137 gMC->Gsvolu("R2L3", "TUBE", idtmed[901], par, 3);
138 gMC->Gspos("R2L3", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 139 // Ring #3
140 par[0] = rout + .65;
141 par[1] = rout + 5.65;
142 par[2] = .025;
cfce8870 143 gMC->Gsvolu("R3L3", "TUBE", idtmed[902], par, 3);
144 gMC->Gspos("R3L3", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
fe4da5cc 145 // ********************************************************
146 // DEFINE RIGHT DISK#2 OF FMD
147 // ********************************************************
148
149 // Define parameters
150
151 rin = 8.;
152 rout = 14.;
153 z = 69.7;
154 // Ring #1
155 par[0] = rin;
156 par[1] = rout;
157 par[2] = 1.5;
cfce8870 158 gMC->Gsvolu("R1R2", "TUBE", idtmed[900], par, 3);
159 gMC->Gspos("R1R2", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 160 // Ring #2
161 par[0] = rout;
162 par[1] = rout + .65;
163 par[2] = 1.5;
cfce8870 164 gMC->Gsvolu("R2R2", "TUBE", idtmed[901], par, 3);
165 gMC->Gspos("R2R2", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 166 // Ring #3
167 par[0] = rout + .65;
168 par[1] = rout + 5.65;
169 par[2] = .025;
cfce8870 170 gMC->Gsvolu("R3R2", "TUBE", idtmed[902], par, 3);
171 gMC->Gspos("R3R2", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
fe4da5cc 172 // ***********************************************************
173 // DEFINE LEFT DISK#2 OF FMD
174 // ***********************************************************
175
176 // Define parameters
177
178 rin = 8.;
179 rout = 14.;
180 z = -69.7;
181 // Ring #1
182 par[0] = rin;
183 par[1] = rout;
184 par[2] = 1.5;
cfce8870 185 gMC->Gsvolu("R1L2", "TUBE", idtmed[900], par, 3);
186 gMC->Gspos("R1L2", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 187 // Ring #2
188 par[0] = rout;
189 par[1] = rout + .65;
190 par[2] = 1.5;
cfce8870 191 gMC->Gsvolu("R2L2", "TUBE", idtmed[901], par, 3);
192 gMC->Gspos("R2L2", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 193 // Ring #3
194 par[0] = rout + .65;
195 par[1] = rout + 5.65;
196 par[2] = .025;
cfce8870 197 gMC->Gsvolu("R3L2", "TUBE", idtmed[902], par, 3);
198 gMC->Gspos("R3L2", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
fe4da5cc 199 // ********************************************************
200 // DEFINE RIGHT DISK#1 OF FMD
201 // ********************************************************
202
203 // Define parameters
204
205 rin = 8.;
206 rout = 17.5;
207 z = 42.5;
208 // Ring #1
209 par[0] = rin;
210 par[1] = rout;
211 par[2] = 1.5;
cfce8870 212 gMC->Gsvolu("R1R1", "TUBE", idtmed[900], par, 3);
213 gMC->Gspos("R1R1", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 214 // Ring #2
215 par[0] = rout;
216 par[1] = rout + .65;
217 par[2] = 1.5;
cfce8870 218 gMC->Gsvolu("R2R1", "TUBE", idtmed[901], par, 3);
219 gMC->Gspos("R2R1", 1, "ALIC", 0., 0., z + 1.5, 0, "ONLY");
fe4da5cc 220 // Ring #3
221 par[0] = rout + .65;
222 par[1] = rout + 5.65;
223 par[2] = .025;
cfce8870 224 gMC->Gsvolu("R3R1", "TUBE", idtmed[902], par, 3);
225 gMC->Gspos("R3R1", 1, "ALIC", 0., 0., z + 1.525, 0, "ONLY");
fe4da5cc 226 // ***********************************************************
227 // DEFINE LEFT DISK#1 OF FMD
228 // ***********************************************************
229
230 // Define parameters
231
232 rin = 8.;
233 rout = 17.5;
234 z = -42.5;
235 // Ring #1
236 par[0] = rin;
237 par[1] = rout;
238 par[2] = 1.5;
cfce8870 239 gMC->Gsvolu("R1L1", "TUBE", idtmed[900], par, 3);
240 gMC->Gspos("R1L1", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 241 // Ring #2
242 par[0] = rout;
243 par[1] = rout + .65;
244 par[2] = 1.5;
cfce8870 245 gMC->Gsvolu("R2L1", "TUBE", idtmed[901], par, 3);
246 gMC->Gspos("R2L1", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 247 // Ring #3
248 par[0] = rout + .65;
249 par[1] = rout + 5.65;
250 par[2] = .025;
cfce8870 251 gMC->Gsvolu("R3L1", "TUBE", idtmed[902], par, 3);
252 gMC->Gspos("R3L1", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
fe4da5cc 253 // ***********************************************************
254 // DEFINE LEFT DISK#4 OF FMD
255 // ***********************************************************
256
257 // Define parameters
258
259 rin = 4.2;
260 rout = 13.;
261 z = -229.5;
262 // Ring #1
263 par[0] = rin;
264 par[1] = rout;
265 par[2] = 1.5;
cfce8870 266 gMC->Gsvolu("R1L4", "TUBE", idtmed[900], par, 3);
267 gMC->Gspos("R1L4", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 268 // Ring #2
269 par[0] = rout;
270 par[1] = rout + .65;
271 par[2] = 1.5;
cfce8870 272 gMC->Gsvolu("R2L4", "TUBE", idtmed[901], par, 3);
273 gMC->Gspos("R2L4", 1, "ALIC", 0., 0., z - 1.5, 0, "ONLY");
fe4da5cc 274 // Ring #3
275 par[0] = rout + .65;
276 par[1] = rout + 5.65;
277 par[2] = .025;
cfce8870 278 gMC->Gsvolu("R3L4", "TUBE", idtmed[902], par, 3);
279 gMC->Gspos("R3L4", 1, "ALIC", 0., 0., z - 1.525, 0, "ONLY");
fe4da5cc 280}
281
282//_____________________________________________________________________________
b316044f 283void AliFMDv0::DrawModule()
fe4da5cc 284{
285 //
286 // Draw a shaded view of the FMD version 0
287 //
288
fe4da5cc 289 // Set everything unseen
cfce8870 290 gMC->Gsatt("*", "seen", -1);
fe4da5cc 291 //
292 // Set ALIC mother transparent
cfce8870 293 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 294 //
295 // Set the volumes visible
cfce8870 296 gMC->Gsatt("R1R3","SEEN",1);
297 gMC->Gsatt("R2R3","SEEN",1);
298 gMC->Gsatt("R3R3","SEEN",1);
299 gMC->Gsatt("R1L3","SEEN",1);
300 gMC->Gsatt("R2L3","SEEN",1);
301 gMC->Gsatt("R3L3","SEEN",1);
302 gMC->Gsatt("R1R2","SEEN",1);
303 gMC->Gsatt("R2R2","SEEN",1);
304 gMC->Gsatt("R3R2","SEEN",1);
305 gMC->Gsatt("R1L2","SEEN",1);
306 gMC->Gsatt("R2L2","SEEN",1);
307 gMC->Gsatt("R3L2","SEEN",1);
308 gMC->Gsatt("R1R1","SEEN",1);
309 gMC->Gsatt("R2R1","SEEN",1);
310 gMC->Gsatt("R3R1","SEEN",1);
311 gMC->Gsatt("R1L1","SEEN",1);
312 gMC->Gsatt("R2L1","SEEN",1);
313 gMC->Gsatt("R3L1","SEEN",1);
314 gMC->Gsatt("R1L4","SEEN",1);
315 gMC->Gsatt("R2L4","SEEN",1);
316 gMC->Gsatt("R3L4","SEEN",1);
fe4da5cc 317 //
cfce8870 318 gMC->Gdopt("hide", "on");
319 gMC->Gdopt("shad", "on");
320 gMC->Gsatt("*", "fill", 7);
321 gMC->SetClipBox(".");
322 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
323 gMC->DefaultRange();
324 gMC->Gdraw("alic", 40, 30, 0, 6, 9, .08, .08);
325 gMC->Gdhead(1111, "Forward Multiplicity Detector version 0");
326 gMC->Gdman(13, 9, "MAN");
fe4da5cc 327}
328
329//_____________________________________________________________________________
330void AliFMDv0::CreateMaterials()
331{
332 //
333 // Create Materials for version 0 of FMD
334 //
335
336 // Material for ring #1
337 Float_t ar1[8] = { 55.8,58.7,52.,47.9,16.,28.,207.2,27. };
338 Float_t zr1[8] = { 26.,28.,24.,22.,8.,14.,82.,13. };
339 Float_t wr1[8] = { .27,.081,.054,.045,.18,.25,.06,.06 };
340 // Material for ring #2
341 Float_t ar2[3] = { 55.8,27.,16. };
342 Float_t zr2[3] = { 26.,13.,8. };
343 Float_t wr2[3] = { .35,.34,.31 };
344 // Material for ring #3
345 Float_t ar3[3] = { 28.,27.,16. };
346 Float_t zr3[3] = { 14.,13.,8. };
347 Float_t wr3[3] = { .37,.33,.3 };
348
349 Float_t epsil, stmin, deemax, tmaxfd, stemax;
350
351 Int_t ISXFLD = gAlice->Field()->Integ();
352 Float_t SXMGMX = gAlice->Field()->Max();
353
354 // Ring #1
355
356 AliMixture(1, "FMD_R1$", ar1, zr1, 2.69, 8, wr1);
357
358 // Ring #2
359
360 AliMixture(2, "FMD_R2$", ar2, zr2, 2.63, 3, wr2);
361
362 // Ring #3
363
364 AliMixture(3, "FMD_R3$", ar3, zr3, 3.15, 3, wr3);
365 // *******************************************************
366 // Defines tracking media parameters.
367 // *******************************************************
368 epsil = .001; // Tracking precision, DLS
369 stemax = -1.; // Maximum displacement for multiple scattering
370 tmaxfd = -20.; // Maximum angle due to field deflection
371 deemax = -.3; // Maximum fractional energy loss, DLS
372 stmin = -.8;
373 // ********************************************************
ad51aeb0 374 AliMedium(1, "FMD_R1_L3 ", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
375 AliMedium(2, "FMD_R2_L3 ", 2, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
376 AliMedium(3, "FMD_R3_L3 ", 3, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 377}
378
379
380