Correct GetWire check on even/odd fnWires
[u/mrichter/AliRoot.git] / CASTOR / AliCASTOR.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// CASTOR //
23// This class contains the description of the CASTOR detector //
24// //
25//Begin_Html
26/*
1439f98e 27<img src="picts/AliCASTORClass.gif">
fe4da5cc 28</pre>
29<br clear=left>
30<font size=+2 color=red>
31<p>The responsible person for this module is
32<a href="mailto:aris.angelis@cern.ch">Aris Angelis</a>.
33</font>
34<pre>
35*/
36//End_Html
37// //
38// //
39///////////////////////////////////////////////////////////////////////////////
40
41
42#include "AliCASTOR.h"
43#include <TNode.h>
44#include <TPGON.h>
45#include "AliRun.h"
46#include "AliMC.h"
47#include "AliConst.h"
48
49ClassImp(AliCASTOR)
50
51//_____________________________________________________________________________
52AliCASTOR::AliCASTOR()
53{
54 //
55 // Default constructor for CASTOR
56 //
57 fIshunt = 0;
58}
59
60//_____________________________________________________________________________
61AliCASTOR::AliCASTOR(const char *name, const char *title)
62 : AliDetector(name,title)
63{
64 //
65 // Standard constructor for CASTOR
66 //
67
68 //
69 // Create a tree of castor hits
70 fHits = new TClonesArray("AliCASTORhit", 405);
71
72 fIshunt = 0;
73
74 SetMarkerColor(7);
75 SetMarkerStyle(2);
76 SetMarkerSize(0.4);
77}
78
79//_____________________________________________________________________________
80void AliCASTOR::AddHit(Int_t track, Int_t *vol, Float_t *hits)
81{
82 //
83 // Add a CASTOR hit
84 //
85 TClonesArray &lhits = *fHits;
86 new(lhits[fNhits++]) AliCASTORhit(fIshunt,track,vol,hits);
87}
88
89//_____________________________________________________________________________
90void AliCASTOR::BuildGeometry()
91{
92 //
93 // Build CASTOR ROOT TNode geometry for event display
94 TNode *Node, *Top;
95 TPGON *pgon;
96 const int kColorCASTOR = 4;
97 //
98 Top=gAlice->GetGeometry()->GetNode("alice");
99
100 // CASTOR
101 pgon = new TPGON("S_CASTOR","S_CASTOR","void",22.5,360,8,2);
102 pgon->DefineSection(0,-69.05885,2.598121,12.86874);
103 pgon->DefineSection(1,69.05885,2.787778,13.88912);
104 new TRotMatrix("rotcas","rotcas",90,180,90,90,180,0);
105
106 Top->cd();
107 Node = new TNode("CASTOR","CASTOR","S_CASTOR",0,0,-1809.59,"rotcas");
108 Node->SetLineColor(kColorCASTOR);
109 fNodes->Add(Node);
110}
111
112//_____________________________________________________________________________
113Int_t AliCASTOR::DistancetoPrimitive(Int_t , Int_t )
114{
115 return 9999;
116}
117
118
119ClassImp(AliCASTORv1)
120
121//_____________________________________________________________________________
122AliCASTORv1::AliCASTORv1() : AliCASTOR()
123{
124 //
125 // Default constructor for CASTOR version 1
126 //
127 fOdFiber = 0;
128 fOdCladding = 0;
129 fOdAbsorber = 0;
130 fOctants = 0;
131 fLayersEM = 0;
132 fLayersHad = 0;
133 fPhiOct = 0;
134 fRadCore = 0;
135 fRadFactor = 0;
136}
137
138//_____________________________________________________________________________
139AliCASTORv1::AliCASTORv1(const char *name, const char *title)
140 : AliCASTOR(name,title)
141{
142 //
143 // Standard constructor for CASTOR version 1
144 //
145 fOdFiber = 0;
146 fOdCladding = 0;
147 fOdAbsorber = 0;
148 fOctants = 0;
149 fLayersEM = 0;
150 fLayersHad = 0;
151 fPhiOct = 0;
152 fRadCore = 0;
153 fRadFactor = 0;
154}
155
156//_____________________________________________________________________________
157void AliCASTORv1::CreateGeometry()
158{
159 //
160 // Creation of the geometry of the CASTOR detector
161 //
162 //Begin_Html
163 /*
1439f98e 164 <img src="picts/AliCASTORTree.gif">
fe4da5cc 165 */
166 //End_Html
167 //Begin_Html
168 /*
1439f98e 169 <img src="picts/AliCASTOR.gif">
fe4da5cc 170 */
171 //End_Html
172 //
173 // 28 March 1997 23 February 1998 Aris L. S. Angelis *
174 // >--------------------------------------------------------------------<*
175
fe4da5cc 176
177 Float_t dhad[11], dcal[3], beta, doct[11], alfa1, alfa2, fact1, fact2,fact3;
178 Float_t dclha[3], dcoha[3], dclem[3], dbxha[3], dcoem[3], dcalt[5], dcalv[5], dbxem[3];
179 Float_t rzhig;
180 Float_t s1, s2, s3, rxyin, rzlow, rxyut, facemd, facein, dlayha, dlayem, doctem, doctha, faceut, zendha, phicov;
181 Float_t doctnt;
182 Float_t zemhad;
183 Int_t idrotm[100];
184 Float_t thecen, xp, xxmdhi, zp, yp, rinbeg;
185 Float_t rutbeg, xxinhi, rinend, rutend, xxmdlo;
186 Float_t dztotl, xxinlo, xxuthi;
187 Float_t xxutlo, dem[11], ang;
188 Int_t nfx;
189 Float_t rxy;
190 // Angle (deg) of inclination of quartz fibres w.r.t. to beam (Cerenkov angle).
191 const Float_t kBetaD = 45;
192 //Rapidity range covered by the calorimeter.
193 const Float_t kEtaLow = 5.6;
194 const Float_t kEtaHigh = 7.2;
195 // Z position (cm) of beginning of calorimeter EM section (the tip.
196 const Float_t kZbegem = 1740;
197 // Number of azimuthal calorimeter sectors: octants.
198 fOctants = 8;
199 // Number of e-m and hadronic layers (each layer comprises a slice
200 // of absorber material followed by a slice of active quartz fibres).
201 // DATA NLAYEM,NLAYHA /9,69/ ! 0.64 + 9.73 lambda_i
202 fLayersEM = 8;
203 fLayersHad = 72; // 0.57 + 10.15 lambda_i
204 // Number of planes of quartz fibres within each active slice for
205 // e-m and hadronic sections.
206 const Int_t kFibersEM = 2;
207 const Int_t kFibersHad = 4;
208 // Thickness (cm) of absorber material for e-m and hadronic layers.
209 const Float_t kAbsorberEM = 0.5;
210 const Float_t kAbsorberHad = 1;
211 // Diameter (cm) of fibre core and of fibre with cladding.
212 const Float_t kDiamCore = 0.043;
213 const Float_t kDiamCladding = 0.045;
214
215 Int_t i;
216 static Int_t debugFlag = 0;
217
ad51aeb0 218 Int_t *idtmed = fIdtmed->GetArray()-1499;
fe4da5cc 219
220
221 // >--------------------------------------------------------------------<*
222 // **> Note: ALICE frame XYZ, proper ref. frame of a trapezoid X'Y'Z'.
223 // --- Common which contains debug flags for the various detectors ---
224 // --- Also control flags (JPAWF,JOUTF) for each detector added ---
225
226 // **> Common containing some of the Castor FCAL geometry data.
227
228 //**> Angle (deg) of inclination of quartz fibres w.r.t. to beam
229 //**> (Cerenkovangle).
230 // **> Rapidity range covered by the calorimeter.
231 // **> Z position (cm) of beginning of calorimeter EM section (the tip.
232 // **> Number of planes of quartz fibres within each active slice for
233 // **> e-m and hadronic sections.
234 // **> Thickness (cm) of absorber material for e-m and hadronic layers.
235 // **> Diameter (cm) of fibre core and of fibre with cladding.
236 // **> E-M and hadronic sections of an octant and complete octant module
237 // **> (general trapezoids).
238 // **> Imaginary box to hold the complete calorimeter.
239 // **> Imaginary rectangular boxes containing the trapezoids of the
240 // **> EM and Hadronic sections of an Octant.
241 // **> Cylindrical volumes for clad fibres and fibre cores in the
242 // **> EM and Had sections.
243 //**> Narrow stainless steel conical beam tube traversing the calorimeter.
244 // **> Print calorimeter parameters.
245 // **> Number of azimuthal calorimeter sectors: octants.
246 // DATA NOCTS / 16 /
247 // **> Number of e-m and hadronic layers (each layer comprises a slice
248 // **> of absorber material followed by a slice of active quartz fibres).
249 // DATA NLAYEM,NLAYHA /9,69/ ! 0.64 + 9.73 lambda_i
250 // 0.57 + 10.15 lambda_i
251 if (debugFlag > 0) {
252 printf("----------------------------------\n");
253 printf(" EtaLo = %f, EtaHigh = %f, ZbegEM =%f\n",kEtaLow, kEtaHigh,kZbegem);
254 printf(" Nocts =%d, NlayEM=%d, NlayHad = %d\n",fOctants,fLayersEM,fLayersHad);
255 printf("----------------------------------\n");
256 }
257 // **> Radius of sensitive fibre core.
258 fRadCore = kDiamCore/2;
259 // **> Radius normalised to radius of 0.5 mm used in the calculation of
260 // **> the Cherenkov tables.
261 fRadFactor = fRadCore / .05;
262 // **> Total number of sensitive QF plane layers.
263 //nqemly = fLayersEM*kFibersEM;
264 //nqhaly = fLayersHad*kFibersHad;
265 beta = kBetaD*kDegrad; // **> Conversions to radians.
266 // **> Thickness of e-m and hadronic layers:
267 // **> Thickness = Thickness_of_Absorber + Thickness_of_N_Fibre_Planes
268 // **> For N pair: Thickness_of_N_Fibre_Planes = N/2 * [2+TMath::Sqrt(3)]*R_fibre
269 // **> taking into account staggering of fibres in adjacent planes.
270 //**> For simplicity staggering not yet introduced, use TMath::Sqrt(4) temporarily.
271 dlayem = kAbsorberEM +(0.5*kFibersEM )*(2+TMath::Sqrt(4.))*kDiamCladding/2;
272 dlayha = kAbsorberHad+(0.5*kFibersHad)*(2+TMath::Sqrt(4.))*kDiamCladding/2;
273 if (debugFlag > 0) {
274 printf(" Layer Thickness. EM = %f, Had = %f\n",dlayem,dlayha);
275 }
276 // **> Thickness of complete octant, along the line perpendicular
277 // **> to the layers.
278 // **> Thickness = NlayerEM*DlayerEM + NlayerHad*DlayerHad (DeltaZ').
279 doctem = fLayersEM*dlayem;
280 doctha = fLayersHad*dlayha;
281 doctnt = doctem + doctha;
282 if (debugFlag > 0) {
283 printf(" Octant Thickness. EM = %f, Had = %f, Total = %f\n",doctem,doctha,doctnt);
284 }
285 // **> Construct one octant module: general trapezoid, rotated such
286 // **> that the fibre planes are perpenicular to the Z axis of the
287 // **> proper reference frame (X'Y'Z' frame).
288 // **> Calculation of the length of the faces at +/- DeltaZ'/2 of an
289 // **> octant, projected onto the Y'Z' plane (see notes dated 4/4/97).
290 alfa1 = TMath::ATan(exp(-kEtaLow)) * 2.;
291 alfa2 = TMath::ATan(exp(-kEtaHigh)) * 2.;
292 fact1 = (TMath::Tan(alfa1) - TMath::Tan(alfa2)) * TMath::Cos(alfa1) / TMath::Sin(beta - alfa1);
293 if (debugFlag > 0) {
294 printf(" Beta =%f,Fact1 =%f\n",kBetaD, fact1);
295 printf(" EtaLow=%f, EtaHigh=%f, Alfa1=%f, Alfa2=%f\n",kEtaLow,kEtaHigh,alfa1*kRaddeg,alfa2*kRaddeg);
296 }
297 // **> Face at entrance to E-M section (-DeltaZ'/2).
298 facein = fact1 * kZbegem;
299 // **> Face at interface from E-M to Hadronic section.
300 facemd = (doctem / TMath::Sin(beta) + kZbegem) * fact1;
301 // **> Face at exit of Hadronic section (+DeltaZ'/2).
302 faceut = (doctnt / TMath::Sin(beta) + kZbegem) * fact1;
303 if (debugFlag > 0) {
304 printf(" Octant Face Length. Front: %f, Back: %f, EM-Had: %f\n",facein,faceut,facemd);
305 }
306 // **> Angular coverage of octant (360./8) projected onto plane
307 // **> tilted at angle Beta (see notes dated 28/3/97).
308 //**> PhiTilted = 2*atan[TMath::Tan(phi/2)TMath::Cos(beta)] = 32.65 deg for beta=45,phi=22.5.
309 fPhiOct = k2PI / fOctants;
310 phicov = TMath::ATan(TMath::Tan(fPhiOct / 2.) * TMath::Cos(beta)) * 2.;
311 if (debugFlag > 0) {
312 printf(" FPhiOct =%f, PhiCov =%f\n",fPhiOct * kRaddeg,phicov * kRaddeg);
313 }
314 // **> Dimensions along X' of front and back faces of calorimeter
315 // **> (see notes dated 8/4/97).
316 fact2 = TMath::Tan(alfa2) / TMath::Sin(beta);
317 fact3 = TMath::Cos(alfa2) / TMath::Sin(beta - alfa2);
318 zendha = doctnt * fact3 + kZbegem;
319 zemhad = doctem * fact3 + kZbegem;
320 if (debugFlag > 0) {
321 printf(" ZbegEM =%f, ZendHA =%f, ZEMHad =%f\n",kZbegem,zendha, zemhad);
322 printf(" Fact2 =%f, Fact3 =%f\n",fact2,fact3);
323 }
324 // **> DeltaX' at -DeltaY'/2, -DeltaZ'/2.
325 xxinlo = fact2 * 2*kZbegem * TMath::Tan(phicov / 2.);
326 // **> DeltaX' at +DeltaY'/2, -DeltaZ'/2.
327 xxinhi = (fact2 + fact1) * 2*kZbegem * TMath::Tan(phicov / 2.);
328 // **> DeltaX' at -DeltaY'/2, +DeltaZ'/2.
329 xxutlo = zendha * 2. * fact2 * TMath::Tan(phicov / 2.);
330 // **> DeltaX' at +DeltaY'/2, +DeltaZ'/2.
331 xxuthi = zendha * 2. * (fact2 + fact1) * TMath::Tan(phicov / 2.);
332 // **> DeltaX' at -DeltaY'/2, at EM/Had interface.
333 xxmdlo = zemhad * 2. * fact2 * TMath::Tan(phicov / 2.);
334 // **> DeltaX' at +DeltaY'/2, at EM/Had interface.
335 xxmdhi = zemhad * 2. * (fact2 + fact1) * TMath::Tan(phicov / 2.);
336 if (debugFlag > 0) {
337 printf(" XXinLo=%f, XXinHi=%f, XXutLo=%f, XXutHi=%f, XXmdLo=%f, XXmdHi=%f\n",
338 xxinlo,xxinhi,xxutlo,xxuthi,xxmdlo,xxmdhi);
339 }
340 //**> Calculate the polar angle in the X'Y'Z' frame of the line joining the
341 //**> centres of the front and back faces of the octant (see notes dated 9/4/97).
342 s1 = (1. - fact2 * TMath::Cos(beta)) * kZbegem;
343 s2 = (fact2 + fact1 / 2.) * kZbegem;
344 s3 = TMath::Sqrt(s1 * s1 + s2 * s2 - s1 * s2 * TMath::Cos(kPI - beta));
345 ang = TMath::ASin(sin(kPI - beta) * s2 / s3);
346 thecen = kPI/2 - beta + ang;
347 if (debugFlag > 0) {
348 printf(" S1=%f, S2=%f, S3=%f, Ang=%f, TheCen=%f\n",s1,s2,s3,ang*kRaddeg,thecen*kRaddeg);
349 }
350 // **> Construct the octant volume.
351 doct[0] = 180*0.125;
352 doct[1] = 360.;
353 doct[2] = 8.;
354 doct[3] = 2.;
355 doct[4] = -(zendha - kZbegem + faceut * TMath::Cos(beta)) / 2.;
356 doct[5] = TMath::Tan(alfa2) * kZbegem;
357 doct[6] = TMath::Tan(alfa1) * kZbegem;
358 doct[7] = (zendha - kZbegem + faceut * TMath::Cos(beta)) / 2.;
359 doct[8] = zendha * TMath::Tan(alfa2);
360 doct[9] = (faceut + zendha * fact2) * TMath::Sin(beta);
361
362 if (debugFlag > 0) {
363 printf("\n Doct(1-10) = ");
364 for (i = 1; i <= 10; ++i) {
365 printf("%f, ",doct[i - 1]);
366 }
367 printf(" \n");
368 }
cfce8870 369 gMC->Gsvolu("OCTA", "PGON", idtmed[fOdAbsorber - 1], doct, 10);
370 gMC->Gsdvn("OCT ", "OCTA", 8, 2);
fe4da5cc 371 // absorber material.
372 // **> Construct the E-M section volume.
373 dem[0] = doctem / 2.; // DeltaZ'/2
374 dem[1] = thecen *kRaddeg; // Theta[(Centre(-DeltaZ')--Centre(+DeltaZ'
375 dem[2] = 90.; // Phi[(Centre(-DeltaZ')--Centre(+DeltaZ')]
376 dem[3] = facein / 2.; // DeltaY'/2 at -DeltaZ'/2.
377 dem[4] = xxinlo / 2.; // DeltaX'/2 at -DeltaY'/2 at -DeltaZ'/2.
378 dem[5] = xxinhi / 2.; // DeltaX'/2 at +DeltaY'/2 at -DeltaZ'/2.
379 dem[6] = 0.; // Angle w.r.t. Y axis of line joining cent
380 // at +/- DeltaY at -DeltaZ. // Angle w.r.t. Y axis of line joining cent
381 dem[7] = facemd / 2.; // DeltaY'/2 at +DeltaZ'.
382 dem[8] = xxmdlo / 2.; // DeltaX'/2 at -DeltaY'/2 at +DeltaZ'/2.
383 dem[9] = xxmdhi / 2.; // DeltaX'/2 at +DeltaY'/2 at +DeltaZ'/2.
384 dem[10] = 0.; // Angle w.r.t. Y axis of line joining cent
385 // at +/- DeltaY at +DeltaZ.
386
387 if (debugFlag > 0) {
388 printf("\n De-m(1-11) =");
389 for (i = 1; i <= 11; ++i) {
390 printf("%f, ",dem[i - 1]);
391 }
392 printf(" \n");
393 }
cfce8870 394 gMC->Gsvolu("EM ", "TRAP", idtmed[fOdAbsorber - 1], dem, 11);
fe4da5cc 395 // absorber material.
396 // **> Construct the Hadronic section volume.
397 // Fill with s
398 dhad[0] = doctha / 2.; // DeltaZ'/2
399 dhad[1] = thecen *kRaddeg; // Theta[(Centre(-DeltaZ')--Centre(+DeltaZ'
400 dhad[2] = 90.; // Phi[(Centre(-DeltaZ')--Centre(+DeltaZ')]
401 dhad[3] = facemd / 2.; // DeltaY'/2 at -DeltaZ'/2.
402 dhad[4] = xxmdlo / 2.; // DeltaX'/2 at -DeltaY'/2 at -DeltaZ'/2.
403 dhad[5] = xxmdhi / 2.; // DeltaX'/2 at +DeltaY'/2 at -DeltaZ'/2.
404 dhad[6] = 0.; // Angle w.r.t. Y axis of line joining cent
405 // at +/- DeltaY at -DeltaZ.
406 dhad[7] = faceut / 2.; // DeltaY'/2 at +DeltaZ'.
407 dhad[8] = xxutlo / 2.; // DeltaX'/2 at -DeltaY'/2 at +DeltaZ'/2.
408 dhad[9] = xxuthi / 2.; // DeltaX'/2 at +DeltaY'/2 at +DeltaZ'/2.
409 dhad[10] = 0.; // Angle w.r.t. Y axis of line joining cent
410 // at +/- DeltaY at +DeltaZ.
411
412 if (debugFlag > 0) {
413 printf("\n Dhad(1-11) = ");
414 for (i = 1; i <= 11; ++i) {
415 printf("%f, ",dhad[i - 1]);
416 }
417 printf(" \n");
418 }
cfce8870 419 gMC->Gsvolu("HAD ", "TRAP", idtmed[fOdAbsorber - 1], dhad, 11); // absorber material.
fe4da5cc 420 // **> Rotation matrix to rotate fibres verticaly to fit into holes.
421 // Fill with
422 AliMatrix(idrotm[0], 90., 0., 180., 0., 90., 90.);
423 // **> Internal structure of the EM section starts here. <---
424 // **> Construct one sampling module
cfce8870 425 gMC->Gsdvn("SLEM", "EM ", fLayersEM, 3);
426 gMC->Gsatt("SLEM", "SEEN", 0);
fe4da5cc 427 // **> Construct the (imaginary) rectangular box embedding the fibres
428 // **> Fill with air, make it invisible on the drawings.
429 dbxem[0] = xxmdhi / 2.;
430 dbxem[2] = kFibersEM*kDiamCladding/2;
431 dbxem[1] = facemd / 2. + dbxem[2] * TMath::Tan(thecen);
432 if (debugFlag > 0) {
433 printf(" DbxEM(1-3) =");
434 for (i = 1; i <= 3; ++i) {
435 printf("%f, ",dbxem[i - 1]);
436 }
437 printf(" \n");
438 }
cfce8870 439 gMC->Gsvolu("BXEM", "BOX ", idtmed[1501], dbxem, 3);
440 gMC->Gsatt("BXEM", "SEEN", 0);
fe4da5cc 441 // **> Divide along Z to obtain one layer
cfce8870 442 gMC->Gsdvn("RWEM", "BXEM", 2, 3);
443 gMC->Gsatt("RWEM", "SEEN", 0);
fe4da5cc 444 // **> Divide along X' to accomodate the maximum number of individual
445 //**> fibres packed along X', make the divisions invisible on the drawings.
446 nfx = Int_t(xxmdhi / .045);
447 if (debugFlag > 0) {
448 printf(" NfxEM = %d\n",nfx);
449 }
cfce8870 450 gMC->Gsdvn("FXEM", "RWEM", nfx, 1);
451 gMC->Gsatt("FXEM", "SEEN", 0);
fe4da5cc 452 // **> Construct the fiber cladding
453 dclem[0] = 0.;
454 dclem[1] = kDiamCladding/2;
455 dclem[2] = dbxem[1];
456 if (debugFlag > 0) {
457 printf(" DclEM(1-3) = \n");
458 for (i = 1; i <= 3; ++i) {
459 printf("%f, ",dclem[i - 1]);
460 }
461 printf(" \n");
462 }
cfce8870 463 gMC->Gsvolu("CLEM", "TUBE", idtmed[fOdCladding - 1], dclem,3);
464 gMC->Gsatt("CLEM", "SEEN", 0);
fe4da5cc 465 //**> Construct the cylindrical volume for a fibre core in the EM section.
466 //**> Fill with selected fibre material, make it invisible on the drawings.
467 dcoem[0] = 0.;
468 dcoem[1] = kDiamCore/2;
469 dcoem[2] = dbxem[1];
470 if (debugFlag > 0) {
471 printf(" DcoEM(1-3) = ");
472 for (i = 1; i <= 3; ++i) {
473 printf("%f, ",dcoem[i - 1]);
474 }
475 printf(" \n");
476 }
cfce8870 477 gMC->Gsvolu("COEM", "TUBE", idtmed[fOdFiber - 1], dcoem,3);
478 gMC->Gsatt("COEM", "SEEN", 0);
fe4da5cc 479 // **> Position the volumes
480 // **> Put the air section inside one sampling module
481 // **> Use MANY to obtain clipping of protruding edges.
482 xp = 0.;
483 zp = dlayem / 2. - 0.5*kFibersEM*kDiamCladding;
484 yp = zp * TMath::Tan(thecen);
cfce8870 485 gMC->Gspos("BXEM", 1, "SLEM", xp, yp, zp, 0, "MANY");
fe4da5cc 486 // **> Place the core fibre in the clad
487 xp = 0.;
488 yp = 0.;
489 zp = 0.;
cfce8870 490 gMC->Gspos("COEM", 1, "CLEM", xp, yp, zp, 0, "MANY");
fe4da5cc 491 // **> Put the fiber in its air box
cfce8870 492 gMC->Gspos("CLEM", 1, "FXEM", xp, yp, zp, idrotm[0], "MANY");
fe4da5cc 493 // **> Internal structure of the Hadronic section starts here. <---
cfce8870 494 gMC->Gsdvn("SLHA", "HAD ", fLayersHad, 3);
495 gMC->Gsatt("SLHA", "SEEN", 0);
fe4da5cc 496 // **> Construct the air section where the fibers are
497 dhad[0] = 0.5*kFibersEM*kDiamCladding;
cfce8870 498 gMC->Gsvolu("AIHA", "TRAP", idtmed[1501], dhad, 11);
fe4da5cc 499 // **> Divide along z in the appropriate number of layers
cfce8870 500 gMC->Gsdvn("SAHA", "AIHA", 4, 3);
fe4da5cc 501 //**> Construct the (imaginary) rectangular box embedding one lauer of fibres
502 // **> Fill with air, make it invisible on the drawings.
503 dbxha[0] = xxuthi / 2.;
504 dbxha[2] = 0.5*kFibersHad*kDiamCladding;
505 dbxha[1] = faceut / 2. + dbxha[2] * TMath::Tan(thecen);
506 if (debugFlag > 0) {
507 printf(" DbxHa(1-3) = ");
508 for (i = 1; i <= 3; ++i) {
509 printf("%f, ",dbxem[i - 1]);
510 }
511 printf(" \n");
512 }
cfce8870 513 gMC->Gsvolu("BXHA", "BOX ", idtmed[1501], dbxha, 3);
514 gMC->Gsatt("BXHA", "SEEN", 0);
fe4da5cc 515 // **> Divide along Z to obtain one layer
cfce8870 516 gMC->Gsdvn("RWHA", "BXHA", 4, 3);
517 gMC->Gsatt("RWHA", "SEEN", 0);
fe4da5cc 518 // **> Divide along X' to accomodate the maximum number of individual
519 //**> fibres packed along X', make the divisions invisible on the drawings.
520 nfx = Int_t(xxuthi / .045);
521 if (debugFlag > 0) {
522 printf(" NfxHad = %d\n",nfx);
523 }
cfce8870 524 gMC->Gsdvn("FXHA", "RWHA", nfx, 1);
525 gMC->Gsatt("FXHA", "SEEN", 0);
fe4da5cc 526 // **> Construct one fiber cladding
527 dclha[0] = 0.;
528 dclha[1] = 0.5*kDiamCladding;
529 dclha[2] = dbxha[1];
530 if (debugFlag > 0) {
531 printf(" DclHa(1-3) = ");
532 for (i = 1; i <= 3; ++i) {
533 printf("%f, ",dclha[i - 1]);
534 }
535 printf(" \n");
536 }
cfce8870 537 gMC->Gsvolu("CLHA", "TUBE", idtmed[fOdCladding - 1], dclha,3);
538 gMC->Gsatt("CLHA", "SEEN", 0);
fe4da5cc 539 //**> Construct the cylindrical volume for a fibre core in the Had section.
540 //**> Fill with selected fibre material, make it invisible on the drawings.
541 dcoha[0] = 0.;
542 dcoha[1] = 0.5*kDiamCore;
543 dcoha[2] = dbxha[1];
544 if (debugFlag > 0) {
545 printf(" DcoHa(1-3) = ");
546 for (i = 1; i <= 3; ++i) {
547 printf("%f, ",dcoha[i - 1]);
548 }
549 printf(" \n");
550 }
cfce8870 551 gMC->Gsvolu("COHA", "TUBE", idtmed[fOdFiber - 1], dcoha,3);
552 gMC->Gsatt("COHA", "SEEN", 0);
fe4da5cc 553 // **> Position the volumes
554 // **> Put the air section inside one sampling module
555 // **> Use MANY to obtain clipping of protruding edges.
556 xp = 0.;
557 zp = dlayha / 2. - 0.5*kFibersHad*kDiamCladding;
558 yp = zp * TMath::Tan(thecen);
cfce8870 559 gMC->Gspos("BXHA", 1, "SLHA", xp, yp, zp, 0, "MANY");
fe4da5cc 560 // **> Place the core fibre in the clad
561 xp = 0.;
562 yp = 0.;
563 zp = 0.;
cfce8870 564 gMC->Gspos("COHA", 1, "CLHA", xp, yp, zp, 0, "MANY");
fe4da5cc 565 // **> Place the fibre in its air box
cfce8870 566 gMC->Gspos("CLHA", 1, "FXHA", xp, yp, zp, idrotm[0], "MANY");
fe4da5cc 567 // **> Rotation matrices for consecutive calorimeter octants
568 // **> filling the imaginary box.
569 AliMatrix(idrotm[1], 90., -90., 45., 0., 45., 180.);
570 // **> Place the EM and Hadronic sections inside the Octant.
571 rzlow = (doct[5] + doct[6]) * .5;
572 rzhig = (doct[8] + doct[9]) * .5;
573 zp = doct[7] - (faceut * TMath::Cos(beta) + doctha * fact3) * .5;
574 yp = 0.;
575 xp = rzlow + (rzhig - rzlow) * .5 * (zp - doct[4]) / doct[7];
cfce8870 576 gMC->Gspos("HAD ", 1, "OCT ", xp, yp, zp, idrotm[1], "ONLY");
fe4da5cc 577 yp = 0.;
578 zp = doct[7] - faceut * TMath::Cos(beta) * .5 - doctha * fact3 - doctem * fact3 * .5;
579 xp = rzlow + (rzhig - rzlow) * .5 * (zp - doct[4]) / doct[7];
cfce8870 580 gMC->Gspos("EM ", 1, "OCT ", xp, yp, zp, idrotm[1], "ONLY");
fe4da5cc 581 // **> An imaginary box to hold the complete calorimeter.
582 dcal[0] = (faceut + zendha * fact2) * TMath::Sin(beta);
583 dcal[1] = dcal[0];
584 dcal[2] = (zendha - kZbegem + faceut * TMath::Cos(beta)) / 2.;
585 if (debugFlag > 0) {
586 printf(" Dcal(1-3) = ");
587 for (i = 1; i <= 3; ++i) {
588 printf("%f, ",dcal[i - 1]);
589 }
590 printf(" \n");
591 }
cfce8870 592 gMC->Gsvolu("CAL ", "BOX ", idtmed[1501], dcal, 3);
fe4da5cc 593 // Fill with air
594 rinbeg = TMath::Tan(alfa2) * kZbegem;
595 rutbeg = TMath::Tan(alfa1) * kZbegem;
596 dztotl = dcal[2] * 2.;
597 rinend = (dztotl + kZbegem) * TMath::Tan(alfa2);
598 rutend = (dztotl + kZbegem) * TMath::Tan(alfa1);
599 if (debugFlag > 0) {
600 printf(" RinBeg=%f, RoutBeg=%f\n",rinbeg,rutbeg);
601 printf(" RinEnd=%f, RoutEnd=%f\n",rinend,rutend);
602 printf(" DeltaZtotal = %f\n",dztotl);
603 }
604 // **> Build the calorimeter inside the imaginary box.
605 rxyin = (fact2 + fact1 / 2.) * kZbegem; // Radius to centre of octant in X'Y'
606 // plane at calorimeter entrance.
607 rxyut = zendha * (fact2 + fact1 / 2.); // Radius to centre of octant in X'Y'
608 // plane at calorimeter exit.
609 rxy = (rxyin + rxyut) / 2.; // Radius to geometrical centre of octant in
610 rxy *= TMath::Sin(beta); // projected to the XY plane.
611 if (debugFlag > 0) {
612 printf(" \n");
613 }
cfce8870 614 gMC->Gspos("OCTA", 1, "CAL ", 0., 0., 0., 0, "ONLY");
fe4da5cc 615 //**> Construct the narrow stainless steel conical beam tube traversing the
616 // **> calorimeter and its vacuum filling: WallThickness = 0.1 cm,
617 // **> Router = touching the inner side of the calorimeter,
618 // **> DeltaZ = all through the calorimeter box.
619 dcalt[0] = dcal[2];
620 dcalt[2] = TMath::Tan(alfa2) * kZbegem;
621 dcalt[1] = dcalt[2] - .1 / TMath::Cos(alfa2);
622 dcalt[4] = (dcalt[0] * 2. + kZbegem) * TMath::Tan(alfa2);
623 dcalt[3] = dcalt[4] - .1 / TMath::Cos(alfa2);
624 dcalv[0] = dcalt[0];
625 dcalv[2] = dcalt[1];
626 dcalv[1] = 0.;
627 dcalv[4] = dcalt[3];
628 dcalv[3] = 0.;
cfce8870 629 gMC->Gsvolu("CALT", "CONE", idtmed[1506], dcalt, 5);
fe4da5cc 630 // Fe (steel a
cfce8870 631 gMC->Gsvolu("CALV", "CONE", idtmed[1500], dcalv, 5);
fe4da5cc 632 // Vacuum.
cfce8870 633 gMC->Gsatt("CALV", "SEEN", 0);
fe4da5cc 634 // **> Position at centre of calorimeter box.
635 zp = 0.;
cfce8870 636 gMC->Gspos("CALT", 1, "CAL ", 0., 0., zp, 0, "ONLY");
637 gMC->Gspos("CALV", 1, "CAL ", 0., 0., zp, 0, "ONLY");
fe4da5cc 638 if (debugFlag > 0) {
639 printf(" Dcalt,Zp,-/+ = ");
640 for (i = 1; i <= 5; ++i) {
641 printf("%f, ",dcalt[i - 1]);
642 }
643 printf("%f, %f, %f\n",zp, zp - dcalt[0], zp + dcalt[0]);
644 printf(" Dcalt,Zp,-/+ = ");
645 for (i = 1; i <= 5; ++i) {
646 printf("%f, ",dcalt[i - 1]);
647 }
648 printf("%f, %f, %f\n",zp, zp - dcalt[0], zp + dcalt[0]);
649 }
650 // **> Rotate the imaginary box carrying the calorimeter and place it
651 // **> in the ALICE volume on the -Z side.
652 xp = 0.;
653 yp = 0.;
654 zp = dcal[2] + kZbegem;
655 AliMatrix(idrotm[2], 90., 180., 90., 90., 180., 0.);
656 // -X theta and phi w.r.t. to box XYZ.
657 // Y theta and phi w.r.t. to box XYZ.
658 // -Z theta and phi w.r.t. to box XYZ.
cfce8870 659 gMC->Gspos("CAL ", 1, "ALIC", xp, yp, -zp, idrotm[2], "ONLY");
fe4da5cc 660 if (debugFlag > 0) {
661 printf(" Dcal,Zp,-/+ = ");
662 for (i = 1; i <= 3; ++i) {
663 printf("%f, ",dcal[i - 1]);
664 }
665 printf("%f, %f, %f\n",zp, zp - dcal[2], zp + dcal[2]);
666 }
667}
668
669//_____________________________________________________________________________
76aa0aaa 670void AliCASTORv1::DrawModule()
fe4da5cc 671{
672 //
673 // Draw a shaded view of CASTOR version 1
674 //
675
fe4da5cc 676
cfce8870 677 gMC->Gsatt("*", "seen", -1);
678 gMC->Gsatt("alic", "seen", 0);
fe4da5cc 679 //
680 // Set visibility of elements
cfce8870 681 gMC->Gsatt("OCTA","seen",0);
682 gMC->Gsatt("EM ","seen",0);
683 gMC->Gsatt("HAD ","seen",0);
684 gMC->Gsatt("CAL ","seen",0);
685 gMC->Gsatt("CALT","seen",1);
686 gMC->Gsatt("OCT ","seen",0);
687 gMC->Gsatt("SLEM","seen",1);
688 gMC->Gsatt("SLHA","seen",1);
689 gMC->Gsatt("SAHA","seen",1);
fe4da5cc 690 //
cfce8870 691 gMC->Gdopt("hide", "on");
692 gMC->Gdopt("shad", "on");
693 gMC->Gsatt("*", "fill", 7);
694 gMC->SetClipBox(".");
695 gMC->SetClipBox("*", 0, 20, -20, 20, -1900, -1700);
696 gMC->DefaultRange();
697 gMC->Gdraw("alic", 40, 30, 0, -191.5, -78, .19, .19);
698 gMC->Gdhead(1111, "CASTOR Version 1");
699 gMC->Gdman(15,-2, "MAN");
700 gMC->Gdopt("hide", "off");
fe4da5cc 701}
702
703//_____________________________________________________________________________
704void AliCASTORv1::CreateMaterials()
705{
706 //
707 // Create materials for CASTOR version 1
708 //
709 // 30 March 1997 27 November 1997 Aris L. S. Angelis *
710 // >--------------------------------------------------------------------<*
fe4da5cc 711 Int_t ISXFLD = gAlice->Field()->Integ();
712 Float_t SXMGMX = gAlice->Field()->Max();
713
ad51aeb0 714 Int_t *idtmed = fIdtmed->GetArray()-1499;
fe4da5cc 715
716 Float_t cute, ubuf[1], cutg, epsil, awmix[3], dwmix, stmin;
717 Int_t isvol;
718 Float_t wwmix[3], zwmix[3], aq[2], dq, zq[2], wq[2];
719 Float_t tmaxfd, stemax, deemax;
720 Int_t kod;
721
722
723 // **> Quartz and Wmixture.
724 // **> UBUF is the value of r0, used for calculation of the radii of
725 // **> the nuclei and the Woods-Saxon potential.
726 ubuf[0] = .68;
727 AliMaterial(1, "Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf, 1);
728 ubuf[0] = .68;
729 AliMaterial(2, "Air $", 14.61, 7.3, .001205, 30420., 67500., ubuf, 1);
730 //**> Quartz (SiO2) and fluorinated (?) quartz for cladding (insensitive).
731 dq = 2.64;
732 aq[0] = 28.086;
733 aq[1] = 15.9994;
734 zq[0] = 14.;
735 zq[1] = 8.;
736 wq[0] = 1.;
737 wq[1] = 2.;
738 AliMixture(3, "Quartz$", aq, zq, dq, -2, wq);
739 // After a call with ratios by number (negative number of elements),
740 // the ratio array is changed to the ratio by weight, so all successive
741 // calls with the same array must specify the number of elements as
742 // positive
743 AliMixture(4, "FQuartz$", aq, zq, dq, 2, wq);
744 // **> W mixture (90% W + 7.5% Ni + 2.5% Cu).
745 awmix[0] = 183.85;
746 zwmix[0] = 74.;
747 wwmix[0] = .9;
748 awmix[1] = 58.69;
749 zwmix[1] = 28.;
750 wwmix[1] = .075;
751 awmix[2] = 63.55;
752 zwmix[2] = 29.;
753 wwmix[2] = .025;
754 dwmix = 17.2;
755 // **> (Pure W and W mixture are given the same material number
756 // **> so that they can be used interchangeably).
757 ubuf[0] = 1.1;
758 AliMixture(5, "W Mix $", awmix, zwmix, dwmix, 3, wwmix);
759 // **> Lead.
760 ubuf[0] = 1.12;
761 AliMaterial(6, "Pb208 $", 207.19, 82., 11.35, .56, 18.5, ubuf, 1);
762 // **> Iron.
763 ubuf[0] = .99;
764 AliMaterial(7, "Fe56 $", 55.85, 26., 7.87, 1.76, 16.7, ubuf, 1);
765 // **> Copper.
766 ubuf[0] = 1.01;
767 AliMaterial(8, "Cu63 $", 63.54, 29., 8.96, 1.43, 15., ubuf, 1);
768 // **> Debug Printout.
769 // CALL GPRINT('MATE',0)
770 // **> (Negative values for automatic calculation in case of AUTO=0).
771 isvol = 0; // Sensitive volume flag.
772 tmaxfd = .1; // Max allowed angular deviation in 1 step due to field
773 stemax = -.5; // Maximum permitted step size (cm).
774 deemax = -.2; // Maximum permitted fractional energy loss.
775 epsil = .01; // Boundary crossing precision (cm).
776 stmin = -.1; // Minimum permitted step size inside absorber (cm).
ad51aeb0 777 AliMedium(1, "Vacuum$", 1, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
778 AliMedium(2, "Air $", 2, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 779
780 // **> Options for Cherenkov fibres and cladding.
781 isvol = 1; // Declare fibre core as sensitive.
ad51aeb0 782 AliMedium(3, "Quartz$", 3, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 783 isvol = 0; // Declare fibre cladding as not sensitive.
ad51aeb0 784 AliMedium(4, "FQuartz$", 4, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 785
786 // **> Options for absorber material (not sensitive).
787 isvol = 0; // Sensitive volume flag.
788 stemax = .5; // Maximum permitted step size (cm).
789 deemax = .5; // Maximum permitted fractional energy loss.
790 stmin = .1; // Minimum permitted step size inside absorber (cm).
ad51aeb0 791 AliMedium(5, "W Mix $", 5, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
792 AliMedium(6, "Pb208 $", 6, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
793 AliMedium(7, "Fe56 $ ", 7, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
794 AliMedium(8, "Cu63 $ ", 8, isvol, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 795
796 // **> Select material for the Cherenkov fibres.
797 fOdFiber = 1503;
798 // CALL GPTMED(IDTMED(KODFBR))
799 // **> Select material for the fibre cladding.
800 // Quartz.
801 fOdCladding = 1504;
802 // CALL GPTMED(IDTMED(KODCLD))
803 // **> Select absorber material.
804 // FQuartz.
805 fOdAbsorber = 1505; // W184/Mix
806 // KODABS=1506 ! Pb208.
807 // KODABS=1507 ! Fe56.
808 // KODABS=1508 ! Cu63.
809 // CALL GPTMED(IDTMED(KODABS))
810 // **> Set by default all interactions and decays explicitly ON
811 // **> and redefine the kinetic energy cutoffs:
812 // CUTE=0.0031 ! Allow beta >= 0.99 only.
813 cute = 7e-4; // Allow beta >= 0.67 only.
814 cutg = cute * 1.33;
815
816 // **> Inside the absorber material,
817 for (kod = 1505; kod <= 1508; ++kod) {
818 Int_t absorber = idtmed[kod - 1];
cfce8870 819 gMC->Gstpar(absorber, "CUTELE", cute); // Allow beta >= 0.xx
820 gMC->Gstpar(absorber, "CUTGAM", cutg); // = 1.33 cutele.
821 gMC->Gstpar(absorber, "CUTNEU", .01); // Default.
822 gMC->Gstpar(absorber, "CUTHAD", .01); // Default.
823 gMC->Gstpar(absorber, "CUTMUO", .01); // Default.
824 gMC->Gstpar(absorber, "BCUTE", cutg); // = cutgam.
825 gMC->Gstpar(absorber, "BCUTM", cutg); // = cutgam.
826 gMC->Gstpar(absorber, "DCUTE", cute); // = cutele.
827 gMC->Gstpar(absorber, "DCUTM", cute); // = cutele.
828 gMC->Gstpar(absorber, "PPCUTM", cutg); // = 1.33 cutele.
829 gMC->Gstpar(absorber, "DCAY", 1.);
830 gMC->Gstpar(absorber, "MULS", 1.);
831 gMC->Gstpar(absorber, "PFIS", 1.);
832 gMC->Gstpar(absorber, "MUNU", 1.);
833 gMC->Gstpar(absorber, "LOSS", 1.);
834 gMC->Gstpar(absorber, "PHOT", 1.);
835 gMC->Gstpar(absorber, "COMP", 1.);
836 gMC->Gstpar(absorber, "PAIR", 1.);
837 gMC->Gstpar(absorber, "BREM", 1.);
838 gMC->Gstpar(absorber, "RAYL", 1.);
839 gMC->Gstpar(absorber, "DRAY", 1.);
840 gMC->Gstpar(absorber, "ANNI", 1.);
841 gMC->Gstpar(absorber, "HADR", 1.);
842 gMC->Gstpar(absorber, "LABS", 1.);
fe4da5cc 843 }
844 // **> Inside the cladding,
845 Int_t cladding = idtmed[fOdCladding - 1];
cfce8870 846 gMC->Gstpar(cladding, "CUTELE", cute); // Allow beta >= 0.xx
847 gMC->Gstpar(cladding, "CUTGAM", cutg); // = 1.33 cutele.
848 gMC->Gstpar(cladding, "CUTNEU", .01); // Default.
849 gMC->Gstpar(cladding, "CUTHAD", .01); // Default.
850 gMC->Gstpar(cladding, "CUTMUO", .01); // Default.
851 gMC->Gstpar(cladding, "BCUTE", cutg); // = cutgam.
852 gMC->Gstpar(cladding, "BCUTM", cutg); // = cutgam.
853 gMC->Gstpar(cladding, "DCUTE", cute); // = cutele.
854 gMC->Gstpar(cladding, "DCUTM", cute); // = cutele.
855 gMC->Gstpar(cladding, "PPCUTM", cutg); // = 1.33 cutele.
856 gMC->Gstpar(cladding, "DCAY", 1.);
857 gMC->Gstpar(cladding, "MULS", 1.);
858 gMC->Gstpar(cladding, "PFIS", 1.);
859 gMC->Gstpar(cladding, "MUNU", 1.);
860 gMC->Gstpar(cladding, "LOSS", 1.);
861 gMC->Gstpar(cladding, "PHOT", 1.);
862 gMC->Gstpar(cladding, "COMP", 1.);
863 gMC->Gstpar(cladding, "PAIR", 1.);
864 gMC->Gstpar(cladding, "BREM", 1.);
865 gMC->Gstpar(cladding, "RAYL", 1.);
866 gMC->Gstpar(cladding, "DRAY", 1.);
867 gMC->Gstpar(cladding, "ANNI", 1.);
868 gMC->Gstpar(cladding, "HADR", 1.);
869 gMC->Gstpar(cladding, "LABS", 1.);
fe4da5cc 870
871 // **> and Inside the Cherenkov fibres,
872 Int_t fiber = idtmed[fOdFiber - 1];
cfce8870 873 gMC->Gstpar(fiber, "CUTELE", cute); // Allow beta >= 0.xx
874 gMC->Gstpar(fiber, "CUTGAM", cutg); // = 1.33 cutele.
875 gMC->Gstpar(fiber, "CUTNEU", .01); // Default.
876 gMC->Gstpar(fiber, "CUTHAD", .01); // Default.
877 gMC->Gstpar(fiber, "CUTMUO", .01); // Default.
878 gMC->Gstpar(fiber, "BCUTE", cutg); // = cutgam.
879 gMC->Gstpar(fiber, "BCUTM", cutg); // = cutgam.
880 gMC->Gstpar(fiber, "DCUTE", cute); // = cutele.
881 gMC->Gstpar(fiber, "DCUTM", cute); // = cutele.
882 gMC->Gstpar(fiber, "PPCUTM", cutg); // = 1.33 cutele.
883 gMC->Gstpar(fiber, "DCAY", 1.);
884 gMC->Gstpar(fiber, "MULS", 1.);
885 gMC->Gstpar(fiber, "PFIS", 1.);
886 gMC->Gstpar(fiber, "MUNU", 1.);
887 gMC->Gstpar(fiber, "LOSS", 1.);
888 gMC->Gstpar(fiber, "PHOT", 1.);
889 gMC->Gstpar(fiber, "COMP", 1.);
890 gMC->Gstpar(fiber, "PAIR", 1.);
891 gMC->Gstpar(fiber, "BREM", 1.);
892 gMC->Gstpar(fiber, "RAYL", 1.);
893 gMC->Gstpar(fiber, "DRAY", 1.);
894 gMC->Gstpar(fiber, "ANNI", 1.);
895 gMC->Gstpar(fiber, "HADR", 1.);
896 gMC->Gstpar(fiber, "LABS", 1.);
fe4da5cc 897}
898
899//_____________________________________________________________________________
900void AliCASTORv1::StepManager()
901{
902 //
903 // Called at every step in CASTOR
904 //
905}
906
907//_____________________________________________________________________________
908void AliCASTORv1::Init()
909{
910 //
911 // Initialise CASTOR detector after it has been built
912 //
913 Int_t i;
914 //
915 printf("\n");
916 for(i=0;i<35;i++) printf("*");
917 printf(" CASTOR_INIT ");
918 for(i=0;i<35;i++) printf("*");
919 printf("\n");
920 //
921 // Here the ABSO initialisation code (if any!)
922 for(i=0;i<80;i++) printf("*");
923 printf("\n");
924}
925
926ClassImp(AliCASTORhit)
927
928//_____________________________________________________________________________
929AliCASTORhit::AliCASTORhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
930AliHit(shunt, track)
931{
932 //
933 // Store a CASTOR hit
934 //
935 fVolume = vol[0];
936 fX=hits[0];
937 fY=hits[1];
938 fZ=hits[2];
939}
940
941