55 {
56
57
58
59
60 new TGeoManager("TR_geometry", "TR VMC example geometry");
61
62 cout << "DetectorSimpleALICE setup" << endl;
63
64 Double_t cm = 1.0;
65 Double_t mm = 0.1;
66 Double_t micrometer = 1.0e-04;
67 Double_t worldSizeZ = 400. * cm;
68 Double_t worldSizeR = 20. * cm;
69
70
71
72 Double_t radThickness = 0.020 * mm;
73 Double_t gasGap = 0.250 * mm;
74 Double_t foilGasRatio = radThickness / (radThickness + gasGap);
75 Int_t foilNumber = 220;
76
77 Double_t absorberThickness = 38.3 * mm;
78 Double_t absorberRadius = 100. * mm;
79
80 Double_t windowThick = 51.0 * micrometer;
81 Double_t electrodeThick = 10.0 * micrometer;
82 Double_t gapThick = 10.0 * cm;
83 Double_t detGap = 0.01 * mm;
84
85 Double_t startZ = 100.0 * mm;
86
87
88
89 TString name;
90 Double_t a;
91 Double_t z;
92 Double_t density;
93 Double_t fractionmass;
94
95
96 TGeoElement* elH = new TGeoElement("Hydrogen", "H", z = 1, a = 1.01);
97 TGeoElement* elC = new TGeoElement("Carbon", "C", z = 6., a = 12.01);
98 TGeoElement* elN = new TGeoElement("Nitrogen", "N", z = 7., a = 14.01);
99 TGeoElement* elO = new TGeoElement("Oxygen", "O", z = 8., a = 16.00);
100 TGeoElement* elAr = new TGeoElement("Argon", "Ar", z = 18., a = 39.94);
101
102
103 TGeoMixture* matAir = new TGeoMixture("Air", 3, density = 1.2928e-03);
104 matAir->AddElement(elN, fractionmass = 0.7557);
105 matAir->AddElement(elO, fractionmass = 0.2315);
106 matAir->AddElement(elAr, fractionmass = 0.0128);
107
108
109 TGeoMixture* matMylar = new TGeoMixture("Mylar", 3, density = 1.39);
110 matMylar->AddElement(elO, 2);
111 matMylar->AddElement(elC, 5);
112 matMylar->AddElement(elH, 4);
113
114
115 TGeoMaterial* matXe =
116 new TGeoMaterial("Xenon", a = 131.29, z = 54., density = 5.858e-06);
117
118
119 TGeoMixture* matCO2 = new TGeoMixture("CO2", 2, density = 1.977e-06);
120 matCO2->AddElement(elC, 1);
121 matCO2->AddElement(elO, 2);
122
123
124 TGeoMixture* matXe15CO2 = new TGeoMixture("Xe15CO2", 2, density = 4.9e-03);
125 matXe15CO2->AddElement(matXe, fractionmass = 0.979);
126 matXe15CO2->AddElement(matCO2, fractionmass = 0.021);
127
128 Double_t foilDensity = matMylar->GetDensity();
129 Double_t gasDensity = matAir->GetDensity();
130 Double_t totDensity =
131 foilDensity * foilGasRatio + gasDensity * (1.0 - foilGasRatio);
132
133 Double_t fractionFoil = foilDensity * foilGasRatio / totDensity;
134 Double_t fractionGas = gasDensity * (1.0 - foilGasRatio) / totDensity;
135
136 TGeoMixture* matRadiator = new TGeoMixture("radiatorMat", 2, totDensity);
137 matRadiator->AddElement(matMylar, fractionFoil);
138 matRadiator->AddElement(matAir, fractionGas);
139
140
141
142
143
144 Double_t param[20];
145 param[0] = 0;
146 param[1] = 2;
147 param[2] = 10.;
148 param[3] = -20.;
149 param[4] = -0.01;
150 param[5] = -.3;
151 param[6] = .001;
152 param[7] = -.8;
153 for (Int_t i = 8; i < 20; ++i) param[i] = 0.;
154
155 Int_t mediumId = 0;
156 TGeoMedium* medAir = new TGeoMedium("Air", ++mediumId, matAir, param);
157 TGeoMedium* medXe15CO2 =
158 new TGeoMedium("Xe15CO2", ++mediumId, matXe15CO2, param);
159 TGeoMedium* medRadiator =
160 new TGeoMedium("Radiator", ++mediumId, matRadiator, param);
161
162 TGeoMedium* worldMedium = medAir;
163 TGeoMedium* absorberMedium = medXe15CO2;
164 TGeoMedium* radiatorMedium = medRadiator;
165
166
167
168
169 TGeoShape* solidWorld =
170 new TGeoBBox("World", worldSizeR, worldSizeR, worldSizeZ / 2.);
171
172 TGeoVolume* logicWorld = new TGeoVolume("World", solidWorld, worldMedium);
173
174 gGeoManager->SetTopVolume(logicWorld);
175
176
177
178 Double_t radThick = foilNumber * (radThickness + gasGap) - gasGap + detGap;
179 Double_t radZ = startZ + 0.5 * radThick;
180
181 TGeoShape* solidRadiator = new TGeoBBox(
182 "Radiator", 1.1 * absorberRadius, 1.1 * absorberRadius, 0.5 * radThick);
183
184 TGeoVolume* logicRadiator =
185 new TGeoVolume("Radiator", solidRadiator, radiatorMedium);
186
187 logicWorld->AddNode(logicRadiator, 1, new TGeoTranslation(0, 0, radZ));
188
189
190
191
192 cout << "Radiator volume: " << logicRadiator->GetName() << endl;
193 cout << "Foil material: " << matMylar->GetName() << endl;
194 cout << "Gas material: " << matAir->GetName() << endl;
195 cout << "Foil thickness: " << radThickness << endl;
196 cout << "Gas thickness: " << gasGap << endl;
197 cout << "Foild number: " << foilNumber << endl;
198
199
200
201
202
203
204
205
206 TGeoShape* solidAbsorber = new TGeoBBox(
207 "Absorber", absorberRadius, absorberRadius, absorberThickness / 2.);
208
209 TGeoVolume* logicAbsorber =
210 new TGeoVolume("Absorber", solidAbsorber, absorberMedium);
211
212 Double_t windowZ = startZ + radThick + windowThick / 2. + 15.0 * mm;
213 Double_t gapZ = windowZ + windowThick / 2. + gapThick / 2. + 0.01 * mm;
214 Double_t electrodeZ =
215 gapZ + gapThick / 2. + electrodeThick / 2. + 0.01 * mm;
216 Double_t absorberZ =
217 electrodeZ + electrodeThick / 2. + absorberThickness / 2. + 0.01 * mm;
218
219 logicWorld->AddNode(
220 logicAbsorber, 1, new TGeoTranslation(0., 0., absorberZ));
221
222
223
224
225
226 gGeoManager->CloseGeometry();
227
228
229 gMC->SetRootGeometry();
230
231
232
233
234
235
236
237
238
239 cout << "\n The WORLD is made of " << worldSizeZ / mm << "mm of "
240 << worldMedium->GetName();
241 cout << ", the transverse size (R) of the world is " << worldSizeR / mm
242 << " mm. " << endl;
243 cout << " The ABSORBER is made of " << absorberThickness / mm << "mm of "
244 << absorberMedium->GetName();
245 cout << ", the transverse size (R) is " << absorberRadius / mm << " mm. "
246 << endl;
247 cout << " Z position of the (middle of the) absorber " << absorberZ / mm
248 << " mm." << endl;
249
250 cout << "radZ = " << radZ / mm << " mm" << endl;
251 cout << "startZ = " << startZ / mm << " mm" << endl;
252
253 cout << "fRadThick = " << radThick / mm << " mm" << endl;
254 cout << "fFoilNumber = " << foilNumber << endl;
255 cout << "fRadiatorMat = " << radiatorMedium->GetMaterial()->GetName()
256 << endl;
257 cout << "WorldMaterial = " << worldMedium->GetMaterial()->GetName() << endl;
258 cout << endl;
259 }