52 msg(MSG::DEBUG) <<
"Building TRT Service Material" <<
endmsg;
61 if(!railversion.empty()) {
82 double outROfIDet = (*atls)[0]->getDouble(
"IDETOR")*Gaudi::Units::cm;
83 double endZOfIDet = (*atls)[0]->getDouble(
"IDETZMX")*Gaudi::Units::cm;
86 double rminInt = (*cage)[0]->getDouble(
"RINGRMIN")*Gaudi::Units::mm;
90 if(commonParameters->
size()==0)
93 double yWidthUSP1 = (*commonParameters)[0]->getDouble(
"YWIDTHUSP1");
94 double yRailSup = (*commonParameters)[0]->getDouble(
"YRAILSUP");
95 double yRailSupPart3 = (*commonParameters)[0]->getDouble(
"YRAILSUPPART3");
96 double gapOfRSF = (*commonParameters)[0]->getDouble(
"GAPOFRSF");
97 double yWidthTRSB = (*commonParameters)[0]->getDouble(
"YWIDTHTRSB");
99 double coordY = yWidthUSP1/2. - yRailSup + (yRailSupPart3 - gapOfRSF/2.);
101 double phiTop = asin((yWidthTRSB + coordY) / (rminInt));
102 double phiBot = asin((yWidthTRSB/2. - coordY) / (rminInt));
104 GeoIntrusivePtr<const GeoShape> railGap1{
new GeoTubs( rminInt, outROfIDet, endZOfIDet, -phiBot, phiBot + phiTop)};
105 GeoIntrusivePtr<const GeoShape> railGap2{
new GeoTubs( rminInt, outROfIDet, endZOfIDet,
M_PI - phiTop, phiBot + phiTop)};
108 for (
unsigned int ii =0; ii < trtGenServices->
size(); ii++) {
111 const GeoShape * serviceTubeTmp = tubeHelper.
buildShape();
113 std::string logName = tubeHelper.
name();
114 if (logName.empty()) {
115 std::ostringstream o; o << ii;
116 logName =
"ServMat"+o.str();
118 logName =
"Trt" + logName;
120 const GeoShape* serviceTube = serviceTubeTmp;
125 serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*railGap2).subtract(*railGap1);
132 const GeoLogVol* servLog =
new GeoLogVol(logName,serviceTube,material);
133 GeoVPhysVol* servPhys =
new GeoPhysVol(servLog);
135 if (tubeHelper.
name() ==
"FwdServ")
137 GeoTransform *xform1 =
new GeoTransform(GeoTrf::Translate3D(0, 0, tubeHelper.
volData().
zMid() ));
138 GeoTransform *xform2 =
new GeoTransform(GeoTrf::Translate3D(0, 0, -tubeHelper.
volData().
zMid() ));
139 mother->add(xform1); mother->add(servPhys); mother->add(xform2); mother->add(servPhys);
166 double outROfIDet = (*atls)[0]->getDouble(
"IDETOR")*Gaudi::Units::cm;
167 double endZOfIDet = (*atls)[0]->getDouble(
"IDETZMX")*Gaudi::Units::cm;
168 double minRofGap = 1050.0;
169 double phiWid=70./outROfIDet;
double safetyGap=1.;
170 GeoIntrusivePtr<const GeoShape> railGap1{
new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap ,
172 GeoIntrusivePtr<const GeoShape> railGap2{
new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap ,
173 -phiWid/2.+
M_PI,phiWid)};
178 double rminInt = (*cage)[0]->getDouble(
"RINGRMIN")*Gaudi::Units::mm;
179 double ringThick = (*cage)[0]->getDouble(
"RINGTHICK")*Gaudi::Units::mm;
180 double ringGap = (*cage)[0]->getDouble(
"RINGGAP")*Gaudi::Units::mm;
181 double ribWid = (*cage)[0]->getDouble(
"RIBWIDTH")*Gaudi::Units::mm;
182 double phiWidSQ=ribWid/(rminInt+ringThick+ringGap/2.);
190 for (
unsigned int ii =0; ii < trtGenServices->
size(); ii++) {
193 const GeoShape * serviceTubeTmp = tubeHelper.
buildShape();
195 std::string logName = tubeHelper.
name();
196 if (logName.empty()) {
197 std::ostringstream o; o << ii;
198 logName =
"ServMat"+o.str();
200 logName =
"Trt" + logName;
204 const GeoShape* serviceTube = serviceTubeTmp;
207 if (tubeHelper.
name() ==
"FwdServ") {
209 -phiWidSQ/2., phiWidSQ);
211 -phiWidSQ/2.+
M_PI, phiWidSQ);
212 serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*ribSup1).subtract(*ribSup2);
215 serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*railGap2).subtract(*railGap1);
222 const GeoLogVol* servLog =
new GeoLogVol(logName,serviceTube,material);
223 GeoVPhysVol* servPhys =
new GeoPhysVol(servLog);