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 /////////////////////////////////////////////////////////
21 // Manager and hits classes for set:PHOS version 0 //
22 /////////////////////////////////////////////////////////
24 // --- ROOT system ---
32 // --- galice header files ---
33 #include "AliPHOSv0.h"
39 //______________________________________________________________________________
42 AliPHOSv0::AliPHOSv0()
47 //______________________________________________________________________________
49 AliPHOSv0::AliPHOSv0(const char *name, const char *title)
50 : AliPHOS(name, title)
55 //___________________________________________
56 void AliPHOSv0::Init()
58 fIdSens=gMC->VolId("PXTL");
61 //___________________________________________
62 void AliPHOSv0::CreateGeometry()
64 // *** DEFINITION OF THE -0.25<y<0.25 TILTED GEOMETRY OF THE PHOS ***
65 // ORIGIN : NICK VAN EIJNDHOVEN
68 Float_t r, dptcb[3], dpair[3], dphos[3], dpucp[3], dpasp[3];
72 Float_t xp1, yp1, xp2, yp2;
74 Int_t *idtmed = fIdtmed->GetArray()-699;
76 // --- Dimensions of PbWO4 crystal ---
77 const Float_t XTL_X=2.2;
78 const Float_t XTL_Y=18.;
79 const Float_t XTL_Z=2.2;
80 // --- Tyvek wrapper thickness
81 const Float_t PAP_THICK=0.01;
82 // --- Polystyrene Foam Outer Cover dimensions ---
83 const Float_t FOC_X=214.6;
84 const Float_t FOC_Y=80.;
85 const Float_t FOC_Z=260.;
86 // --- Inner AIR volume dimensions ---
87 const Float_t AIR_X=206.;
88 const Float_t AIR_Y=66.;
89 const Float_t AIR_Z=244.;
90 // --- Tyvek Crystal Block dimensions ---
91 const Float_t TCB_X=198.;
92 const Float_t TCB_Y=25.;
93 const Float_t TCB_Z=234.;
94 // --- Upper Cooling Plate thickness ---
95 const Float_t UCP_Y=0.06;
96 // --- Al Support Plate thickness ---
97 const Float_t ASP_Y=10.;
98 //--- Distance from IP to Foam Outer Cover top plate (needs to be 447.) ---
99 const Float_t FOC_R=467.;
100 //--- Distance from IP to Crystal Block top Surface (needs to be 460.) ---
101 const Float_t CBS_R=480.;
103 // --- Dimensions of volumes ---
106 // --- Define PHOS box volume, fill with Polystyrene foam ---
110 gMC->Gsvolu("PHOS", "BOX ", idtmed[703], dphos, 3);
112 // --- Define air-filled box, place inside PHOS ---
116 gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3);
117 gMC->Gspos("PAIR", 1, "PHOS", 0., 0., 0., 0, "ONLY");
119 // --- Define Upper Cooling Panel ---
120 // --- place it right behind upper foam plate ---
124 gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp, 3);
125 yo = (AIR_Y-UCP_Y)/2.;
126 gMC->Gspos("PUCP", 1, "PAIR", 0., yo, 0., 0, "ONLY");
128 // --- Define Crystal Block, fill with Tyvek, position inside PAIR ---
132 gMC->Gsvolu("PTCB", "BOX ", idtmed[702], dptcb, 3);
133 // --- Divide PTCB in X and Z directions --
134 gMC->Gsdvn("PSEC", "PTCB", 11, 1);
135 gMC->Gsdvn("PMOD", "PSEC", 13, 3);
136 gMC->Gsdvn("PSTR", "PMOD", 8, 1);
137 gMC->Gsdvn("PCEL", "PSTR", 8, 3);
138 yo = (FOC_Y-TCB_Y)/2. -(CBS_R-FOC_R);
139 gMC->Gspos("PTCB", 1, "PAIR", 0., yo, 0., 0, "ONLY");
141 // --- Define PbWO4 crystal volume, place inside PCEL ---
145 gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3);
146 yo = (TCB_Y-XTL_Y)/2. - PAP_THICK;
147 gMC->Gspos("PXTL", 1, "PCEL", 0., yo, 0., 0, "ONLY");
149 // --- Define Al Support Plate, position it inside PAIR ---
150 // --- right beneath PTCB ---
154 gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3);
155 yo = (FOC_Y-ASP_Y)/2. - (CBS_R-FOC_R+TCB_Y);
156 gMC->Gspos("PASP", 1, "PAIR", 0., yo, 0., 0, "ONLY");
158 // --- Divide in X and Z direction (same way as PTCB) ---
159 gMC->Gsdvn("PCMO", "PCSE", 13, 3);
160 gMC->Gsdvn("PCST", "PCMO", 8, 1);
161 gMC->Gsdvn("PCCE", "PCST", 8, 3);
163 // --- Position various PHOS units in ALICE setup ---
164 // --- PHOS itself first ---
166 pphi = TMath::ATan(FOC_X/(2.*FOC_R));
167 xp1 = -r * TMath::Sin(pphi * 3.);
168 yp1 = -r * TMath::Cos(pphi * 3.);
169 xp2 = -r * TMath::Sin(pphi);
170 yp2 = -r * TMath::Cos(pphi);
172 AliMatrix(idrotm[0], 90.,-3*pphi, 90., 90-3*pphi, 0., 0.);
173 AliMatrix(idrotm[1], 90., -pphi, 90., 90-pphi, 0., 0.);
174 AliMatrix(idrotm[2], 90., pphi, 90., 90+pphi, 0., 0.);
175 AliMatrix(idrotm[3], 90., 3*pphi, 90., 90+3*pphi, 0., 0.);
176 gMC->Gspos("PHOS", 1, "ALIC", xp1, yp1, 0., idrotm[0], "ONLY");
177 gMC->Gspos("PHOS", 2, "ALIC", xp2, yp2, 0., idrotm[1], "ONLY");
178 gMC->Gspos("PHOS", 3, "ALIC",-xp2, yp2, 0., idrotm[2], "ONLY");
179 gMC->Gspos("PHOS", 4, "ALIC",-xp1, yp1, 0., idrotm[3], "ONLY");
181 // --- Set modules seen without tree for drawings ---
182 gMC->Gsatt("PMOD", "SEEN", -2);
183 gMC->Gsatt("PCMO", "SEEN", -2);
186 //___________________________________________
187 void AliPHOSv0::CreateMaterials()
189 // *** DEFINITION OF AVAILABLE PHOS MATERIALS ***
190 // ORIGIN : NICK VAN EIJNDHOVEN
192 Int_t ISXFLD = gAlice->Field()->Integ();
193 Float_t SXMGMX = gAlice->Field()->Max();
195 // --- The PbWO4 crystals ---
196 Float_t ax[3] = { 207.19,183.85,16. };
197 Float_t zx[3] = { 82.,74.,8. };
198 Float_t wx[3] = { 1.,1.,4. };
200 // --- The polysterene scintillator (CH) ---
201 Float_t ap[2] = { 12.011,1.00794 };
202 Float_t zp[2] = { 6.,1. };
203 Float_t wp[2] = { 1.,1. };
206 Float_t at[2] = { 12.011,1.00794 };
207 Float_t zt[2] = { 6.,1. };
208 Float_t wt[2] = { 1.,2. };
210 // --- Polystyrene foam ---
211 Float_t af[2] = { 12.011,1.00794 };
212 Float_t zf[2] = { 6.,1. };
213 Float_t wf[2] = { 1.,1. };
216 Int_t *idtmed = fIdtmed->GetArray()-699;
218 AliMixture( 0, "PbWO4$", ax, zx, dx, -3, wx);
219 AliMixture( 1, "Polystyrene$", ap, zp, dp, -2, wp);
220 AliMaterial(2, "Al$", 26.98, 13., 2.7, 8.9, 999.);
221 // --- Absorption length^ is ignored ---
222 AliMixture( 3, "Tyvek$", at, zt, dt, -2, wt);
223 AliMixture( 4, "Foam$", af, zf, df, -2, wf);
224 AliMaterial(9, "Air$", 14.61, 7.3, .001205, 30420., 67500);
226 AliMedium(0, "PHOS Xtal $", 0, 1, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
227 AliMedium(2, "Al parts $", 2, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
228 AliMedium(3, "Tyvek wrapper$", 3, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .001);
229 AliMedium(4, "Polyst. foam $", 4, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
230 AliMedium(99, "Air $", 9, 0, ISXFLD, SXMGMX, 10., 1., .1, .1, 10.);
232 // --- Generate explicitly delta rays in aluminium parts ---
233 gMC->Gstpar(idtmed[701], "LOSS", 3.);
234 gMC->Gstpar(idtmed[701], "DRAY", 1.);
237 void AliPHOSv0::StepManager()
240 TClonesArray &lhits = *fHits;
245 if(gMC->CurrentVolID(copy) == fIdSens) {
247 //We are in the sensitive volume
249 gMC->CurrentVolOffID(i+1,copy);
252 gMC->CurrentVolOffID(7,copy);
254 gMC->TrackPosition(p);
255 for(i=0;i<3;++i) hits[i]=p[i];
257 new(lhits[fNhits++]) AliPHOShit(fIshunt,gAlice->CurrentTrack(),vol,hits);