5 #include <TGeoCompositeShape.h>
13 #define _BERYLLIUM_PIPE_INNER_DIAMETER_ ( 6.20 * etm::cm)
15 #define _BERYLLIUM_PIPE_OUTER_DIAMETER_ ( 6.35 * etm::cm)
18 #define _ESIDE_ALUMINUM_PIPE_HEIGHT_ ( 6.80 * etm::cm)
20 #define _ESIDE_ALUMINUM_PIPE_USLOPE_ ( 0.0073)
24 #define _HSIDE_ALUMINUM_PIPE_DIAMETER_ ( 6.45 * etm::cm)
27 #define _ESIDE_BERYLLIUM_PIPE_LENGTH_ (80.00 * etm::cm)
28 #define _HSIDE_BERYLLIUM_PIPE_LENGTH_ (67.00 * etm::cm)
31 #define _HADRON_PIPE_OPENING_DELTA_ ( 0.001)
34 #define _0_127_ ( 0.127 * etm::cm)
37 #define _HADRON_PIPE_OPENING_DEFAULT_ ( 0.051)
72 double qslope = islope;
74 int green = kGreen+2, cyan = kCyan, yellow = kYellow+1;
77 auto model =
GetWorld(); assert(model);
78 auto world = model->GetTopVolume(); assert(
world);
80 auto assy =
new TGeoVolumeAssembly(
"VC.ASSEMBLY");
81 world->AddNode(assy, 0, 0);
108 double zOffset =
eic->GetIpLocation().X() +
111 auto ocpipe =
new TGeoTube(
"BE_PIPE_O",
116 auto vocpipe =
new TGeoVolume(ocpipe->GetName(), ocpipe, model->GetMedium(
"Be"));
118 vocpipe->SetLineColor(yellow);
119 assy->AddNode(vocpipe, 0,
new TGeoTranslation(0.0, 0.0, zOffset));
122 auto icpipe =
new TGeoTube(
"BE_PIPE_I",
126 auto vicpipe =
new TGeoVolume(icpipe->GetName(), icpipe, model->GetMedium(
_ACCELERATOR_VACUUM_));
127 vicpipe->SetLineColor(cyan);
128 vocpipe->AddNode(vicpipe, 0,
new TGeoTranslation(0.0, 0.0, 0.0));
135 double zl = -
eic->GetIrRegionLength()/2,
dz = fabs(zr - zl);
139 double dyd =
dz*tan(
eic->GetCrossingAngle());
144 double z0 = -
eic->GetIrRegionLength()/2, dz10 = fabs(z1 - z0);
146 double zOffset = (z0+
z1)/2, xy[8][2] = {
160 auto oearb8 =
new TGeoArb8(
"E_PIPE_O", dz10/2, (
double*)xy);
161 auto voepipe =
new TGeoVolume(oearb8->GetName(), oearb8, model->GetMedium(
"Al"));
162 voepipe->SetLineColor(green);
163 assy->AddNode(voepipe, 0,
new TGeoTranslation( 0.0, 0.0, zOffset));
168 for(
unsigned du=0; du<2; du++) {
170 double inwards = du ?
_0_127_ : 0.300;
172 for(
unsigned ivtx=0; ivtx<4; ivtx++)
173 for(
unsigned ixy=0; ixy<2; ixy++)
174 xy[du*4 + ivtx][ixy] += xy[du*4 + ivtx][ixy] > 0.0 ? -inwards : inwards;
177 auto iearb8 =
new TGeoArb8(
"E_PIPE_I", dz10/2, (
double*)xy);
180 viepipe->SetLineColor(cyan);
181 voepipe->AddNode(viepipe, 0,
new TGeoTranslation( 0.0, 0.0, 0.0));
192 double length =
eic->GetIrRegionLength()/2 -
eic->GetIpLocation().X() -
198 auto ocone =
new TGeoCone(
"H_PIPE_OCONE", length/2,
203 auto rw =
new TGeoRotation();
204 rw->RotateY(qslope*180/
M_PI);
206 auto trq =
new TGeoCombiTrans(
"TRQ", qslope*length/2, 0.0, z2 + 0.1 + length/2,
rw);
207 trq->RegisterYourself();
209 auto vocone =
new TGeoVolume(ocone->GetName(), ocone, model->GetMedium(
"Al"));
210 assy->AddNode(vocone, 0, trq);
211 vocone->SetLineColor(green);
214 auto icone =
new TGeoCone(
"H_PIPE_ICONE", length/2,
216 apex2z3 *tan(islope),
218 (apex2z3 + length)*tan(islope));
220 vocone->AddNode(vicone, 0,
new TGeoTranslation( 0.0, 0.0, 0.0));