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 ///////////////////////////////////////////////////////////////////////////////
24 <img src="picts/AliMAGClass.gif">
27 <font size=+2 color=red>
28 <p>The responsible person for this module is
29 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
35 ///////////////////////////////////////////////////////////////////////////////
37 #include <TVirtualMC.h>
38 #include <TGeoMedium.h>
39 #include <TGeoVolume.h>
40 #include <TGeoMatrix.h>
42 #include <TGeoCompositeShape.h>
43 #include <TGeoManager.h>
51 //_____________________________________________________________________________
55 // Default constructor for L3 magnet
59 //_____________________________________________________________________________
60 AliMAG::AliMAG(const char *name, const char *title)
61 : AliModule(name,title)
64 // Standard constructor for L3 magnet
68 <img src="picts/aliMAG.gif">
77 //_____________________________________________________________________________
78 void AliMAG::CreateGeometry()
81 // Create geometry for L3 magnet
85 <img src="picts/mag.gif">
90 <img src="picts/tree_mag.gif">
96 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
98 TGeoMedium* medAir = gGeoManager->GetMedium("MAG_AIR_C1");
99 TGeoMedium* medAlu = gGeoManager->GetMedium("MAG_ALU_C1");
100 TGeoMedium* medAluI = gGeoManager->GetMedium("MAG_ALU_C0");
101 TGeoMedium* medFe = gGeoManager->GetMedium("MAG_FE_C1");
102 TGeoMedium* medFeI = gGeoManager->GetMedium("MAG_FE_C0");
104 // Offset between LHC and LEP axis
110 TGeoPgon* shMother = new TGeoPgon(22.5, 360., 8, 2);
111 shMother->DefineSection(0, -600., 580., 790.);
112 shMother->DefineSection(1, 600., 580., 790.);
114 TGeoVolume* voMother = new TGeoVolume("L3MO", shMother, medAir);
118 TGeoPgon* shCoils = new TGeoPgon(22.5, 360., 8, 2);
119 shCoils->DefineSection(0, -600., 585., 690.);
120 shCoils->DefineSection(1, 600., 585., 690.);
122 TGeoVolume* voCoils = new TGeoVolume("L3C0", shCoils, medAlu);
123 voMother->AddNode(voCoils, 1, new TGeoTranslation(0., 0., 0.));
125 TGeoPgon* shCoilsI = new TGeoPgon(22.5, 360., 8, 2);
126 shCoilsI->DefineSection(0, -600., 580., 585.);
127 shCoilsI->DefineSection(1, 600., 580., 585.);
129 TGeoVolume* voCoilsI = new TGeoVolume("L3C1", shCoilsI, medAluI);
130 voMother->AddNode(voCoilsI, 1, new TGeoTranslation(0., 0., 0.));
134 TGeoPgon* shYoke = new TGeoPgon(22.5, 360., 8, 2);
135 shYoke->DefineSection(0, -600., 690., 790.);
136 shYoke->DefineSection(1, 600., 690., 790.);
138 TGeoVolume* voYoke = new TGeoVolume("L3YO", shYoke, medFe);
139 voMother->AddNode(voYoke, 1, new TGeoTranslation(0., 0., 0.));
142 // Define the return yoke of L3 ("Doors")
144 // Original outer part
145 TGeoPgon* shDoorO = new TGeoPgon(22.5, 360., 8, 2);
146 shDoorO->DefineSection(0, 600., 240., 790.);
147 shDoorO->DefineSection(1, 700., 240., 790.);
148 shDoorO->SetName("A");
150 // Additional inner part
151 TGeoPgon* shDoorI = new TGeoPgon(22.5, 360., 8, 3);
152 shDoorI->DefineSection(0, 600., 163.5, 270.);
153 shDoorI->DefineSection(1, 670., 163.5, 270.);
154 shDoorI->DefineSection(2, 700., 213.5, 270.);
155 shDoorI->SetName("B");
157 // For transport: low thresholds close to chambers requires special volume
159 TGeoPgon* shDoorIe = new TGeoPgon(22.5, 360., 8, 3);
160 shDoorIe->DefineSection(0, 600., 163.5, 168.5);
161 shDoorIe->DefineSection(1, 670., 163.5, 168.5);
162 shDoorIe->DefineSection(2, 700., 213.5, 218.5);
163 TGeoVolume* voDoorIe = new TGeoVolume("L3DE", shDoorIe, medFeI);
165 // Use composite shape here to account for the excentric door opening.
166 // This avoids the overlap with the beam shield and the muon tracking station 1
168 TGeoTranslation* offset = new TGeoTranslation("t1", 0., -os, 0.);
169 offset->RegisterYourself();
171 TGeoCompositeShape* shDoor = new TGeoCompositeShape("L3Door", "A+B:t1");
173 TGeoVolume* voDoor = new TGeoVolume("L3DO", shDoor, medFe);
174 voDoor->AddNode(voDoorIe, 1, new TGeoTranslation(0., -os, 0.));
176 // The assembly of everything
178 TGeoVolumeAssembly* l3 = new TGeoVolumeAssembly("L3TV");
179 TGeoRotation* rotxz = new TGeoRotation("rotxz", 90., 0., 90., 90., 180., 0.);
180 l3->AddNode(voMother, 1, new TGeoTranslation(0., 0., 0.));
181 l3->AddNode(voDoor, 1, new TGeoTranslation(0., 0., 0.));
182 l3->AddNode(voDoor, 2, new TGeoCombiTrans(0., 0., 0., rotxz));
183 top->AddNode(l3, 1, new TGeoTranslation(0., os, 0.));
186 //_____________________________________________________________________________
187 void AliMAG::CreateMaterials()
190 // Create materials for L3 magnet
193 Int_t isxfld = gAlice->Field()->Integ();
194 Float_t sxmgmx = gAlice->Field()->Max();
195 Float_t epsil, stmin, deemax, tmaxfd, stemax;
198 // --- Define the various materials for GEANT ---
200 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
201 Float_t zAir[4]={6.,7.,8.,18.};
202 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
203 Float_t dAir = 1.20479E-3;
207 AliMaterial(9, "Al0$", 26.98, 13., 2.7, 8.9, 37.2);
208 AliMaterial(29, "Al1$", 26.98, 13., 2.7, 8.9, 37.2);
211 AliMaterial(10, "Fe0$", 55.85, 26., 7.87, 1.76, 17.1);
212 AliMaterial(30, "Fe1$", 55.85, 26., 7.87, 1.76, 17.1);
215 AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir);
216 AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir);
219 // Defines tracking media parameters.
220 // Les valeurs sont commentees pour laisser le defaut
221 // a GEANT (version 3-21, page CONS200), f.m.
222 epsil = .001; // Tracking precision,
223 stemax = -1.; // Maximum displacement for multiple scat
224 tmaxfd = -20.; // Maximum angle due to field deflection
225 deemax = -.3; // Maximum fractional energy loss, DLS
231 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
232 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
236 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
237 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
241 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
242 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
245 //_____________________________________________________________________________
246 void AliMAG::DrawModule() const
249 // Draw a shaded view of the L3 magnet
253 //_____________________________________________________________________________
257 // Initialise L3 magnet after it has been built
260 if(AliLog::GetGlobalDebugLevel()>0) {
261 printf("\n%s: ",ClassName());
262 for(i=0;i<35;i++) printf("*");
263 printf(" MAG_INIT ");
264 for(i=0;i<35;i++) printf("*");
265 printf("\n%s: ",ClassName());
267 // Here the MAG initialisation code (if any!)
268 for(i=0;i<80;i++) printf("*");