64 new TGeoManager(
"Garfield_geometry",
"ExGarfield VMC example geometry");
69 TGeoElement* elH =
new TGeoElement(
"Hydrogen",
"H", z = 1., a = 1.01);
70 TGeoElement* elC =
new TGeoElement(
"Carbon",
"C", z = 6., a = 12.01);
71 TGeoElement* elN =
new TGeoElement(
"Nitrogen",
"N", z = 7., a = 14.01);
72 TGeoElement* elO =
new TGeoElement(
"Oxygen",
"O", z = 8., a = 16.00);
73 TGeoElement* elAr =
new TGeoElement(
"Argon",
"Ar", z = 18., a = 39.94);
84 new TGeoMaterial(
"Al", a = 26.98, z = 13., density = 2.699);
88 new TGeoMaterial(
"Tungsten", a = 183.85, z = 74., density = 19.30);
92 new TGeoMaterial(
"Lead", a = 207.22, z = 82., density = 11.35);
95 TGeoMixture* matAir =
new TGeoMixture(
"AirA", 4, density = 1.205e-03);
96 matAir->AddElement(elC, 0.0001);
97 matAir->AddElement(elN, 0.7553);
98 matAir->AddElement(elO, 0.2318);
99 matAir->AddElement(elAr, 0.0128);
102 TGeoMixture* matArCO2 =
new TGeoMixture(
"ArCO2", 3, density = 1.822e-03);
103 matArCO2->AddElement(elAr, 0.7000);
104 matArCO2->AddElement(elC, 0.0819);
105 matArCO2->AddElement(elO, 0.2181);
108 TGeoMixture* matKapton =
new TGeoMixture(
"Kapton", 4, density = 1.413);
109 matKapton->AddElement(elO, 0.2092);
110 matKapton->AddElement(elC, 0.6911);
111 matKapton->AddElement(elN, 0.0733);
112 matKapton->AddElement(elH, 0.0264);
127 for (Int_t i = 8; i < 20; ++i) param[i] = 0.;
130 TGeoMedium* medAl =
new TGeoMedium(
"Al", ++mediumId, matAl, param);
131 TGeoMedium* medW =
new TGeoMedium(
"W", ++mediumId, matW, param);
132 TGeoMedium* medPb =
new TGeoMedium(
"Pb", ++mediumId, matPb, param);
133 TGeoMedium* medAir =
new TGeoMedium(
"AirA", ++mediumId, matAir, param);
134 TGeoMedium* medArCO2 =
new TGeoMedium(
"ArCO2", ++mediumId, matArCO2, param);
136 TGeoMedium* defaultMedium = medAir;
137 TGeoMedium* absorberMedium = medPb;
138 TGeoMedium* gasMedium = medArCO2;
139 TGeoMedium* cathodeMedium = medAl;
140 TGeoMedium* wireMedium = medW;
148 Double_t worldSizeXYZ = 1000 * mm;
149 Double_t absorberThicknessZ = 10. * mm;
150 Double_t absorberThicknessXY = 100. * mm;
151 Double_t wireRadius = 0.025 * mm;
152 Double_t tubeRadius = 15 * mm;
153 Double_t tubeHalfLength = 100 * mm;
154 Double_t tubeThickness = 500 * um;
159 TGeoShape* worldS =
new TGeoBBox(
"World",
160 0.5 * worldSizeXYZ, 0.5 * worldSizeXYZ,
163 TGeoVolume* worldLV =
new TGeoVolume(
"World", worldS, defaultMedium);
165 gGeoManager->SetTopVolume(worldLV);
170 TGeoShape* absorberS =
new TGeoBBox(
"Absorber",
171 0.5 * absorberThicknessXY, 0.5 * absorberThicknessXY,
172 0.5 * absorberThicknessZ);
174 TGeoVolume* absorberLV =
175 new TGeoVolume(
"Absorber", absorberS, absorberMedium);
179 Double_t zpos = absorberThicknessZ / 2;
180 worldLV->AddNode(absorberLV, 1,
new TGeoTranslation(xpos, ypos, zpos));
186 new TGeoTube(
"Tube", 0, tubeRadius, tubeHalfLength + tubeThickness);
188 TGeoVolume* tubeLV =
new TGeoVolume(
"Tube", tubeS, cathodeMedium);
190 TGeoRotation* rotY =
new TGeoRotation();
192 ypos = -0.2 * tubeRadius;
193 zpos = absorberThicknessZ + tubeRadius;
194 worldLV->AddNode(tubeLV, 1,
new TGeoCombiTrans(xpos, ypos, zpos, rotY));
199 TGeoShape* gasS =
new TGeoTube(
200 "Gas", wireRadius, tubeRadius - tubeThickness, tubeHalfLength);
202 TGeoVolume* gasLV =
new TGeoVolume(
"Gas", gasS, gasMedium);
206 tubeLV->AddNode(gasLV, 1,
new TGeoTranslation(xpos, ypos, zpos));
211 TGeoShape* wireS =
new TGeoTube(
"Wire", 0, wireRadius, tubeHalfLength);
213 TGeoVolume* wireLV =
new TGeoVolume(
"Wire", wireS, wireMedium);
217 tubeLV->AddNode(wireLV, 1,
new TGeoTranslation(xpos, ypos, zpos));
220 gGeoManager->CloseGeometry();
223 gGeoManager->Export(
"geometry.root");
226 gMC->SetRootGeometry();