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 **************************************************************************/
18 Revision 1.6 1999/09/29 09:24:35 fca
19 Introduction of the Copyright and cvs Log
23 ///////////////////////////////////////////////////////////////////////////////
25 // Zero Degree Calorimeter //
26 // This class contains the basic functions for the Time Of Flight //
27 // detector. Functions specific to one particular geometry are //
28 // contained in the derived classes //
32 <img src="picts/AliZDCClass.gif">
35 <font size=+2 color=red>
36 <p>The responsible person for this module is
37 <a href="mailto:Eugenio.Scomparin@cern.ch">Eugenio Scomparin</a>.
44 ///////////////////////////////////////////////////////////////////////////////
51 #include "AliCallf77.h"
56 # define zdc_init zdc_init_
57 # define zdc_step zdc_step_
58 # define zdc_setbeam zdc_setbeam_
59 # define zdc_sethijing zdc_sethijing_
60 # define zdc_setvenus zdc_setvenus_
61 # define zdc_setkine zdc_setkine_
63 # define zdc_step ZDC_STEP
64 # define zdc_setbeam ZDC_SETBEAM
65 # define zdc_sethijing ZDC_SETHIJING
66 # define zdc_setvenus ZDC_SETVENUS
67 # define zdc_setkine ZDC_SETKINE
70 extern "C" void type_of_call zdc_init();
71 extern "C" void type_of_call zdc_step();
72 extern "C" void type_of_call zdc_setbeam(Int_t beam, Float_t fx, Float_t fy,
73 Float_t sx, Float_t sy, Float_t div,
74 Float_t angle, Int_t cross);
75 extern "C" void type_of_call zdc_sethijing(Int_t hij, Int_t hijf, Int_t hijsp,
77 extern "C" void type_of_call zdc_setvenus(Int_t hiv, Int_t hivf, Int_t hivsp,
79 extern "C" void type_of_call zdc_setkine(Int_t code, Float_t pmom, Float_t cx,
80 Float_t cy, Float_t cz, Int_t type,
85 //_____________________________________________________________________________
89 // Default constructor for the Zero Degree Calorimeter base class
94 //_____________________________________________________________________________
95 AliZDC::AliZDC(const char *name, const char *title)
96 : AliDetector(name,title)
99 // Standard constructor for the Zero Degree Calorimeter base class
103 // Allocate the array of hits
104 fHits = new TClonesArray("AliZDChit", 405);
105 gAlice->AddHitList(fHits);
110 //_____________________________________________________________________________
111 void AliZDC::AddHit(Int_t track, Int_t *vol, Float_t *hits)
114 // Add a Zero Degree Calorimeter hit
116 TClonesArray &lhits = *fHits;
117 new(lhits[fNhits++]) AliZDChit(fIshunt,track,vol,hits);
120 //_____________________________________________________________________________
121 void AliZDC::BuildGeometry()
124 // Build the ROOT TNode geometry for event display
125 // in the Zero Degree Calorimeter
126 // This routine is dummy for the moment
129 // TNode *Node, *Top;
131 // const int kColorZDC = kRed;
134 // Top=gAlice->GetGeometry()->GetNode("alice");
138 brik = new TBRIK("S_ZDC","ZDC box","void",300,300,5);
140 Node = new TNode("ZDC","ZDC","S_ZDC",0,0,600,"");
141 Node->SetLineColor(kColorZDC);
146 //_____________________________________________________________________________
147 Int_t AliZDC::DistancetoPrimitive(Int_t , Int_t )
150 // Distance from the mouse to the Zero Degree Calorimeter
156 //_____________________________________________________________________________
157 void AliZDC::SetBeam(Int_t beam, Float_t fx, Float_t fy, Float_t sx,
158 Float_t sy, Float_t div, Float_t angle, Int_t cross)
161 // Set beam characteristic
162 // This routine has to be revised as it is disconnected from the
163 // actual generation in this version of AliRoot
166 // beam : 1 = gaussian beam
167 // : 2 = uniform beam
168 // fx : x-coordinate of beam offset
169 // fy : y-coordinate of beam offset
170 // sx : sigma-x of the beam (gaussian or uniform)
171 // sy : sigma-y of the beam (gaussian or uniform)
172 // div : divergency of the beam (32*10**-6 rad for LHC)
173 // angle : beam crossing angle (100*10**-6 rad for LHC)
174 // cross : 1 = horizontal beam crossing
175 // : 2 = vertical beam crossing
176 zdc_setbeam(beam,fx,fy,sx,sy,div,angle,cross);
179 //_____________________________________________________________________________
180 void AliZDC::SetHijing(Int_t hij, Int_t hijf, Int_t hijsp, const char *file)
183 // Set the parameter for the HIJING generation
184 // This routine has to be revised as it is disconnected from the
185 // actual generation in this version of AliRoot
188 // HIJ : 1 = read HIJING event file
189 // : 2 = " " " " + debug
190 // HIJF : event number of the first event to be read from file
191 // HIJSP: 0 = read all particles
192 // : 1 = remove spectator nucleons
193 zdc_sethijing(hij,hijf,hijsp, PASSCHARD(file) PASSCHARL(file));
196 //_____________________________________________________________________________
197 void AliZDC::SetVenus(Int_t hiv, Int_t hivf, Int_t hivsp, const char *file)
200 // Set the parameter for the VENUS generation
201 // This routine has to be revised as it is disconnected from the
202 // actual generation in this version of AliRoot
205 // HIV : 1 = read VENUS event file
206 // : 2 = " " " " + debug
207 // HIVF : event number of the first event to be read from file
208 // HIVSP: 0 = read all particles
209 // : 1 = remove spectator nucleons
210 zdc_setvenus(hiv,hivf,hivsp, PASSCHARD(file) PASSCHARL(file));
213 //_____________________________________________________________________________
214 void AliZDC::SetKine(Int_t code, Float_t pmom, Float_t cx, Float_t cy,
215 Float_t cz, Int_t type, Int_t fermi)
218 // Set the parameter for the event generation
219 // This routine has to be revised as it is disconnected from the
220 // actual generation in this version of AliRoot
223 // code : GEANT code of the test particle
224 // pmom : absolute value of particle momentum
225 // cx,cy,cz : director cosines of the track (if type)
226 // type : 0 = take director cosines from cx,cy,cz
227 // : <>0 = pseudorapidity of the test particle
228 // fermi : 0 = no Fermi motion for the spectator nucleons
229 // : 1 = Fermi motion for the spectator nucleons
230 zdc_setkine(code,pmom,cx,cy,cz,type,fermi);
233 //_____________________________________________________________________________
234 void AliZDC::StepManager()
237 // Routine called at every step in the Zero Degree Calorimeter
238 // This is a simple interface to the FORTRAN routine
239 // A step manager should be written
248 ///////////////////////////////////////////////////////////////////////////////
250 // Zero Degree Calorimeter version 1 //
254 <img src="picts/AliZDCv1Class.gif">
259 ///////////////////////////////////////////////////////////////////////////////
261 //_____________________________________________________________________________
262 AliZDCv1::AliZDCv1() : AliZDC()
265 // Default constructor for Zero Degree Calorimeter
269 //_____________________________________________________________________________
270 AliZDCv1::AliZDCv1(const char *name, const char *title)
274 // Standard constructor for Zero Degree Calorimeter
278 //_____________________________________________________________________________
279 void AliZDCv1::CreateGeometry()
282 // Create the geometry for the Zero Degree Calorimeter version 1
283 // -- Author : E Scomparin
287 <img src="picts/AliZDCv1.gif">
292 <img src="picts/AliZDCv1Tree.gif">
296 // The following variables were illegaly initialized in zdc_init.
297 // These variables should become data members of this class
298 // once zdc_init has been converted
299 //* Initialize COMMON block ZDC_CGEOM
307 Float_t HDZN[3] = {4.0,4.0,50.0};
308 Float_t HDZP[3] = {10.0,6.0,75.0};
309 // Coordinates of the center of the ZDC front face in the MRS
310 Float_t ZNPOS[3] = {-0.5,0.,11613.};
311 Float_t ZPPOS[3] = {-21.0,0.,11563.};
312 Float_t FIZN[3] = {0.,0.01825,50.0};
313 Float_t FIZP[3] = {0.,0.01825,75.0};
314 Float_t GRZN[3] = {0.025,0.025,50.0};
315 Float_t GRZP[3] = {0.040,0.040,75.0};
316 Int_t NCEN[3] = {11,11,0};
317 Int_t NCEP[3] = {10,10,0};
320 Float_t zq, conpar[9], tubpar[3];
325 Int_t *idtmed = fIdtmed->GetArray()-799;
327 // -- Mother of the ZDC
337 gMC->Gsvolu("ZDC ", "PCON", idtmed[891], conpar, 9);
338 gMC->Gspos("ZDC ", 1, "ALIC", 0., 0., 0., 0, "ONLY");
339 // -- FIRST SECTION OF THE BEAM PIPE (from compensator dipole to
347 gMC->Gsvolu("P001", "TUBE", idtmed[851], tubpar, 3);
348 gMC->Gspos("P001", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
350 //-- SECOND SECTION OF THE BEAM PIPE (FROM THE END OF D1 TO THE BEGINNING OF
358 gMC->Gsvolu("P002", "TUBE", idtmed[851], tubpar, 3);
359 gMC->Gspos("P002", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
361 zd1 += tubpar[2] * 2.;
366 gMC->Gsvolu("P003", "TUBE", idtmed[851], tubpar, 3);
367 gMC->Gspos("P003", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
369 zd1 += tubpar[2] * 2.;
376 gMC->Gsvolu("P004", "CONE", idtmed[851], conpar, 5);
377 gMC->Gspos("P004", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
379 zd1 += conpar[0] * 2.;
384 gMC->Gsvolu("P005", "TUBE", idtmed[851], tubpar, 3);
385 gMC->Gspos("P005", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
387 zd1 += tubpar[2] * 2.;
394 gMC->Gsvolu("P006", "CONE", idtmed[851], conpar, 5);
395 gMC->Gspos("P006", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
397 zd1 += conpar[0] * 2.;
402 gMC->Gsvolu("P007", "TUBE", idtmed[851], tubpar, 3);
403 gMC->Gspos("P007", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
405 zd1 += tubpar[2] * 2.;
412 gMC->Gsvolu("P008", "CONE", idtmed[851], conpar, 5);
413 gMC->Gspos("P008", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
415 zd1 += conpar[0] * 2.;
419 tubpar[2] = 205.8/2.;
420 gMC->Gsvolu("P009", "TUBE", idtmed[851], tubpar, 3);
421 gMC->Gspos("P009", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
423 zd1 += tubpar[2] * 2.;
428 gMC->Gsvolu("P010", "TUBE", idtmed[851], tubpar, 3);
429 gMC->Gspos("P010", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
431 zd1 += tubpar[2] * 2.;
435 tubpar[2] = 757.5/2.;
436 gMC->Gsvolu("P011", "TUBE", idtmed[851], tubpar, 3);
437 gMC->Gspos("P011", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
439 zd1 += tubpar[2] * 2.;
446 gMC->Gsvolu("P012", "CONE", idtmed[851], conpar, 5);
447 gMC->Gspos("P012", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
449 zd1 += conpar[0] * 2.;
454 gMC->Gsvolu("P013", "TUBE", idtmed[851], tubpar, 3);
455 gMC->Gspos("P013", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
457 zd1 += tubpar[2] * 2.;
462 gMC->Gsvolu("P014", "TUBE", idtmed[851], tubpar, 3);
463 gMC->Gspos("P014", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
465 zd1 += tubpar[2] * 2.;
472 gMC->Gsvolu("P015", "CONE", idtmed[851], conpar, 5);
473 gMC->Gspos("P015", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
475 zd1 += conpar[0] * 2.;
480 gMC->Gsvolu("P016", "TUBE", idtmed[851], tubpar, 3);
481 gMC->Gspos("P016", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
483 zd1 += tubpar[2] * 2.;
488 gMC->Gsvolu("P017", "TUBE", idtmed[851], tubpar, 3);
489 gMC->Gspos("P017", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
491 zd1 += tubpar[2] * 2.;
498 gMC->Gsvolu("P018", "CONE", idtmed[851], conpar, 5);
499 gMC->Gspos("P018", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY");
501 zd1 += conpar[0] * 2.;
506 gMC->Gsvolu("P019", "TUBE", idtmed[851], tubpar, 3);
507 gMC->Gspos("P019", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
509 zd1 += tubpar[2] * 2.;
514 gMC->Gsvolu("P020", "TUBE", idtmed[851], tubpar, 3);
515 gMC->Gspos("P020", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
517 zd1 += tubpar[2] * 2.;
522 gMC->Gsvolu("P021", "TUBE", idtmed[851], tubpar, 3);
523 gMC->Gspos("P021", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
525 zd1 += tubpar[2] * 2.;
530 gMC->Gsvolu("Q021", "TUBE", idtmed[889], tubpar, 3);
534 gMC->Gsvolu("R021", "TUBE", idtmed[889], tubpar, 3);
535 // -- POSITION Q021 INSIDE P021
536 gMC->Gspos("Q021", 1, "P021", -7.7, 0., 0., 0, "ONLY");
537 // -- POSITION R020 INSIDE P020
538 gMC->Gspos("R021", 1, "P021", 7.7, 0., 0., 0, "ONLY");
540 // -- BEAM PIPES BETWEEN END OF CONICAL PIPE AND BEGINNING OF D2
543 tubpar[2] = 645.*0.5;
544 gMC->Gsvolu("P022", "TUBE", idtmed[851], tubpar, 3);
547 tubpar[2] = 645.*0.5;
548 gMC->Gsvolu("P023", "TUBE", idtmed[851], tubpar, 3);
551 AliMatrix(im1, 90.-0.071, 0., 90., 90., .071, 180.);
552 angle = .071*kDegrad;
553 gMC->Gspos("P022", 1, "ZDC ", TMath::Sin(angle) * 322.5 - 9.7 +
554 TMath::Sin(angle) * 472.5, 0., tubpar[2] + zd1, im1, "ONLY");
555 AliMatrix(im2, 90.+0.071, 0., 90., 90., .071, 0.);
556 gMC->Gspos("P023", 1, "ZDC ", 9.7 - TMath::Sin(angle) * 322.5, 0.,
557 tubpar[2] + zd1, im2, "ONLY");
559 // -- END OF BEAM PIPE VOLUME DEFINITION. MAGNET DEFINITION FOLLOWS
562 // -- COMPENSATOR DIPOLE (MCBWA)
563 // GAP (VACUUM WITH MAGNETIC FIELD)
568 gMC->Gsvolu("MCBW", "TUBE", idtmed[890], tubpar, 3);
569 gMC->Gspos("MCBW", 1, "ZDC ", 0., 0., tubpar[2] + 1920., 0, "ONLY");
571 // -- YOKE (IRON WITHOUT MAGNETIC FIELD)
576 gMC->Gsvolu("YMCB", "TUBE", idtmed[851], tubpar, 3);
577 gMC->Gspos("YMCB", 1, "ZDC ", 0., 0., tubpar[2] + 1920., 0, "ONLY");
583 // -- DEFINE MQXL AND MQX QUADRUPOLE ELEMENT
586 // -- GAP (VACUUM WITH MAGNETIC FIELD)
591 gMC->Gsvolu("MQXL", "TUBE", idtmed[890], tubpar, 3);
598 gMC->Gsvolu("YMQL", "TUBE", idtmed[851], tubpar, 3);
600 gMC->Gspos("MQXL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY");
601 gMC->Gspos("YMQL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY");
603 gMC->Gspos("MQXL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY");
604 gMC->Gspos("YMQL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY");
607 // -- GAP (VACUUM WITH MAGNETIC FIELD)
612 gMC->Gsvolu("MQX ", "TUBE", idtmed[890], tubpar, 3);
619 gMC->Gsvolu("YMQ ", "TUBE", idtmed[851], tubpar, 3);
621 gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 880., 0, "ONLY");
622 gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 880., 0, "ONLY");
624 gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1530., 0, "ONLY");
625 gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1530., 0, "ONLY");
627 // -- SEPARATOR DIPOLE D1
631 // -- GAP (VACUUM WITH MAGNETIC FIELD)
636 gMC->Gsvolu("D1 ", "TUBE", idtmed[890], tubpar, 3);
643 gMC->Gsvolu("YD1 ", "TUBE", idtmed[851], tubpar, 3);
645 gMC->Gspos("YD1 ", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
646 gMC->Gspos("D1 ", 1, "YD1 ", 0., 0., 0., 0, "ONLY");
652 // -- GAP (VACUUM WITH MAGNETIC FIELD)
657 gMC->Gsvolu("D2 ", "TUBE", idtmed[890], tubpar, 3);
664 gMC->Gsvolu("YD2 ", "TUBE", idtmed[851], tubpar, 3);
666 gMC->Gspos("YD2 ", 1, "ZDC ", 0., 0., tubpar[2] + zd2, 0, "ONLY");
668 gMC->Gspos("D2 ", 1, "YD2 ", -9.7, 0., 0., 0, "ONLY");
669 gMC->Gspos("D2 ", 2, "YD2 ", 9.7, 0., 0., 0, "ONLY");
671 // -- END OF MAGNET DEFINITION
673 // ----------------- Hadronic calorimeters -------------------- *
675 // Neutron calorimeter
677 gMC->Gsvolu("ZNEU", "BOX ", idtmed[800], HDZN, 3); // Passive material
678 gMC->Gsvolu("ZNFI", "TUBE", idtmed[802], FIZN, 3); // Active material
679 gMC->Gsvolu("ZNGR", "BOX ", idtmed[889], GRZN, 3); // Empty grooves
681 // Divide ZNEU in towers
682 // (for hits purposes)
684 gMC->Gsdvn("ZNTX", "ZNEU", NZNTX, 1); // x-tower
685 gMC->Gsdvn("ZN1 ", "ZNTX", NZNTY, 2); // y-tower
687 // Divide ZNEU in minitowers
688 // (NCEN(1)= NUMBER OF FIBERS PER TOWER ALONG X-AXIS,
689 // NCEN(2)= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS)
690 // (one fiber per minitower)
692 gMC->Gsdvn("ZNSL", "ZN1 ", NCEN[1], 2); // Slices
693 gMC->Gsdvn("ZNST", "ZNSL", NCEN[0], 1); // Sticks
695 // --- Position the empty grooves in the sticks
696 gMC->Gspos("ZNGR", 1, "ZNST", 0., 0., 0., 0, "ONLY");
697 // --- Position the fibers in the grooves
698 gMC->Gspos("ZNFI", 1, "ZNGR", 0., 0., 0., 0, "ONLY");
699 // --- Position the neutron calorimeter in ZDC
700 gMC->Gspos("ZNEU", 1, "ZDC ", ZNPOS[0], ZNPOS[1], ZNPOS[2] + HDZN[2], 0, "ONLY");
702 // Proton calorimeter
704 gMC->Gsvolu("ZPRO", "BOX ", idtmed[801], HDZP, 3); // Passive material
705 gMC->Gsvolu("ZPFI", "TUBE", idtmed[802], FIZP, 3); // Active material
706 gMC->Gsvolu("ZPGR", "BOX ", idtmed[889], GRZP, 3); // Empty grooves
708 // Divide ZPRO in towers
709 // (for hits purposes)
711 gMC->Gsdvn("ZPTX", "ZPRO", NZPTX, 1); // x-tower
712 gMC->Gsdvn("ZP1 ", "ZPTX", NZPTY, 2); // y-tower
715 // Divide ZPRO in minitowers
716 // (NCEP[0]= NUMBER OF FIBERS ALONG X-AXIS PER MINITOWER,
717 // NCEP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER)
718 // (one fiber per minitower)
720 gMC->Gsdvn("ZPSL", "ZP1 ", NCEP[1], 2); // Slices
721 gMC->Gsdvn("ZPST", "ZPSL", NCEP[0], 1); // Sticks
723 // --- Position the empty grooves in the sticks
724 gMC->Gspos("ZPGR", 1, "ZPST", 0., 0., 0., 0, "ONLY");
725 // --- Position the fibers in the grooves
726 gMC->Gspos("ZPFI", 1, "ZPGR", 0., 0., 0., 0, "ONLY");
727 // --- Position the proton calorimeter in ZDC
728 gMC->Gspos("ZPRO", 1, "ZDC ", ZPPOS[0], ZPPOS[1], ZPPOS[2] + HDZP[2], 0, "ONLY");
732 //_____________________________________________________________________________
733 void AliZDCv1::DrawModule()
736 // Draw a shaded view of the Zero Degree Calorimeter version 1
739 // Set everything unseen
740 gMC->Gsatt("*", "seen", -1);
742 // Set ALIC mother transparent
743 gMC->Gsatt("ALIC","SEEN",0);
745 // Set the volumes visible
746 gMC->Gsatt("ZDC","SEEN",0);
747 gMC->Gsatt("P001","SEEN",1);
748 gMC->Gsatt("P002","SEEN",1);
749 gMC->Gsatt("P003","SEEN",1);
750 gMC->Gsatt("P004","SEEN",1);
751 gMC->Gsatt("P005","SEEN",1);
752 gMC->Gsatt("P006","SEEN",1);
753 gMC->Gsatt("P007","SEEN",1);
754 gMC->Gsatt("P008","SEEN",1);
755 gMC->Gsatt("P009","SEEN",1);
756 gMC->Gsatt("P010","SEEN",1);
757 gMC->Gsatt("P011","SEEN",1);
758 gMC->Gsatt("P012","SEEN",1);
759 gMC->Gsatt("P013","SEEN",1);
760 gMC->Gsatt("P014","SEEN",1);
761 gMC->Gsatt("P015","SEEN",1);
762 gMC->Gsatt("P016","SEEN",1);
763 gMC->Gsatt("P017","SEEN",1);
764 gMC->Gsatt("P018","SEEN",1);
765 gMC->Gsatt("P019","SEEN",1);
766 gMC->Gsatt("P020","SEEN",1);
767 gMC->Gsatt("P021","SEEN",1);
768 gMC->Gsatt("Q021","SEEN",1);
769 gMC->Gsatt("R021","SEEN",1);
770 gMC->Gsatt("P022","SEEN",1);
771 gMC->Gsatt("P023","SEEN",1);
772 gMC->Gsatt("D1 ","SEEN",1);
773 gMC->Gsatt("YD1 ","SEEN",1);
774 gMC->Gsatt("D2 ","SEEN",1);
775 gMC->Gsatt("YD2 ","SEEN",1);
776 gMC->Gsatt("MCBW","SEEN",1);
777 gMC->Gsatt("YMCB","SEEN",1);
778 gMC->Gsatt("MQXL","SEEN",1);
779 gMC->Gsatt("YMQL","SEEN",1);
780 gMC->Gsatt("MQX","SEEN",1);
781 gMC->Gsatt("YMQ","SEEN",1);
782 gMC->Gsatt("D1","SEEN",1);
783 gMC->Gsatt("YD1","SEEN",1);
784 gMC->Gsatt("D2","SEEN",1);
785 gMC->Gsatt("YD2","SEEN",1);
786 gMC->Gsatt("ZNEU","SEEN",0);
787 gMC->Gsatt("ZNFI","SEEN",0);
788 gMC->Gsatt("ZNGR","SEEN",0);
789 gMC->Gsatt("ZNTX","SEEN",0);
790 gMC->Gsatt("ZN1 ","COLO",2);
791 gMC->Gsatt("ZN1 ","SEEN",1);
792 gMC->Gsatt("ZNSL","SEEN",0);
793 gMC->Gsatt("ZNST","SEEN",0);
794 gMC->Gsatt("ZPRO","SEEN",0);
795 gMC->Gsatt("ZPFI","SEEN",0);
796 gMC->Gsatt("ZPGR","SEEN",0);
797 gMC->Gsatt("ZPTX","SEEN",0);
798 gMC->Gsatt("ZP1 ","SEEN",1);
799 gMC->Gsatt("ZPSL","SEEN",0);
800 gMC->Gsatt("ZPST","SEEN",0);
803 gMC->Gdopt("hide", "on");
804 gMC->Gdopt("shad", "on");
805 gMC->Gsatt("*", "fill", 7);
806 gMC->SetClipBox(".");
807 gMC->SetClipBox("*", 0, 100, -100, 100, 12000, 16000);
809 gMC->Gdraw("alic", 40, 30, 0, 488, 220, .07, .07);
810 gMC->Gdhead(1111, "Zero Degree Calorimeter Version 1");
811 gMC->Gdman(18, 4, "MAN");
814 //_____________________________________________________________________________
815 void AliZDCv1::CreateMaterials()
818 // Create Materials for the Zero Degree Calorimeter
820 // Origin : E. Scomparin
822 Int_t *idtmed = fIdtmed->GetArray()-799;
824 Float_t dens, ubuf[1], wmat[2];
828 Float_t z[2], epsil=0.001, stmin=0.01;
830 Float_t fieldm = gAlice->Field()->Max();
833 Float_t tmaxfd=gAlice->Field()->Max();
834 Int_t isxfld = gAlice->Field()->Integ();
837 // --- Store in UBUF r0 for nuclear radius calculation R=r0*A**1/3
841 AliMaterial(1, "TUNG", 183.85, 74., 19.3, .35, 10.3, ubuf, 1);
851 AliMixture(2, "BRASS ", a, z, dens, 2, wmat);
861 AliMixture(3, "SIO2 ", a, z, dens, -2, wmat);
865 AliMaterial(4, "LEAD", 207.19, 82., 11.35, .56, 18.5, ubuf, 1);
869 AliMaterial(5, "COPP", 63.54, 29., 8.96, 1.4, 0., ubuf, 1);
873 AliMaterial(6, "TANT", 180.95, 73., 16.65, .4, 11.9, ubuf, 1);
875 // Steel still to be added
879 AliMaterial(52, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1);
881 // --- Vacuum (no magnetic field)
882 AliMaterial(90, "VOID", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0);
884 // --- Vacuum (magnetic field)
885 AliMaterial(91, "VOIM", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0);
887 // --- Air non magnetic
888 AliMaterial(92, "Air $", 14.61, 7.3, .001205, 30420., 67500., ubuf, 0);
890 // --- Definition of tracking media:
892 // --- Tungsten = 801 ;
894 // --- Fibers (SiO2) = 803 ;
896 // --- Copper = 805 ;
897 // --- Tantalum = 806 ;
900 // --- Vacuum (no field) = 890
901 // --- Vacuum (with field) = 891
902 // --- Air (no field) = 892
905 // --- Tracking media parameters
913 AliMedium(1, "ZW", 1, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
914 AliMedium(2, "ZBRASS", 2, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
915 AliMedium(3, "ZSIO2", 3, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
916 AliMedium(4, "ZLEAD", 4, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
917 AliMedium(5, "ZCOPP", 5, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
918 AliMedium(6, "ZTANT", 6, isvol_active, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
919 AliMedium(52, "ZIRON", 52, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
920 AliMedium(90, "ZVOID", 90, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
921 AliMedium(92, "Air", 92, 0, inofld, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
924 // AliMedium(91, "ZVOIM", 91, isvol, isxfld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
925 AliMedium(91, "ZVOIM", 91, isvol, isxfld, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
927 // Thresholds for showering in the ZDCs
930 gMC->Gstpar(idtmed[i-1], "CUTGAM", .01);
931 gMC->Gstpar(idtmed[i-1], "CUTELE", .01);
932 gMC->Gstpar(idtmed[i-1], "CUTNEU", .1);
933 gMC->Gstpar(idtmed[i-1], "CUTHAD", .1);
935 gMC->Gstpar(idtmed[i-1], "CUTGAM", .01);
936 gMC->Gstpar(idtmed[i-1], "CUTELE", .01);
937 gMC->Gstpar(idtmed[i-1], "CUTNEU", .1);
938 gMC->Gstpar(idtmed[i-1], "CUTHAD", .1);
940 // Avoid too detailed showering along the beam line
943 gMC->Gstpar(idtmed[i-1], "CUTGAM", .1);
944 gMC->Gstpar(idtmed[i-1], "CUTELE", .1);
945 gMC->Gstpar(idtmed[i-1], "CUTNEU", 1.);
946 gMC->Gstpar(idtmed[i-1], "CUTHAD", 1.);
948 // Avoid interaction in fibers (only energy loss allowed)
950 gMC->Gstpar(idtmed[i-1], "DCAY", 0.);
951 gMC->Gstpar(idtmed[i-1], "MULS", 0.);
952 gMC->Gstpar(idtmed[i-1], "PFIS", 0.);
953 gMC->Gstpar(idtmed[i-1], "MUNU", 0.);
954 gMC->Gstpar(idtmed[i-1], "LOSS", 1.);
955 gMC->Gstpar(idtmed[i-1], "PHOT", 0.);
956 gMC->Gstpar(idtmed[i-1], "COMP", 0.);
957 gMC->Gstpar(idtmed[i-1], "PAIR", 0.);
958 gMC->Gstpar(idtmed[i-1], "BREM", 0.);
959 gMC->Gstpar(idtmed[i-1], "DRAY", 0.);
960 gMC->Gstpar(idtmed[i-1], "ANNI", 0.);
961 gMC->Gstpar(idtmed[i-1], "HADR", 0.);
966 //_____________________________________________________________________________
967 AliZDChit::AliZDChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
971 // Add a Zero Degree Calorimeter hit
974 for (i=0;i<4;i++) fVolume[i] = vol[i];