16 #include <FairModule.h>
18 #include <TGeoManager.h>
19 #include <TGeoMaterial.h>
20 #include <TGeoMedium.h>
22 #include <TGeoVolume.h>
27 AtPipe::AtPipe(
const char *name,
const char *title) : FairModule(name, title) {}
32 TGeoVolume *top = gGeoManager->GetTopVolume();
35 auto *matCarbon =
new TGeoMaterial(
"C", 12.011, 6.0, 2.265);
36 auto *matVacuum =
new TGeoMaterial(
"Vacuum", 0, 0, 0);
39 auto *Carbon =
new TGeoMedium(
"C", 50, matCarbon);
40 auto *Vacuum =
new TGeoMedium(
"Vacuum", 60, matVacuum);
43 Double_t z[] = {-50, 0};
44 Double_t r[] = {2.5, 2.5};
45 Double_t Thickness = 0.05;
46 auto *shape =
new TGeoPcon(0., 360., nSects);
47 for (Int_t iSect = 0; iSect < nSects; iSect++) {
48 shape->DefineSection(iSect, z[iSect], r[iSect], r[iSect] + Thickness);
52 auto *pipe =
new TGeoVolume(
"AtPipe", shape, Carbon);
55 auto *Vshape =
new TGeoPcon(0., 360., nSects);
56 for (Int_t iSect = 0; iSect < nSects; iSect++) {
57 Vshape->DefineSection(iSect, z[iSect], 0, r[iSect]);
61 auto *Vpipe =
new TGeoVolume(
"AtPipe", Vshape, Vacuum);
65 top->AddNode(pipe, 1);
66 top->AddNode(Vpipe, 1);