16 #include <TGeoCompositeShape.h>
17 #include <TGeoManager.h>
18 #include <TGeoMatrix.h>
20 #include <TGeoVolume.h>
65 Double_t parPipeLeft[9] = {0., 360., 2, -200., 7.9, 8., -32., 7.9, 8.};
68 Double_t parPipeCentral[12] = {0., 360., 3, -32., 0., 8., -2., 0., .9, 20., 0., .9};
70 Double_t parPipeRight[18] = {
71 0., 360., 5, 20., .8873, .9, 22., 2.073, 2.1, 120., 2.05, 2.1, 300.1, 2.85, 2.9, 1050., 5.4, 5.5};
73 Double_t parPipeVacuumLeft[9] = {0., 360., 2, -200., 0., 7.9, -32., 0., 7.9};
75 Double_t parPipeVacuumCentral[12] = {0., 360., 3, -32., 0., 7.9, -2., 0., .873, 20., 0., .873};
77 Double_t parPipeVacuumRight[18] = {
78 0., 360., 5, 20., 0., .873, 22., 0., 2.073, 120., 0., 2.05, 300.1, 0., 2.85, 1050., 0., 5.4};
80 Double_t parPipeTargetDown[27] = {
81 0., 360., 8, -215., 17.4, 17.5, -183., 17.4, 17.5, -173., 4.5, 4.6, -96., 4.5,
82 4.6, -95., 2.4, 2.5, -55., 2.4, 2.5, -54., 2.056, 2.1, -15., 1.067, 1.1,
85 Double_t parPipeTargetCentral[9] = {
97 Double_t parPipeTargetUp[27] = {0., 360., 8, 15., 1.067, 1.1, 54., 2.056, 2.1, 55., 2.4, 2.5, 95., 2.4,
98 2.5, 96., 4.5, 4.6, 145., 4.5, 4.6, 155., 14.4, 14.5, 215., 14.4, 14.5};
100 Double_t parPipeVacuumTargetDown[27] = {0., 360., 8, -215., 0., 17.4, -183., 0., 17.4,
101 -173., 0., 4.5, -96., 0., 4.5, -95., 0., 2.4,
102 -55., 0., 2.4, -54., 0., 2.056, -15., 0., 1.067};
104 Double_t parPipeVacuumTargetCentral[9] = {
116 Double_t parPipeVacuumTargetUp[27] = {0., 360., 8, 15., 0., 1.067, 54., 0., 2.056, 55., 0., 2.4, 95., 0.,
117 2.4, 96., 0., 4.5, 145., 0., 4.5, 155., 0., 14.4, 215., 0., 14.4};
119 TGeoPcon* pipeLeft =
new TGeoPcon(parPipeLeft);
120 TGeoPcon* pipeCentral =
new TGeoPcon(parPipeCentral);
121 pipeCentral->SetName(
"PIPE_CN");
122 TGeoPcon* pipeRight =
new TGeoPcon(parPipeRight);
123 TGeoPcon* pipeTargetDown =
new TGeoPcon(parPipeTargetDown);
124 TGeoPcon* pipeTargetCentral =
new TGeoPcon(parPipeTargetCentral);
125 pipeTargetCentral->SetName(
"TRG_CN");
126 TGeoPcon* pipeTargetUp =
new TGeoPcon(parPipeTargetUp);
128 TGeoPcon* pipeVacuumLeft =
new TGeoPcon(parPipeVacuumLeft);
129 TGeoPcon* pipeVacuumCentral =
new TGeoPcon(parPipeVacuumCentral);
130 pipeVacuumCentral->SetName(
"PIPEV_CN");
131 TGeoPcon* pipeVacuumRight =
new TGeoPcon(parPipeVacuumRight);
132 TGeoPcon* pipeVacuumTargetDown =
new TGeoPcon(parPipeVacuumTargetDown);
133 TGeoPcon* pipeVacuumTargetCentral =
new TGeoPcon(parPipeVacuumTargetCentral);
134 pipeVacuumTargetCentral->SetName(
"TRGV_CN");
135 TGeoPcon* pipeVacuumTargetUp =
new TGeoPcon(parPipeVacuumTargetUp);
137 TGeoRotation* r1 =
new TGeoRotation(
"r1");
139 r1->RegisterYourself();
141 TGeoCompositeShape* pipeCross =
new TGeoCompositeShape(
"pipeCross",
"(PIPE_CN+TRG_CN:r1) - (PIPEV_CN+TRGV_CN:r1)");
142 TGeoCompositeShape* pipeVacuumCross =
new TGeoCompositeShape(
"pipeVacuumCross",
"PIPEV_CN+TRGV_CN:r1");
144 TGeoVolume* volPipeLeft =
new TGeoVolume(
"PipeLeft", pipeLeft, gGeoManager->GetMedium(
"steel"));
145 TGeoVolume* volPipeCross =
new TGeoVolume(
"PipeCross", pipeCross, gGeoManager->GetMedium(
"Al+Be"));
146 TGeoVolume* volPipeRight =
new TGeoVolume(
"PipeRight", pipeRight, gGeoManager->GetMedium(
"steel"));
147 TGeoVolume* volPipeTargetUp =
new TGeoVolume(
"PipeTargetUp", pipeTargetUp, gGeoManager->GetMedium(
"steel"));
148 TGeoVolume* volPipeTargetDown =
new TGeoVolume(
"PipeTargetDown", pipeTargetDown, gGeoManager->GetMedium(
"steel"));
150 TGeoVolume* volPipeVacuumLeft =
new TGeoVolume(
"PipeVacuumLeft", pipeVacuumLeft, gGeoManager->GetMedium(
"vacuum"));
151 TGeoVolume* volPipeVacuumCross =
152 new TGeoVolume(
"PipeVacuumCross", pipeVacuumCross, gGeoManager->GetMedium(
"vacuum"));
153 TGeoVolume* volPipeVacuumRight =
154 new TGeoVolume(
"PipeVacuumRight", pipeVacuumRight, gGeoManager->GetMedium(
"vacuum"));
155 TGeoVolume* volPipeVacuumTargetUp =
156 new TGeoVolume(
"PipeVacuumTargetUp", pipeVacuumTargetUp, gGeoManager->GetMedium(
"vacuum"));
157 TGeoVolume* volPipeVacuumTargetDown =
158 new TGeoVolume(
"PipeVacuumTargetDown", pipeVacuumTargetDown, gGeoManager->GetMedium(
"vacuum"));
163 TGeoVolume* beamPipe =
new TGeoVolumeAssembly(
"BeamPipe");
164 beamPipe->AddNode(volPipeLeft, 0);
165 beamPipe->AddNode(volPipeRight, 0);
166 beamPipe->AddNode(volPipeVacuumLeft, 0);
167 beamPipe->AddNode(volPipeVacuumRight, 0);
168 beamPipe->AddNode(volPipeTargetUp, 0,
new TGeoRotation(rot));
169 beamPipe->AddNode(volPipeTargetDown, 0,
new TGeoRotation(rot));
170 beamPipe->AddNode(volPipeVacuumTargetUp, 0,
new TGeoRotation(rot));
171 beamPipe->AddNode(volPipeVacuumTargetDown, 0,
new TGeoRotation(rot));
172 beamPipe->AddNode(volPipeCross, 0);
173 beamPipe->AddNode(volPipeVacuumCross, 0);
175 TGeoVolume* cave = gGeoManager->GetTopVolume();
176 cave->AddNode(beamPipe, 1);
FairGeoMedia * getMedia()
virtual void ConstructGeometry()
FairGeoInterface * getGeoInterface()
static FairGeoLoader * Instance()
ClassImp(FairEventBuilder)
virtual FairModule * CloneModule() const
FairGeoBuilder * getGeoBuilder()
virtual Int_t createMedium(FairGeoMedium *)=0