1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Zero Degree Calorimeter //
23 // This class contains the basic functions for the Time Of Flight //
24 // detector. Functions specific to one particular geometry are //
25 // contained in the derived classes //
29 <img src="picts/AliZDCClass.gif">
32 <font size=+2 color=red>
33 <p>The responsible person for this module is
34 <a href="mailto:Eugenio.Scomparin@cern.ch">Eugenio Scomparin</a>.
41 ///////////////////////////////////////////////////////////////////////////////
48 #include "AliCallf77.h"
53 # define zdc_init zdc_init_
54 # define zdc_step zdc_step_
55 # define zdc_setbeam zdc_setbeam_
56 # define zdc_sethijing zdc_sethijing_
57 # define zdc_setvenus zdc_setvenus_
58 # define zdc_setkine zdc_setkine_
60 # define zdc_step ZDC_STEP
61 # define zdc_setbeam ZDC_SETBEAM
62 # define zdc_sethijing ZDC_SETHIJING
63 # define zdc_setvenus ZDC_SETVENUS
64 # define zdc_setkine ZDC_SETKINE
67 extern "C" void type_of_call zdc_init();
68 extern "C" void type_of_call zdc_step();
69 extern "C" void type_of_call zdc_setbeam(Int_t beam, Float_t fx, Float_t fy,
70 Float_t sx, Float_t sy, Float_t div,
71 Float_t angle, Int_t cross);
72 extern "C" void type_of_call zdc_sethijing(Int_t hij, Int_t hijf, Int_t hijsp,
74 extern "C" void type_of_call zdc_setvenus(Int_t hiv, Int_t hivf, Int_t hivsp,
76 extern "C" void type_of_call zdc_setkine(Int_t code, Float_t pmom, Float_t cx,
77 Float_t cy, Float_t cz, Int_t type,
82 //_____________________________________________________________________________
86 // Default constructor for the Zero Degree Calorimeter base class
91 //_____________________________________________________________________________
92 AliZDC::AliZDC(const char *name, const char *title)
93 : AliDetector(name,title)
96 // Standard constructor for the Zero Degree Calorimeter base class
100 // Allocate the array of hits
101 fHits = new TClonesArray("AliZDChit", 405);
106 //_____________________________________________________________________________
107 void AliZDC::AddHit(Int_t track, Int_t *vol, Float_t *hits)
110 // Add a Zero Degree Calorimeter hit
112 TClonesArray &lhits = *fHits;
113 new(lhits[fNhits++]) AliZDChit(fIshunt,track,vol,hits);
116 //_____________________________________________________________________________
117 void AliZDC::BuildGeometry()
120 // Build the ROOT TNode geometry for event display
121 // in the Zero Degree Calorimeter
122 // This routine is dummy for the moment
125 // TNode *Node, *Top;
127 // const int kColorZDC = kRed;
130 // Top=gAlice->GetGeometry()->GetNode("alice");
134 brik = new TBRIK("S_ZDC","ZDC box","void",300,300,5);
136 Node = new TNode("ZDC","ZDC","S_ZDC",0,0,600,"");
137 Node->SetLineColor(kColorZDC);
142 //_____________________________________________________________________________
143 Int_t AliZDC::DistancetoPrimitive(Int_t , Int_t )
146 // Distance from the mouse to the Zero Degree Calorimeter
152 //_____________________________________________________________________________
153 void AliZDC::SetBeam(Int_t beam, Float_t fx, Float_t fy, Float_t sx,
154 Float_t sy, Float_t div, Float_t angle, Int_t cross)
157 // Set beam characteristic
158 // This routine has to be revised as it is disconnected from the
159 // actual generation in this version of AliRoot
162 // beam : 1 = gaussian beam
163 // : 2 = uniform beam
164 // fx : x-coordinate of beam offset
165 // fy : y-coordinate of beam offset
166 // sx : sigma-x of the beam (gaussian or uniform)
167 // sy : sigma-y of the beam (gaussian or uniform)
168 // div : divergency of the beam (32*10**-6 rad for LHC)
169 // angle : beam crossing angle (100*10**-6 rad for LHC)
170 // cross : 1 = horizontal beam crossing
171 // : 2 = vertical beam crossing
172 zdc_setbeam(beam,fx,fy,sx,sy,div,angle,cross);
175 //_____________________________________________________________________________
176 void AliZDC::SetHijing(Int_t hij, Int_t hijf, Int_t hijsp, const char *file)
179 // Set the parameter for the HIJING generation
180 // This routine has to be revised as it is disconnected from the
181 // actual generation in this version of AliRoot
184 // HIJ : 1 = read HIJING event file
185 // : 2 = " " " " + debug
186 // HIJF : event number of the first event to be read from file
187 // HIJSP: 0 = read all particles
188 // : 1 = remove spectator nucleons
189 zdc_sethijing(hij,hijf,hijsp, PASSCHARD(file) PASSCHARL(file));
192 //_____________________________________________________________________________
193 void AliZDC::SetVenus(Int_t hiv, Int_t hivf, Int_t hivsp, const char *file)
196 // Set the parameter for the VENUS generation
197 // This routine has to be revised as it is disconnected from the
198 // actual generation in this version of AliRoot
201 // HIV : 1 = read VENUS event file
202 // : 2 = " " " " + debug
203 // HIVF : event number of the first event to be read from file
204 // HIVSP: 0 = read all particles
205 // : 1 = remove spectator nucleons
206 zdc_setvenus(hiv,hivf,hivsp, PASSCHARD(file) PASSCHARL(file));
209 //_____________________________________________________________________________
210 void AliZDC::SetKine(Int_t code, Float_t pmom, Float_t cx, Float_t cy,
211 Float_t cz, Int_t type, Int_t fermi)
214 // Set the parameter for the event generation
215 // This routine has to be revised as it is disconnected from the
216 // actual generation in this version of AliRoot
219 // code : GEANT code of the test particle
220 // pmom : absolute value of particle momentum
221 // cx,cy,cz : director cosines of the track (if type)
222 // type : 0 = take director cosines from cx,cy,cz
223 // : <>0 = pseudorapidity of the test particle
224 // fermi : 0 = no Fermi motion for the spectator nucleons
225 // : 1 = Fermi motion for the spectator nucleons
226 zdc_setkine(code,pmom,cx,cy,cz,type,fermi);
229 //_____________________________________________________________________________
230 void AliZDC::StepManager()
233 // Routine called at every step in the Zero Degree Calorimeter
234 // This is a simple interface to the FORTRAN routine
235 // A step manager should be written
244 ///////////////////////////////////////////////////////////////////////////////
246 // Zero Degree Calorimeter version 1 //
250 <img src="picts/AliZDCv1Class.gif">
255 ///////////////////////////////////////////////////////////////////////////////
257 //_____________________________________________________________________________
258 AliZDCv1::AliZDCv1() : AliZDC()
261 // Default constructor for Zero Degree Calorimeter
265 //_____________________________________________________________________________
266 AliZDCv1::AliZDCv1(const char *name, const char *title)
270 // Standard constructor for Zero Degree Calorimeter
274 //_____________________________________________________________________________
275 void AliZDCv1::CreateGeometry()
278 // Create the geometry for the Zero Degree Calorimeter version 1
279 // -- Author : E Scomparin
283 <img src="picts/AliZDCv1.gif">
288 <img src="picts/AliZDCv1Tree.gif">
292 // The following variables were illegaly initialized in zdc_init.
293 // These variables should become data members of this class
294 // once zdc_init has been converted
295 //* Initialize COMMON block ZDC_CGEOM
303 Float_t HDZN[3] = {4.0,4.0,50.0};
304 Float_t HDZP[3] = {10.0,6.0,75.0};
305 // Coordinates of the center of the ZDC front face in the MRS
306 Float_t ZNPOS[3] = {-0.5,0.,11613.};
307 Float_t ZPPOS[3] = {-21.0,0.,11563.};
308 Float_t FIZN[3] = {0.,0.01825,50.0};
309 Float_t FIZP[3] = {0.,0.01825,75.0};
310 Float_t GRZN[3] = {0.025,0.025,50.0};
311 Float_t GRZP[3] = {0.040,0.040,75.0};
312 Int_t NCEN[3] = {11,11,0};
313 Int_t NCEP[3] = {10,10,0};
316 Float_t zq, conpar[9], tubpar[3];
321 Int_t *idtmed = fIdtmed->GetArray()-799;
323 // -- Mother of the ZDC
333 gMC->Gsvolu("ZDC ", "PCON", idtmed[891], conpar, 9);
334 gMC->Gspos("ZDC ", 1, "ALIC", 0., 0., 0., 0, "ONLY");
335 // -- FIRST SECTION OF THE BEAM PIPE (from compensator dipole to
343 gMC->Gsvolu("P001", "TUBE", idtmed[851], tubpar, 3);
344 gMC->Gspos("P001", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
346 //-- SECOND SECTION OF THE BEAM PIPE (FROM THE END OF D1 TO THE BEGINNING OF
354 gMC->Gsvolu("P002", "TUBE", idtmed[851], tubpar, 3);
355 gMC->Gspos("P002", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
357 zd1 += tubpar[2] * 2.;
362 gMC->Gsvolu("P003", "TUBE", idtmed[851], tubpar, 3);
363 gMC->Gspos("P003", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
365 zd1 += tubpar[2] * 2.;
372 gMC->Gsvolu("P004", "CONE", idtmed[851], conpar, 5);
373 gMC->Gspos("P004", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
375 zd1 += conpar[0] * 2.;
380 gMC->Gsvolu("P005", "TUBE", idtmed[851], tubpar, 3);
381 gMC->Gspos("P005", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
383 zd1 += tubpar[2] * 2.;
390 gMC->Gsvolu("P006", "CONE", idtmed[851], conpar, 5);
391 gMC->Gspos("P006", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
393 zd1 += conpar[0] * 2.;
398 gMC->Gsvolu("P007", "TUBE", idtmed[851], tubpar, 3);
399 gMC->Gspos("P007", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
401 zd1 += tubpar[2] * 2.;
408 gMC->Gsvolu("P008", "CONE", idtmed[851], conpar, 5);
409 gMC->Gspos("P008", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
411 zd1 += conpar[0] * 2.;
415 tubpar[2] = 205.8/2.;
416 gMC->Gsvolu("P009", "TUBE", idtmed[851], tubpar, 3);
417 gMC->Gspos("P009", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
419 zd1 += tubpar[2] * 2.;
424 gMC->Gsvolu("P010", "TUBE", idtmed[851], tubpar, 3);
425 gMC->Gspos("P010", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
427 zd1 += tubpar[2] * 2.;
431 tubpar[2] = 757.5/2.;
432 gMC->Gsvolu("P011", "TUBE", idtmed[851], tubpar, 3);
433 gMC->Gspos("P011", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
435 zd1 += tubpar[2] * 2.;
442 gMC->Gsvolu("P012", "CONE", idtmed[851], conpar, 5);
443 gMC->Gspos("P012", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
445 zd1 += conpar[0] * 2.;
450 gMC->Gsvolu("P013", "TUBE", idtmed[851], tubpar, 3);
451 gMC->Gspos("P013", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
453 zd1 += tubpar[2] * 2.;
458 gMC->Gsvolu("P014", "TUBE", idtmed[851], tubpar, 3);
459 gMC->Gspos("P014", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
461 zd1 += tubpar[2] * 2.;
468 gMC->Gsvolu("P015", "CONE", idtmed[851], conpar, 5);
469 gMC->Gspos("P015", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
471 zd1 += conpar[0] * 2.;
476 gMC->Gsvolu("P016", "TUBE", idtmed[851], tubpar, 3);
477 gMC->Gspos("P016", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
479 zd1 += tubpar[2] * 2.;
484 gMC->Gsvolu("P017", "TUBE", idtmed[851], tubpar, 3);
485 gMC->Gspos("P017", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
487 zd1 += tubpar[2] * 2.;
494 gMC->Gsvolu("P018", "CONE", idtmed[851], conpar, 5);
495 gMC->Gspos("P018", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
497 zd1 += conpar[0] * 2.;
502 gMC->Gsvolu("P019", "TUBE", idtmed[851], tubpar, 3);
503 gMC->Gspos("P019", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
505 zd1 += tubpar[2] * 2.;
510 gMC->Gsvolu("P020", "TUBE", idtmed[851], tubpar, 3);
511 gMC->Gspos("P020", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
513 zd1 += tubpar[2] * 2.;
518 gMC->Gsvolu("P021", "TUBE", idtmed[851], tubpar, 3);
519 gMC->Gspos("P021", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
521 zd1 += tubpar[2] * 2.;
526 gMC->Gsvolu("Q021", "TUBE", idtmed[889], tubpar, 3);
530 gMC->Gsvolu("R021", "TUBE", idtmed[889], tubpar, 3);
531 // -- POSITION Q021 INSIDE P021
532 gMC->Gspos("Q021", 1, "P021", -7.7, 0., 0., 0, "ONLY");
533 // -- POSITION R020 INSIDE P020
534 gMC->Gspos("R021", 1, "P021", 7.7, 0., 0., 0, "ONLY");
536 // -- BEAM PIPES BETWEEN END OF CONICAL PIPE AND BEGINNING OF D2
539 tubpar[2] = 645.*0.5;
540 gMC->Gsvolu("P022", "TUBE", idtmed[851], tubpar, 3);
543 tubpar[2] = 645.*0.5;
544 gMC->Gsvolu("P023", "TUBE", idtmed[851], tubpar, 3);
547 AliMatrix(im1, 90.-0.071, 0., 90., 90., .071, 180.);
548 angle = .071*kDegrad;
549 gMC->Gspos("P022", 1, "ZDC ", TMath::Sin(angle) * 322.5 - 9.7 +
550 TMath::Sin(angle) * 472.5, 0., tubpar[2] + zd1, im1, "ONLY");
551 AliMatrix(im2, 90.+0.071, 0., 90., 90., .071, 0.);
552 gMC->Gspos("P023", 1, "ZDC ", 9.7 - TMath::Sin(angle) * 322.5, 0.,
553 tubpar[2] + zd1, im2, "ONLY");
555 // -- END OF BEAM PIPE VOLUME DEFINITION. MAGNET DEFINITION FOLLOWS
558 // -- COMPENSATOR DIPOLE (MCBWA)
559 // GAP (VACUUM WITH MAGNETIC FIELD)
564 gMC->Gsvolu("MCBW", "TUBE", idtmed[890], tubpar, 3);
565 gMC->Gspos("MCBW", 1, "ZDC ", 0., 0., tubpar[2] + 1920., 0, "ONLY");
567 // -- YOKE (IRON WITHOUT MAGNETIC FIELD)
572 gMC->Gsvolu("YMCB", "TUBE", idtmed[851], tubpar, 3);
573 gMC->Gspos("YMCB", 1, "ZDC ", 0., 0., tubpar[2] + 1920., 0, "ONLY");
579 // -- DEFINE MQXL AND MQX QUADRUPOLE ELEMENT
582 // -- GAP (VACUUM WITH MAGNETIC FIELD)
587 gMC->Gsvolu("MQXL", "TUBE", idtmed[890], tubpar, 3);
594 gMC->Gsvolu("YMQL", "TUBE", idtmed[851], tubpar, 3);
596 gMC->Gspos("MQXL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY");
597 gMC->Gspos("YMQL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY");
599 gMC->Gspos("MQXL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY");
600 gMC->Gspos("YMQL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY");
603 // -- GAP (VACUUM WITH MAGNETIC FIELD)
608 gMC->Gsvolu("MQX ", "TUBE", idtmed[890], tubpar, 3);
615 gMC->Gsvolu("YMQ ", "TUBE", idtmed[851], tubpar, 3);
617 gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 880., 0, "ONLY");
618 gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 880., 0, "ONLY");
620 gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1530., 0, "ONLY");
621 gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1530., 0, "ONLY");
623 // -- SEPARATOR DIPOLE D1
627 // -- GAP (VACUUM WITH MAGNETIC FIELD)
632 gMC->Gsvolu("D1 ", "TUBE", idtmed[890], tubpar, 3);
639 gMC->Gsvolu("YD1 ", "TUBE", idtmed[851], tubpar, 3);
641 gMC->Gspos("YD1 ", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
642 gMC->Gspos("D1 ", 1, "YD1 ", 0., 0., 0., 0, "ONLY");
648 // -- GAP (VACUUM WITH MAGNETIC FIELD)
653 gMC->Gsvolu("D2 ", "TUBE", idtmed[890], tubpar, 3);
660 gMC->Gsvolu("YD2 ", "TUBE", idtmed[851], tubpar, 3);
662 gMC->Gspos("YD2 ", 1, "ZDC ", 0., 0., tubpar[2] + zd2, 0, "ONLY");
664 gMC->Gspos("D2 ", 1, "YD2 ", -9.7, 0., 0., 0, "ONLY");
665 gMC->Gspos("D2 ", 2, "YD2 ", 9.7, 0., 0., 0, "ONLY");
667 // -- END OF MAGNET DEFINITION
669 // ----------------- Hadronic calorimeters -------------------- *
671 // Neutron calorimeter
673 gMC->Gsvolu("ZNEU", "BOX ", idtmed[800], HDZN, 3); // Passive material
674 gMC->Gsvolu("ZNFI", "TUBE", idtmed[802], FIZN, 3); // Active material
675 gMC->Gsvolu("ZNGR", "BOX ", idtmed[889], GRZN, 3); // Empty grooves
677 // Divide ZNEU in towers
678 // (for hits purposes)
680 gMC->Gsdvn("ZNTX", "ZNEU", NZNTX, 1); // x-tower
681 gMC->Gsdvn("ZN1 ", "ZNTX", NZNTY, 2); // y-tower
683 // Divide ZNEU in minitowers
684 // (NCEN(1)= NUMBER OF FIBERS PER TOWER ALONG X-AXIS,
685 // NCEN(2)= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS)
686 // (one fiber per minitower)
688 gMC->Gsdvn("ZNSL", "ZN1 ", NCEN[1], 2); // Slices
689 gMC->Gsdvn("ZNST", "ZNSL", NCEN[0], 1); // Sticks
691 // --- Position the empty grooves in the sticks
692 gMC->Gspos("ZNGR", 1, "ZNST", 0., 0., 0., 0, "ONLY");
693 // --- Position the fibers in the grooves
694 gMC->Gspos("ZNFI", 1, "ZNGR", 0., 0., 0., 0, "ONLY");
695 // --- Position the neutron calorimeter in ZDC
696 gMC->Gspos("ZNEU", 1, "ZDC ", ZNPOS[0], ZNPOS[1], ZNPOS[2] + HDZN[2], 0, "ONLY");
698 // Proton calorimeter
700 gMC->Gsvolu("ZPRO", "BOX ", idtmed[801], HDZP, 3); // Passive material
701 gMC->Gsvolu("ZPFI", "TUBE", idtmed[802], FIZP, 3); // Active material
702 gMC->Gsvolu("ZPGR", "BOX ", idtmed[889], GRZP, 3); // Empty grooves
704 // Divide ZPRO in towers
705 // (for hits purposes)
707 gMC->Gsdvn("ZPTX", "ZPRO", NZPTX, 1); // x-tower
708 gMC->Gsdvn("ZP1 ", "ZPTX", NZPTY, 2); // y-tower
711 // Divide ZPRO in minitowers
712 // (NCEP[0]= NUMBER OF FIBERS ALONG X-AXIS PER MINITOWER,
713 // NCEP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER)
714 // (one fiber per minitower)
716 gMC->Gsdvn("ZPSL", "ZP1 ", NCEP[1], 2); // Slices
717 gMC->Gsdvn("ZPST", "ZPSL", NCEP[0], 1); // Sticks
719 // --- Position the empty grooves in the sticks
720 gMC->Gspos("ZPGR", 1, "ZPST", 0., 0., 0., 0, "ONLY");
721 // --- Position the fibers in the grooves
722 gMC->Gspos("ZPFI", 1, "ZPGR", 0., 0., 0., 0, "ONLY");
723 // --- Position the proton calorimeter in ZDC
724 gMC->Gspos("ZPRO", 1, "ZDC ", ZPPOS[0], ZPPOS[1], ZPPOS[2] + HDZP[2], 0, "ONLY");
728 //_____________________________________________________________________________
729 void AliZDCv1::DrawModule()
732 // Draw a shaded view of the Zero Degree Calorimeter version 1
735 // Set everything unseen
736 gMC->Gsatt("*", "seen", -1);
738 // Set ALIC mother transparent
739 gMC->Gsatt("ALIC","SEEN",0);
741 // Set the volumes visible
742 gMC->Gsatt("ZDC","SEEN",0);
743 gMC->Gsatt("P001","SEEN",1);
744 gMC->Gsatt("P002","SEEN",1);
745 gMC->Gsatt("P003","SEEN",1);
746 gMC->Gsatt("P004","SEEN",1);
747 gMC->Gsatt("P005","SEEN",1);
748 gMC->Gsatt("P006","SEEN",1);
749 gMC->Gsatt("P007","SEEN",1);
750 gMC->Gsatt("P008","SEEN",1);
751 gMC->Gsatt("P009","SEEN",1);
752 gMC->Gsatt("P010","SEEN",1);
753 gMC->Gsatt("P011","SEEN",1);
754 gMC->Gsatt("P012","SEEN",1);
755 gMC->Gsatt("P013","SEEN",1);
756 gMC->Gsatt("P014","SEEN",1);
757 gMC->Gsatt("P015","SEEN",1);
758 gMC->Gsatt("P016","SEEN",1);
759 gMC->Gsatt("P017","SEEN",1);
760 gMC->Gsatt("P018","SEEN",1);
761 gMC->Gsatt("P019","SEEN",1);
762 gMC->Gsatt("P020","SEEN",1);
763 gMC->Gsatt("P021","SEEN",1);
764 gMC->Gsatt("Q021","SEEN",1);
765 gMC->Gsatt("R021","SEEN",1);
766 gMC->Gsatt("P022","SEEN",1);
767 gMC->Gsatt("P023","SEEN",1);
768 gMC->Gsatt("D1 ","SEEN",1);
769 gMC->Gsatt("YD1 ","SEEN",1);
770 gMC->Gsatt("D2 ","SEEN",1);
771 gMC->Gsatt("YD2 ","SEEN",1);
772 gMC->Gsatt("MCBW","SEEN",1);
773 gMC->Gsatt("YMCB","SEEN",1);
774 gMC->Gsatt("MQXL","SEEN",1);
775 gMC->Gsatt("YMQL","SEEN",1);
776 gMC->Gsatt("MQX","SEEN",1);
777 gMC->Gsatt("YMQ","SEEN",1);
778 gMC->Gsatt("D1","SEEN",1);
779 gMC->Gsatt("YD1","SEEN",1);
780 gMC->Gsatt("D2","SEEN",1);
781 gMC->Gsatt("YD2","SEEN",1);
782 gMC->Gsatt("ZNEU","SEEN",0);
783 gMC->Gsatt("ZNFI","SEEN",0);
784 gMC->Gsatt("ZNGR","SEEN",0);
785 gMC->Gsatt("ZNTX","SEEN",0);
786 gMC->Gsatt("ZN1 ","COLO",2);
787 gMC->Gsatt("ZN1 ","SEEN",1);
788 gMC->Gsatt("ZNSL","SEEN",0);
789 gMC->Gsatt("ZNST","SEEN",0);
790 gMC->Gsatt("ZPRO","SEEN",0);
791 gMC->Gsatt("ZPFI","SEEN",0);
792 gMC->Gsatt("ZPGR","SEEN",0);
793 gMC->Gsatt("ZPTX","SEEN",0);
794 gMC->Gsatt("ZP1 ","SEEN",1);
795 gMC->Gsatt("ZPSL","SEEN",0);
796 gMC->Gsatt("ZPST","SEEN",0);
799 gMC->Gdopt("hide", "on");
800 gMC->Gdopt("shad", "on");
801 gMC->Gsatt("*", "fill", 7);
802 gMC->SetClipBox(".");
803 gMC->SetClipBox("*", 0, 100, -100, 100, 12000, 16000);
805 gMC->Gdraw("alic", 40, 30, 0, 488, 220, .07, .07);
806 gMC->Gdhead(1111, "Zero Degree Calorimeter Version 1");
807 gMC->Gdman(18, 4, "MAN");
810 //_____________________________________________________________________________
811 void AliZDCv1::CreateMaterials()
814 // Create Materials for the Zero Degree Calorimeter
816 // Origin : E. Scomparin
818 Int_t *idtmed = fIdtmed->GetArray()-799;
820 Float_t dens, ubuf[1], wmat[2];
824 Float_t z[2], epsil=0.001, stmin=0.01;
826 Float_t fieldm = gAlice->Field()->Max();
829 Float_t tmaxfd=gAlice->Field()->Max();
830 Int_t isxfld = gAlice->Field()->Integ();
833 // --- Store in UBUF r0 for nuclear radius calculation R=r0*A**1/3
837 AliMaterial(1, "TUNG", 183.85, 74., 19.3, .35, 10.3, ubuf, 1);
847 AliMixture(2, "BRASS ", a, z, dens, 2, wmat);
857 AliMixture(3, "SIO2 ", a, z, dens, -2, wmat);
861 AliMaterial(4, "LEAD", 207.19, 82., 11.35, .56, 18.5, ubuf, 1);
865 AliMaterial(5, "COPP", 63.54, 29., 8.96, 1.4, 0., ubuf, 1);
869 AliMaterial(6, "TANT", 180.95, 73., 16.65, .4, 11.9, ubuf, 1);
871 // Steel still to be added
875 AliMaterial(52, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1);
877 // --- Vacuum (no magnetic field)
878 AliMaterial(90, "VOID", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0);
880 // --- Vacuum (magnetic field)
881 AliMaterial(91, "VOIM", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0);
883 // --- Air non magnetic
884 AliMaterial(92, "Air $", 14.61, 7.3, .001205, 30420., 67500., ubuf, 0);
886 // --- Definition of tracking media:
888 // --- Tungsten = 801 ;
890 // --- Fibers (SiO2) = 803 ;
892 // --- Copper = 805 ;
893 // --- Tantalum = 806 ;
896 // --- Vacuum (no field) = 890
897 // --- Vacuum (with field) = 891
898 // --- Air (no field) = 892
901 // --- Tracking media parameters
909 AliMedium(1, "ZW", 1, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
910 AliMedium(2, "ZBRASS", 2, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
911 AliMedium(3, "ZSIO2", 3, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
912 AliMedium(4, "ZLEAD", 4, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
913 AliMedium(5, "ZCOPP", 5, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
914 AliMedium(6, "ZTANT", 6, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
915 AliMedium(52, "ZIRON", 52, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
916 AliMedium(90, "ZVOID", 90, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
917 AliMedium(92, "Air", 92, 0, inofld, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
920 // AliMedium(91, "ZVOIM", 91, isvol, isxfld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
921 AliMedium(91, "ZVOIM", 91, isvol, isxfld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
923 // Thresholds for showering in the ZDCs
926 gMC->Gstpar(idtmed[i-1], "CUTGAM", .01);
927 gMC->Gstpar(idtmed[i-1], "CUTELE", .01);
928 gMC->Gstpar(idtmed[i-1], "CUTNEU", .1);
929 gMC->Gstpar(idtmed[i-1], "CUTHAD", .1);
931 gMC->Gstpar(idtmed[i-1], "CUTGAM", .01);
932 gMC->Gstpar(idtmed[i-1], "CUTELE", .01);
933 gMC->Gstpar(idtmed[i-1], "CUTNEU", .1);
934 gMC->Gstpar(idtmed[i-1], "CUTHAD", .1);
936 // Avoid too detailed showering along the beam line
939 gMC->Gstpar(idtmed[i-1], "CUTGAM", .1);
940 gMC->Gstpar(idtmed[i-1], "CUTELE", .1);
941 gMC->Gstpar(idtmed[i-1], "CUTNEU", 1.);
942 gMC->Gstpar(idtmed[i-1], "CUTHAD", 1.);
944 // Avoid interaction in fibers (only energy loss allowed)
946 gMC->Gstpar(idtmed[i-1], "DCAY", 0.);
947 gMC->Gstpar(idtmed[i-1], "MULS", 0.);
948 gMC->Gstpar(idtmed[i-1], "PFIS", 0.);
949 gMC->Gstpar(idtmed[i-1], "MUNU", 0.);
950 gMC->Gstpar(idtmed[i-1], "LOSS", 1.);
951 gMC->Gstpar(idtmed[i-1], "PHOT", 0.);
952 gMC->Gstpar(idtmed[i-1], "COMP", 0.);
953 gMC->Gstpar(idtmed[i-1], "PAIR", 0.);
954 gMC->Gstpar(idtmed[i-1], "BREM", 0.);
955 gMC->Gstpar(idtmed[i-1], "DRAY", 0.);
956 gMC->Gstpar(idtmed[i-1], "ANNI", 0.);
957 gMC->Gstpar(idtmed[i-1], "HADR", 0.);
962 //_____________________________________________________________________________
963 AliZDChit::AliZDChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
967 // Add a Zero Degree Calorimeter hit
970 for (i=0;i<4;i++) fVolume[i] = vol[i];