60 new TGeoManager(
"TR_geometry",
"TR VMC example geometry");
62 cout <<
"DetectorSimpleALICE setup" << endl;
66 Double_t micrometer = 1.0e-04;
67 Double_t worldSizeZ = 400. * cm;
68 Double_t worldSizeR = 20. * cm;
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;
77 Double_t absorberThickness = 38.3 * mm;
78 Double_t absorberRadius = 100. * mm;
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;
85 Double_t startZ = 100.0 * mm;
93 Double_t fractionmass;
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);
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);
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);
115 TGeoMaterial* matXe =
116 new TGeoMaterial(
"Xenon", a = 131.29, z = 54., density = 5.858e-06);
119 TGeoMixture* matCO2 =
new TGeoMixture(
"CO2", 2, density = 1.977e-06);
120 matCO2->AddElement(elC, 1);
121 matCO2->AddElement(elO, 2);
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);
128 Double_t foilDensity = matMylar->GetDensity();
129 Double_t gasDensity = matAir->GetDensity();
130 Double_t totDensity =
131 foilDensity * foilGasRatio + gasDensity * (1.0 - foilGasRatio);
133 Double_t fractionFoil = foilDensity * foilGasRatio / totDensity;
134 Double_t fractionGas = gasDensity * (1.0 - foilGasRatio) / totDensity;
136 TGeoMixture* matRadiator =
new TGeoMixture(
"radiatorMat", 2, totDensity);
137 matRadiator->AddElement(matMylar, fractionFoil);
138 matRadiator->AddElement(matAir, fractionGas);
153 for (Int_t i = 8; i < 20; ++i) param[i] = 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);
162 TGeoMedium* worldMedium = medAir;
163 TGeoMedium* absorberMedium = medXe15CO2;
164 TGeoMedium* radiatorMedium = medRadiator;
169 TGeoShape* solidWorld =
170 new TGeoBBox(
"World", worldSizeR, worldSizeR, worldSizeZ / 2.);
172 TGeoVolume* logicWorld =
new TGeoVolume(
"World", solidWorld, worldMedium);
174 gGeoManager->SetTopVolume(logicWorld);
178 Double_t radThick = foilNumber * (radThickness + gasGap) - gasGap + detGap;
179 Double_t radZ = startZ + 0.5 * radThick;
181 TGeoShape* solidRadiator =
new TGeoBBox(
182 "Radiator", 1.1 * absorberRadius, 1.1 * absorberRadius, 0.5 * radThick);
184 TGeoVolume* logicRadiator =
185 new TGeoVolume(
"Radiator", solidRadiator, radiatorMedium);
187 logicWorld->AddNode(logicRadiator, 1,
new TGeoTranslation(0, 0, radZ));
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;
206 TGeoShape* solidAbsorber =
new TGeoBBox(
207 "Absorber", absorberRadius, absorberRadius, absorberThickness / 2.);
209 TGeoVolume* logicAbsorber =
210 new TGeoVolume(
"Absorber", solidAbsorber, absorberMedium);
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;
217 electrodeZ + electrodeThick / 2. + absorberThickness / 2. + 0.01 * mm;
220 logicAbsorber, 1,
new TGeoTranslation(0., 0., absorberZ));
226 gGeoManager->CloseGeometry();
229 gMC->SetRootGeometry();
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
243 cout <<
" The ABSORBER is made of " << absorberThickness / mm <<
"mm of "
244 << absorberMedium->GetName();
245 cout <<
", the transverse size (R) is " << absorberRadius / mm <<
" mm. "
247 cout <<
" Z position of the (middle of the) absorber " << absorberZ / mm
250 cout <<
"radZ = " << radZ / mm <<
" mm" << endl;
251 cout <<
"startZ = " << startZ / mm <<
" mm" << endl;
253 cout <<
"fRadThick = " << radThick / mm <<
" mm" << endl;
254 cout <<
"fFoilNumber = " << foilNumber << endl;
255 cout <<
"fRadiatorMat = " << radiatorMedium->GetMaterial()->GetName()
257 cout <<
"WorldMaterial = " << worldMedium->GetMaterial()->GetName() << endl;