22 #include <TGeoVolume.h>
41 TGeoRotation *
rw =
new TGeoRotation();
54 snprintf(buffer, 1024-1,
"%s", fname);
56 return basename(buffer);
70 double xl[3], lambda = 10.0;
78 TVector3 xlv(xl[0], xl[1], xl[2]), BLV;
82 double zl = xl[2], r = sqrt(xl[0]*xl[0] + xl[1]*xl[1]), dzMax = 100*
mLength/2. + lambda;
87 if(fabs(zl) < dzMax && r < rMax) {
90 if (fabs(zl) > 100.*
mLength/2. - lambda) cff = (fabs(dzMax) - fabs(zl))/(2*lambda);
103 for(
unsigned iq=0; iq<3; iq++)
110 double BL[3] = {BLV[0], BLV[1], BLV[2]};
123 #define _EXTRA_BORE_WIDTH_ (100.0)
125 #define _IRON_ ("iron")
126 #define _VACUUM_ ("thin-air")//("vacuum")
129 #include <TGeoManager.h>
130 #include <TGeoCompositeShape.h>
141 char yokeIronName[128], yokeVacuumName[128];
149 double origin[3] = {0.0, 0.0, 0.0};
153 yoke =
new TGeoBBox(yokeIronName,
154 xyHalfSize, xyHalfSize,
159 yoke =
new TGeoTube(yokeIronName,
171 vacuum =
new TGeoTube(yokeVacuumName,
177 vacuum =
new TGeoCone(yokeVacuumName,
183 char cmd[1024], yokeCompName[128];
184 snprintf(cmd, 1024-1,
"%s-%s", yokeIronName, yokeVacuumName);
187 TGeoCompositeShape *comp =
new TGeoCompositeShape(yokeCompName, cmd);
193 mYoke->RegisterYourself();
200 mYoke->RegisterYourself();
206 vacuum =
new TGeoTube(yokeVacuumName,
212 vacuum =
new TGeoCone(yokeVacuumName,
219 TGeoVolume *vvacuum =
new TGeoVolume(yokeVacuumName, vacuum, mediaHub->
GetMedium(
_VACUUM_));
221 vvacuum->RegisterYourself();
223 mYoke->AddNode(vvacuum, 0,
new TGeoTranslation(origin[0], origin[1], origin[2]));