95 auto sname = getRPCVolumeName(
type, iChamber);
96 auto name = sname.c_str();
98 auto rpc =
new TGeoVolumeAssembly(
name);
109 auto gas =
new TGeoVolume(Form(
"Gas %s",
name),
114 auto electrod =
new TGeoVolume(Form(
"Electrod %s",
name),
119 auto insu =
new TGeoVolume(Form(
"Insulator %s",
name),
125 auto copper =
new TGeoVolume(Form(
"Copper %s",
name),
130 auto mylar =
new TGeoVolume(Form(
"Mylar %s",
name),
135 auto styro =
new TGeoVolume(Form(
"Styrofoam %s",
name),
141 auto alu =
new TGeoVolume(Form(
"Aluminium %s",
name),
146 auto nomex =
new TGeoVolume(Form(
"Nomex %s",
name),
157 const char* cutName = Form(
"%sCut%s", (isTopCut) ?
"top" :
"bottom",
name);
160 auto cutPos =
new TGeoTranslation(Form(
"%sPos", cutName), cutHalfLength - halfLength, (isTopCut) ? halfHeight - cutHalfHeight : cutHalfHeight - halfHeight, 0.);
161 cutPos->RegisterYourself();
165 gas->SetShape(
new TGeoCompositeShape(Form(
"%sGasShape",
name), Form(
"%sGasBox-%sGasCut:%sPos",
name,
name, cutName)));
168 electrod->SetShape(
new TGeoCompositeShape(Form(
"%sElecShape",
name), Form(
"%sElecBox-%sElecCut:%sPos",
name,
name, cutName)));
171 insu->SetShape(
new TGeoCompositeShape(Form(
"%sInsuShape",
name), Form(
"%sInsuBox-%sInsuCut:%sPos",
name,
name, cutName)));
174 copper->SetShape(
new TGeoCompositeShape(Form(
"%sCopperShape",
name), Form(
"%sCopperBox-%sCopperCut:%sPos",
name,
name, cutName)));
177 mylar->SetShape(
new TGeoCompositeShape(Form(
"%sMylarShape",
name), Form(
"%sMylarBox-%sMylarCut:%sPos",
name,
name, cutName)));
180 styro->SetShape(
new TGeoCompositeShape(Form(
"%sStyroShape",
name), Form(
"%sStyroBox-%sStyroCut:%sPos",
name,
name, cutName)));
183 alu->SetShape(
new TGeoCompositeShape(Form(
"%sAluShape",
name), Form(
"%sAluBox-%sAluCut:%sPos",
name,
name, cutName)));
186 nomex->SetShape(
new TGeoCompositeShape(Form(
"%sNomexShape",
name), Form(
"%sNomexBox-%sNomexCut:%sPos",
name,
name, cutName)));
191 rpc->AddNode(gas, 1);
192 double z = halfThickness;
196 rpc->AddNode(electrod, 1,
new TGeoTranslation(0., 0.,
z));
197 rpc->AddNode(electrod, 2,
new TGeoTranslation(0., 0., -
z));
202 rpc->AddNode(insu, 1,
new TGeoTranslation(0., 0.,
z));
203 rpc->AddNode(insu, 2,
new TGeoTranslation(0., 0., -
z));
208 rpc->AddNode(copper, 1,
new TGeoTranslation(0., 0.,
z));
209 rpc->AddNode(copper, 2,
new TGeoTranslation(0., 0., -
z));
214 rpc->AddNode(mylar, 1,
new TGeoTranslation(0., 0.,
z));
215 rpc->AddNode(mylar, 2,
new TGeoTranslation(0., 0., -
z));
220 rpc->AddNode(styro, 1,
new TGeoTranslation(0., 0.,
z));
221 rpc->AddNode(styro, 2,
new TGeoTranslation(0., 0., -
z));
226 rpc->AddNode(mylar, 3,
new TGeoTranslation(0., 0.,
z));
227 rpc->AddNode(mylar, 4,
new TGeoTranslation(0., 0., -
z));
232 rpc->AddNode(copper, 3,
new TGeoTranslation(0., 0.,
z));
233 rpc->AddNode(copper, 4,
new TGeoTranslation(0., 0., -
z));
238 rpc->AddNode(alu, 1,
new TGeoTranslation(0., 0.,
z));
239 rpc->AddNode(alu, 2,
new TGeoTranslation(0., 0., -
z));
244 rpc->AddNode(nomex, 1,
new TGeoTranslation(0., 0.,
z));
245 rpc->AddNode(nomex, 2,
new TGeoTranslation(0., 0., -
z));
250 rpc->AddNode(alu, 3,
new TGeoTranslation(0., 0.,
z));
251 rpc->AddNode(alu, 4,
new TGeoTranslation(0., 0., -
z));
259 double xx, xy, xz, dx, yx, yy, yz, dy, zx, zy, zz, dz;
260 matrix.GetComponents(xx, xy, xz, dx, yx, yy, yz, dy, zx, zy, zz, dz);
261 double vect[3] = {dx, dy, dz};
262 double rotMatrix[9] = {xx, xy, xz, yx, yy, yz, zx, zy, zz};
263 TGeoHMatrix* geoMatrix =
new TGeoHMatrix(
"Transformation");
264 geoMatrix->SetTranslation(vect);
265 geoMatrix->SetRotation(rotMatrix);
288 int iHoriSuppNode = 0, iVertSuppNode = 0;
291 for (
int iside = 0; iside < 2; iside++) {
293 bool isRight = (iside == 0);
294 double xSign = (isRight) ? 1. : -1.;
297 for (
int i = 0;
i < 4;
i++) {
298 chamber->AddNode(vertSupp, iVertSuppNode++,
new TGeoTranslation(xSign *
kVerticalSupportXPos[
i] * scale, 0., 0.));
305 double zSign = (iRPC % 2 == 0) ? 1. : -1.;
314 TGeoVolume* rpc =
nullptr;
336 for (
int i = 0;
i < 3;
i++) {