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.9 1999/11/08 07:12:31 fca
19 Minor corrections thanks to I.Hrivnacova
21 Revision 1.8 1999/09/29 09:24:23 fca
22 Introduction of the Copyright and cvs Log
26 /////////////////////////////////////////////////////////
27 // Manager and hits classes for set:PHOS version 0 //
28 /////////////////////////////////////////////////////////
30 // --- ROOT system ---
38 // --- galice header files ---
39 #include "AliPHOSv0.h"
45 //______________________________________________________________________________
48 AliPHOSv0::AliPHOSv0()
53 //______________________________________________________________________________
55 AliPHOSv0::AliPHOSv0(const char *name, const char *title)
56 : AliPHOS(name, title)
61 //___________________________________________
62 void AliPHOSv0::Init()
64 fIdSens=gMC->VolId("PXTL");
67 //___________________________________________
68 void AliPHOSv0::CreateGeometry()
70 // *** DEFINITION OF THE -0.25<y<0.25 TILTED GEOMETRY OF THE PHOS ***
71 // ORIGIN : NICK VAN EIJNDHOVEN
74 Float_t r, dptcb[3], dpair[3], dphos[3], dpucp[3], dpasp[3];
78 Float_t xp1, yp1, xp2, yp2;
80 Int_t *idtmed = fIdtmed->GetArray()-699;
82 // --- Dimensions of PbWO4 crystal ---
83 const Float_t XTL_X=2.2;
84 const Float_t XTL_Y=18.;
85 const Float_t XTL_Z=2.2;
86 // --- Tyvek wrapper thickness
87 const Float_t PAP_THICK=0.01;
88 // --- Polystyrene Foam Outer Cover dimensions ---
89 const Float_t FOC_X=214.6;
90 const Float_t FOC_Y=80.;
91 const Float_t FOC_Z=260.;
92 // --- Inner AIR volume dimensions ---
93 const Float_t AIR_X=206.;
94 const Float_t AIR_Y=66.;
95 const Float_t AIR_Z=244.;
96 // --- Tyvek Crystal Block dimensions ---
97 const Float_t TCB_X=198.;
98 const Float_t TCB_Y=25.;
99 const Float_t TCB_Z=234.;
100 // --- Upper Cooling Plate thickness ---
101 const Float_t UCP_Y=0.06;
102 // --- Al Support Plate thickness ---
103 const Float_t ASP_Y=10.;
104 //--- Distance from IP to Foam Outer Cover top plate (needs to be 447.) ---
105 const Float_t FOC_R=467.;
106 //--- Distance from IP to Crystal Block top Surface (needs to be 460.) ---
107 const Float_t CBS_R=480.;
109 // --- Dimensions of volumes ---
112 // --- Define PHOS box volume, fill with Polystyrene foam ---
116 gMC->Gsvolu("PHOS", "BOX ", idtmed[703], dphos, 3);
118 // --- Define air-filled box, place inside PHOS ---
122 gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3);
123 gMC->Gspos("PAIR", 1, "PHOS", 0., 0., 0., 0, "ONLY");
125 // --- Define Upper Cooling Panel ---
126 // --- place it right behind upper foam plate ---
130 gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp, 3);
131 yo = (AIR_Y-UCP_Y)/2.;
132 gMC->Gspos("PUCP", 1, "PAIR", 0., yo, 0., 0, "ONLY");
134 // --- Define Crystal Block, fill with Tyvek, position inside PAIR ---
138 gMC->Gsvolu("PTCB", "BOX ", idtmed[702], dptcb, 3);
139 // --- Divide PTCB in X and Z directions --
140 gMC->Gsdvn("PSEC", "PTCB", 11, 1);
141 gMC->Gsdvn("PMOD", "PSEC", 13, 3);
142 gMC->Gsdvn("PSTR", "PMOD", 8, 1);
143 gMC->Gsdvn("PCEL", "PSTR", 8, 3);
144 yo = (FOC_Y-TCB_Y)/2. -(CBS_R-FOC_R);
145 gMC->Gspos("PTCB", 1, "PAIR", 0., yo, 0., 0, "ONLY");
147 // --- Define PbWO4 crystal volume, place inside PCEL ---
151 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3);
152 yo = (TCB_Y-XTL_Y)/2. - PAP_THICK;
153 gMC->Gspos("PXTL", 1, "PCEL", 0., yo, 0., 0, "ONLY");
155 // --- Define Al Support Plate, position it inside PAIR ---
156 // --- right beneath PTCB ---
160 gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3);
161 yo = (FOC_Y-ASP_Y)/2. - (CBS_R-FOC_R+TCB_Y);
162 gMC->Gspos("PASP", 1, "PAIR", 0., yo, 0., 0, "ONLY");
164 // --- Divide in X and Z direction (same way as PTCB) ---
165 // gMC->Gsdvn("PCMO", "PCSE", 13, 3);
166 // gMC->Gsdvn("PCST", "PCMO", 8, 1);
167 // gMC->Gsdvn("PCCE", "PCST", 8, 3);
169 // --- Position various PHOS units in ALICE setup ---
170 // --- PHOS itself first ---
172 pphi = TMath::ATan(FOC_X/(2.*FOC_R));
173 xp1 = -r * TMath::Sin(pphi * 3.);
174 yp1 = -r * TMath::Cos(pphi * 3.);
175 xp2 = -r * TMath::Sin(pphi);
176 yp2 = -r * TMath::Cos(pphi);
178 AliMatrix(idrotm[0], 90.,-3*pphi, 90., 90-3*pphi, 0., 0.);
179 AliMatrix(idrotm[1], 90., -pphi, 90., 90-pphi, 0., 0.);
180 AliMatrix(idrotm[2], 90., pphi, 90., 90+pphi, 0., 0.);
181 AliMatrix(idrotm[3], 90., 3*pphi, 90., 90+3*pphi, 0., 0.);
182 gMC->Gspos("PHOS", 1, "ALIC", xp1, yp1, 0., idrotm[0], "ONLY");
183 gMC->Gspos("PHOS", 2, "ALIC", xp2, yp2, 0., idrotm[1], "ONLY");
184 gMC->Gspos("PHOS", 3, "ALIC",-xp2, yp2, 0., idrotm[2], "ONLY");
185 gMC->Gspos("PHOS", 4, "ALIC",-xp1, yp1, 0., idrotm[3], "ONLY");
187 // --- Set modules seen without tree for drawings ---
188 gMC->Gsatt("PMOD", "SEEN", -2);
189 gMC->Gsatt("PCMO", "SEEN", -2);
192 //___________________________________________
193 void AliPHOSv0::CreateMaterials()
195 // *** DEFINITION OF AVAILABLE PHOS MATERIALS ***
196 // ORIGIN : NICK VAN EIJNDHOVEN
198 Int_t ISXFLD = gAlice->Field()->Integ();
199 Float_t SXMGMX = gAlice->Field()->Max();
201 // --- The PbWO4 crystals ---
202 Float_t ax[3] = { 207.19,183.85,16. };
203 Float_t zx[3] = { 82.,74.,8. };
204 Float_t wx[3] = { 1.,1.,4. };
206 // --- The polysterene scintillator (CH) ---
207 Float_t ap[2] = { 12.011,1.00794 };
208 Float_t zp[2] = { 6.,1. };
209 Float_t wp[2] = { 1.,1. };
212 Float_t at[2] = { 12.011,1.00794 };
213 Float_t zt[2] = { 6.,1. };
214 Float_t wt[2] = { 1.,2. };
216 // --- Polystyrene foam ---
217 Float_t af[2] = { 12.011,1.00794 };
218 Float_t zf[2] = { 6.,1. };
219 Float_t wf[2] = { 1.,1. };
222 Int_t *idtmed = fIdtmed->GetArray()-699;
224 AliMixture( 0, "PbWO4$", ax, zx, dx, -3, wx);
225 AliMixture( 1, "Polystyrene$", ap, zp, dp, -2, wp);
226 AliMaterial(2, "Al$", 26.98, 13., 2.7, 8.9, 999.);
227 // --- Absorption length^ is ignored ---
228 AliMixture( 3, "Tyvek$", at, zt, dt, -2, wt);
229 AliMixture( 4, "Foam$", af, zf, df, -2, wf);
230 AliMaterial(9, "Air$", 14.61, 7.3, .001205, 30420., 67500);
232 AliMedium(0, "PHOS Xtal $", 0, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
233 AliMedium(2, "Al parts $", 2, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
234 AliMedium(3, "Tyvek wrapper$", 3, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
235 AliMedium(4, "Polyst. foam $", 4, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
236 AliMedium(99, "Air $", 9, 0, ISXFLD, SXMGMX, 10., 1., .1, .1, 10.);
238 // --- Generate explicitly delta rays in aluminium parts ---
239 gMC->Gstpar(idtmed[701], "LOSS", 3.);
240 gMC->Gstpar(idtmed[701], "DRAY", 1.);
243 void AliPHOSv0::StepManager()
246 TClonesArray &lhits = *fHits;
251 if(gMC->CurrentVolID(copy) == fIdSens) {
253 //We are in the sensitive volume
255 gMC->CurrentVolOffID(i+1,copy);
258 gMC->CurrentVolOffID(7,copy);
260 gMC->TrackPosition(p);
261 for(i=0;i<3;++i) hits[i]=p[i];
263 new(lhits[fNhits++]) AliPHOShit(fIshunt,gAlice->CurrentTrack(),vol,hits);