335 mHitLast.mELoss = -1;
338 mHitsPerSectorCollection[
i]->clear();
361 mHitsPerSectorCollection[
i]->clear();
372 ConstructTPCGeometry();
375void Detector::CreateMaterials()
385 const auto& gasParam = ParameterGas::Instance();
399 const Double_t pressure = gasParam.Pressure;
400 const Double_t temperature = gasParam.Temperature + 273.15;
403 const Double_t
t1 = 293.15;
404 const Double_t
p1 = 1013.25;
407 Double_t ptCorr = 1.;
408 if (TMath::Abs(temperature - 293.15) > 10. || TMath::Abs(pressure - 1000.) > 200.) {
411 ptCorr = (pressure *
t1) / (
p1 * temperature);
413 LOG(info) <<
"Setting gas density correction to: " << ptCorr;
463 TString names[6] = {
"Ne",
"Ar",
"CO2",
"N",
"CF4",
"CH4"};
468 Float_t comp[6] = {90. / 105., 0., 10. / 105., 5. / 105., 0., 0.};
499 wmol[3] = 2. * 14.0067;
504 for (Int_t
i = 0;
i < 6;
i++) {
505 wtot += *(comp +
i) * wmol[
i];
507 wmat[0] = comp[0] * amat[0] / wtot;
508 wmat[1] = comp[1] * amat[1] / wtot;
509 wmat[2] = (comp[2] * amat[2] + comp[4] * amat[2] + comp[5] * amat[2]) / wtot;
510 wmat[3] = comp[2] * amat[3] * 2. / wtot;
511 wmat[4] = comp[3] * amat[4] * 2. / wtot;
512 wmat[5] = comp[4] * amat[5] * 4. / wtot;
513 wmat[6] = comp[5] * amat[6] * 4. / wtot;
517 Float_t dens[6] = {0.839e-3, 1.661e-3, 1.842e-3, 1.165e-3, 3.466e-3, 0.668e-3};
520 for (Int_t
i = 0;
i < 6;
i++) {
521 density += comp[
i] * dens[
i];
527 for (Int_t
i = 0;
i < 6;
i++) {
536 TString gname1, gname2, gname3;
537 gname1 = gname +
"-1";
538 gname2 = gname +
"-2";
539 gname3 = gname +
"-3";
543 Float_t amat1[6], zmat1[6], wmat1[6];
545 for (Int_t
i = 0;
i < 7;
i++) {
547 zmat1[cnt] = zmat[
i];
548 amat1[cnt] = amat[
i];
549 wmat1[cnt] = wmat[
i];
952 o2::base::Detector::Medium(kAir,
"Air", 11, 0, iSXFLD, sXMGMX, 10., 999., .1, .01, .1);
953 o2::base::Detector::Medium(kDriftGas1,
"DriftGas1", 12, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
954 o2::base::Detector::Medium(kDriftGas2,
"DriftGas2", 13, 1, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
955 o2::base::Detector::Medium(kCO2,
"CO2", 10, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
956 o2::base::Detector::Medium(kDriftGas3,
"DriftGas3", 40, 1, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
961 o2::base::Detector::Medium(kAl,
"Al", 23, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
962 o2::base::Detector::Medium(kKevlar,
"Kevlar", 14, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
963 o2::base::Detector::Medium(kNomex,
"Nomex", 15, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
964 o2::base::Detector::Medium(kMakrolon,
"Makrolon", 16, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
965 o2::base::Detector::Medium(kMylar,
"Mylar", 18, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
966 o2::base::Detector::Medium(kTedlar,
"Tedlar", 17, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
968 o2::base::Detector::Medium(kPrepreg1,
"Prepreg1", 19, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
969 o2::base::Detector::Medium(kPrepreg2,
"Prepreg2", 20, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
970 o2::base::Detector::Medium(kPrepreg3,
"Prepreg3", 21, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
971 o2::base::Detector::Medium(kEpoxy,
"Epoxy", 26, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
973 o2::base::Detector::Medium(kCu,
"Cu", 25, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
974 o2::base::Detector::Medium(kSi,
"Si", 24, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
975 o2::base::Detector::Medium(kG10,
"G10", 22, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
976 o2::base::Detector::Medium(kPlexiglas,
"Plexiglas", 27, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
977 o2::base::Detector::Medium(kSteel,
"Steel", 29, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
978 o2::base::Detector::Medium(kPeek,
"Peek", 30, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
979 o2::base::Detector::Medium(kAlumina,
"Alumina", 31, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
980 o2::base::Detector::Medium(kWater,
"Water", 32, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
981 o2::base::Detector::Medium(kBrass,
"Brass", 33, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
982 o2::base::Detector::Medium(kEpoxyfm,
"Epoxyfm", 34, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
983 o2::base::Detector::Medium(kEpoxy1,
"Epoxy1", 35, 0, iSXFLD, sXMGMX, 10., 999., .1, .0005, .001);
984 o2::base::Detector::Medium(kAlumina1,
"Alumina1", 36, 0, iSXFLD, sXMGMX, 10., 999., .1, .001, .001);
987void Detector::ConstructTPCGeometry()
1021 auto* tpc =
new TGeoPcon(0., 360., 30);
1023 tpc->DefineSection(0, -289.6, 77., 278.);
1024 tpc->DefineSection(1, -262.1, 77., 278.);
1026 tpc->DefineSection(2, -262.1, 83.1, 278.);
1027 tpc->DefineSection(3, -260., 83.1, 278.);
1029 tpc->DefineSection(4, -260., 70., 278.);
1030 tpc->DefineSection(5, -259.6, 70., 278.);
1032 tpc->DefineSection(6, -259.6, 68.1, 278.);
1033 tpc->DefineSection(7, -253.6, 68.1, 278.);
1035 tpc->DefineSection(8, -253.6, 67.88, 278.);
1036 tpc->DefineSection(9, -74.0, 60.68, 278.);
1038 tpc->DefineSection(10, -74.0, 60.1, 278.);
1039 tpc->DefineSection(11, -73.3, 60.1, 278.);
1041 tpc->DefineSection(12, -73.3, 56.9, 278.);
1042 tpc->DefineSection(13, -68.5, 56.9, 278.);
1044 tpc->DefineSection(14, -68.5, 60., 278.);
1045 tpc->DefineSection(15, -64.7, 60., 278.);
1047 tpc->DefineSection(16, -64.7, 56.9, 278.);
1048 tpc->DefineSection(17, 73.3, 56.9, 278.);
1050 tpc->DefineSection(18, 73.3, 60.1, 278.);
1051 tpc->DefineSection(19, 74.0, 60.1, 278.);
1053 tpc->DefineSection(20, 74.0, 60.68, 278.);
1054 tpc->DefineSection(21, 253.6, 65.38, 278.);
1056 tpc->DefineSection(22, 253.6, 65.6, 278.);
1057 tpc->DefineSection(23, 259.6, 65.6, 278.);
1059 tpc->DefineSection(24, 259.6, 70.0, 278.);
1060 tpc->DefineSection(25, 260., 70.0, 278.);
1062 tpc->DefineSection(26, 260., 83.1, 278.);
1063 tpc->DefineSection(27, 262.1, 83.1, 278.);
1065 tpc->DefineSection(28, 262.1, 77., 278);
1066 tpc->DefineSection(29, 289.6, 77., 278.);
1068 TGeoMedium*
m1 = gGeoManager->GetMedium(
"TPC_Air");
1069 auto*
v1 =
new TGeoVolume(
"TPC_M", tpc, m1);
1074 auto* dvol =
new TGeoPcon(0., 360., 6);
1075 dvol->DefineSection(0, -260., 74.5, 264.4);
1076 dvol->DefineSection(1, -253.6, 74.5, 264.4);
1078 dvol->DefineSection(2, -253.6, 76.6774, 258.);
1079 dvol->DefineSection(3, 253.6, 76.6774, 258.);
1081 dvol->DefineSection(4, 253.6, 74.5, 264.4);
1082 dvol->DefineSection(5, 260., 74.5, 264.4);
1084 TGeoMedium*
m5 = gGeoManager->GetMedium(
"TPC_DriftGas2");
1085 auto* v9 =
new TGeoVolume(
"TPC_Drift", dvol, m5);
1091 auto* tpco =
new TGeoPcon(0., 360., 6);
1093 tpco->DefineSection(0, -256.6, 264.8, 278.);
1094 tpco->DefineSection(1, -253.6, 264.8, 278.);
1096 tpco->DefineSection(2, -253.6, 258., 278.);
1097 tpco->DefineSection(3, 250.6, 258., 278.);
1099 tpco->DefineSection(4, 250.6, 258., 275.5);
1100 tpco->DefineSection(5, 253.6, 258., 275.5);
1102 TGeoMedium*
m2 = gGeoManager->GetMedium(
"TPC_CO2");
1103 auto*
v2 =
new TGeoVolume(
"TPC_OI", tpco, m2);
1105 TGeoRotation* segrot;
1109 auto* tocv =
new TGeoPcon(0., 360., 6);
1111 tocv->DefineSection(0, -256.6, 264.8, 278.);
1112 tocv->DefineSection(1, -253.6, 264.8, 278.);
1114 tocv->DefineSection(2, -253.6, 274.8124, 278.);
1115 tocv->DefineSection(3, 247.6, 274.8124, 278.);
1117 tocv->DefineSection(4, 247.6, 270.4, 278.);
1118 tocv->DefineSection(5, 250.6, 270.4, 278.);
1120 TGeoMedium*
m3 = gGeoManager->GetMedium(
"TPC_Al");
1121 auto*
v3 =
new TGeoVolume(
"TPC_OCV", tocv, m3);
1123 auto* to1 =
new TGeoTubeSeg(274.8174, 277.995, 252.1, 0., 59.9);
1124 auto* to2 =
new TGeoTubeSeg(274.8274, 277.985, 252.1, 0., 59.9);
1125 auto* to3 =
new TGeoTubeSeg(274.8312, 277.9812, 252.1, 0., 59.9);
1126 auto* to4 =
new TGeoTubeSeg(274.9062, 277.9062, 252.1, 0., 59.9);
1127 auto* tog5 =
new TGeoTubeSeg(274.8174, 277.995, 252.1, 59.9, 60.);
1129 TGeoMedium* sm1 = gGeoManager->GetMedium(
"TPC_Epoxy");
1130 TGeoMedium* sm2 = gGeoManager->GetMedium(
"TPC_Tedlar");
1131 TGeoMedium* sm3 = gGeoManager->GetMedium(
"TPC_Prepreg2");
1132 TGeoMedium* sm4 = gGeoManager->GetMedium(
"TPC_Nomex");
1134 TGeoMedium* smep = gGeoManager->GetMedium(
"TPC_Epoxy1");
1136 auto* tov1 =
new TGeoVolume(
"TPC_OCV1", to1, sm1);
1137 auto* tov2 =
new TGeoVolume(
"TPC_OCV2", to2, sm2);
1138 auto* tov3 =
new TGeoVolume(
"TPC_OCV3", to3, sm3);
1139 auto* tov4 =
new TGeoVolume(
"TPC_OCV4", to4, sm4);
1140 auto* togv5 =
new TGeoVolume(
"TPC_OCVG5", tog5, sm1);
1142 TGeoMedium* mhs = gGeoManager->GetMedium(
"TPC_Steel");
1143 TGeoMedium* m12 = gGeoManager->GetMedium(
"TPC_Water");
1149 auto* tofc =
new TGeoPcon(0., 360., 6);
1151 tofc->DefineSection(0, -253.6, 258., 269.6);
1152 tofc->DefineSection(1, -250.6, 258., 269.6);
1154 tofc->DefineSection(2, -250.6, 258., 260.0676);
1155 tofc->DefineSection(3, 250.6, 258., 260.0676);
1157 tofc->DefineSection(4, 250.6, 258., 275.5);
1158 tofc->DefineSection(5, 253.6, 258., 275.5);
1160 auto* v4 =
new TGeoVolume(
"TPC_TOFC", tofc, m3);
1162 auto* tf1 =
new TGeoTubeSeg(258.0, 260.0676, 252.1, 0., 59.9);
1163 auto* tf2 =
new TGeoTubeSeg(258.0038, 260.0638, 252.1, 0., 59.9);
1164 auto* tf3 =
new TGeoTubeSeg(258.0338, 260.0338, 252.1, 0., 59.9);
1165 auto* tfg4 =
new TGeoTubeSeg(258.0, 260.0676, 252.1, 59.9, 60.);
1167 TGeoMedium* sm5 = gGeoManager->GetMedium(
"TPC_Prepreg3");
1169 auto* tf1v =
new TGeoVolume(
"TPC_OFC1", tf1, sm2);
1170 auto* tf2v =
new TGeoVolume(
"TPC_OFC2", tf2, sm5);
1171 auto* tf3v =
new TGeoVolume(
"TPC_OFC3", tf3, sm4);
1172 auto* tfg4v =
new TGeoVolume(
"TPC_OFCG4", tfg4, smep);
1176 tov1->AddNode(tov2, 1);
1177 tov2->AddNode(tov3, 1);
1178 tov3->AddNode(tov4, 1);
1180 tf1v->AddNode(tf2v, 1);
1181 tf2v->AddNode(tf3v, 1);
1183 auto* t200 =
new TGeoVolumeAssembly(
"TPC_OCVSEG");
1184 auto* t300 =
new TGeoVolumeAssembly(
"TPC_OFCSEG");
1189 t200->AddNode(tov1, 1);
1190 t200->AddNode(togv5, 1);
1191 t300->AddNode(tf1v, 1);
1192 t300->AddNode(tfg4v, 1);
1194 segrot =
new TGeoRotation();
1195 segrot->RotateZ(60.);
1196 t200->AddNode(tov1, 2, segrot);
1197 t200->AddNode(togv5, 2, segrot);
1198 t300->AddNode(tf1v, 2, segrot);
1199 t300->AddNode(tfg4v, 2, segrot);
1201 segrot =
new TGeoRotation();
1202 segrot->RotateZ(120.);
1203 t200->AddNode(tov1, 3, segrot);
1204 t200->AddNode(togv5, 3, segrot);
1205 t300->AddNode(tf1v, 3, segrot);
1206 t300->AddNode(tfg4v, 3, segrot);
1208 segrot =
new TGeoRotation();
1209 segrot->RotateZ(180.);
1210 t200->AddNode(tov1, 4, segrot);
1211 t200->AddNode(togv5, 4, segrot);
1212 t300->AddNode(tf1v, 4, segrot);
1213 t300->AddNode(tfg4v, 4, segrot);
1215 segrot =
new TGeoRotation();
1216 segrot->RotateZ(240.);
1217 t200->AddNode(tov1, 5, segrot);
1218 t200->AddNode(togv5, 5, segrot);
1219 t300->AddNode(tf1v, 5, segrot);
1220 t300->AddNode(tfg4v, 5, segrot);
1222 segrot =
new TGeoRotation();
1223 segrot->RotateZ(300.);
1224 t200->AddNode(tov1, 6, segrot);
1225 t200->AddNode(togv5, 6, segrot);
1226 t300->AddNode(tf1v, 6, segrot);
1227 t300->AddNode(tfg4v, 6, segrot);
1229 v3->AddNode(t200, 1,
new TGeoTranslation(0., 0., -1.5));
1230 v4->AddNode(t300, 1);
1239 auto* ogri =
new TGeoTube(257.985, 258., 0.6);
1240 auto* ogro =
new TGeoTube(260.0676, 260.0826, 0.6);
1242 auto* ogriv =
new TGeoVolume(
"TPC_OGRI", ogri, m3);
1243 auto* ogrov =
new TGeoVolume(
"TPC_OGRO", ogro, m3);
1245 for (Int_t
i = 0;
i < 24;
i++) {
1246 v9->AddNode(ogriv, (
i + 1),
new TGeoTranslation(0., 0., (
i + 1) * 10));
1247 v9->AddNode(ogriv, (
i + 25),
new TGeoTranslation(0., 0., -(
i + 1) * 10));
1248 v2->AddNode(ogrov, (
i + 1),
new TGeoTranslation(0., 0., (
i + 1) * 10));
1249 v2->AddNode(ogrov, (
i + 25),
new TGeoTranslation(0., 0., -(
i + 1) * 10));
1256 auto* tpci =
new TGeoPcon(0., 360., 4);
1258 tpci->DefineSection(0, -253.6, 68.4, 76.6774);
1259 tpci->DefineSection(1, -74.0, 61.2, 76.6774);
1261 tpci->DefineSection(2, 74.0, 61.2, 76.6774);
1263 tpci->DefineSection(3, 253.6, 65.9, 76.6774);
1265 auto* v5 =
new TGeoVolume(
"TPC_INI", tpci, m2);
1269 auto* tif1 =
new TGeoTube(69.9, 76.6774, 1.5);
1270 auto* v6 =
new TGeoVolume(
"TPC_IFC1", tif1, m3);
1275 auto* tcms =
new TGeoPcon(0., 360., 10);
1277 tcms->DefineSection(0, -259.1, 68.1, 74.2);
1278 tcms->DefineSection(1, -253.6, 68.1, 74.2);
1280 tcms->DefineSection(2, -253.6, 68.1, 68.4);
1281 tcms->DefineSection(3, -74.0, 60.9, 61.2);
1283 tcms->DefineSection(4, -74.0, 60.1, 61.2);
1284 tcms->DefineSection(5, -73.3, 60.1, 61.2);
1286 tcms->DefineSection(6, -73.3, 56.9, 61.2);
1287 tcms->DefineSection(7, -73.0, 56.9, 61.2);
1289 tcms->DefineSection(8, -73.0, 56.9, 58.8);
1290 tcms->DefineSection(9, -71.3, 56.9, 58.8);
1292 auto* v7 =
new TGeoVolume(
"TPC_ICVM", tcms, m3);
1297 auto* thsm =
new TGeoCone(89.8, 67.88, 68.1, 60.68, 60.9);
1298 auto* thsmw =
new TGeoCone(89.8, 67.94, 68.04, 60.74, 60.84);
1299 auto* hvsm =
new TGeoVolume(
"TPC_HSM", thsm, mhs);
1300 auto* hvsmw =
new TGeoVolume(
"TPC_HSMW", thsmw, m12);
1302 hvsm->AddNode(hvsmw, 1);
1306 auto* tcss =
new TGeoPcon(0., 360., 10);
1308 tcss->DefineSection(0, 71.3, 56.9, 58.8);
1309 tcss->DefineSection(1, 73.0, 56.9, 58.8);
1311 tcss->DefineSection(2, 73.0, 56.9, 61.2);
1312 tcss->DefineSection(3, 73.3, 56.9, 61.2);
1314 tcss->DefineSection(4, 73.3, 60.1, 61.2);
1315 tcss->DefineSection(5, 74.0, 60.1, 61.2);
1317 tcss->DefineSection(6, 74.0, 60.9, 61.2);
1318 tcss->DefineSection(7, 253.6, 65.6, 65.9);
1320 tcss->DefineSection(8, 253.6, 65.6, 74.2);
1321 tcss->DefineSection(9, 258.1, 65.6, 74.2);
1323 auto* v8 =
new TGeoVolume(
"TPC_ICVS", tcss, m3);
1327 auto* thss =
new TGeoCone(89.8, 60.68, 60.9, 65.38, 65.6);
1328 auto* thssw =
new TGeoCone(89.8, 60.74, 60.84, 65.44, 65.54);
1329 auto* hvss =
new TGeoVolume(
"TPC_HSS", thss, mhs);
1330 auto* hvssw =
new TGeoVolume(
"TPC_HSSW", thssw, m12);
1332 hvss->AddNode(hvssw, 1);
1338 auto*
t1 =
new TGeoTube(76.6774, 78.845, 0.75);
1339 auto* tv1 =
new TGeoVolume(
"TPC_IFC2",
t1, m3);
1344 auto* t2 =
new TGeoTubeSeg(76.6774, 78.845, 74.175, 350., 109.4);
1345 auto* t3 =
new TGeoTubeSeg(76.6812, 78.8412, 74.175, 350., 109.4);
1346 auto* t4 =
new TGeoTubeSeg(76.7312, 78.7912, 74.175, 350., 109.4);
1347 auto* t5 =
new TGeoTubeSeg(76.7612, 78.7612, 74.175, 350., 109.4);
1348 auto* tepox1 =
new TGeoTubeSeg(76.6774, 78.845, 74.175, 109.4, 110.);
1349 auto* tpr1 =
new TGeoTubeSeg(78.845, 78.885, 74.175, 109., 111.);
1352 auto* tv2 =
new TGeoVolume(
"TPC_IFC3", t2, sm2);
1353 auto* tv3 =
new TGeoVolume(
"TPC_IFC4", t3, sm3);
1354 auto* tv4 =
new TGeoVolume(
"TPC_IFC5", t4, sm5);
1355 auto* tv5 =
new TGeoVolume(
"TPC_IFC6", t5, sm4);
1356 auto* tvep1 =
new TGeoVolume(
"TPC_IFEPOX1", tepox1, smep);
1357 auto* tvpr1 =
new TGeoVolume(
"TPC_PRSTR1", tpr1, sm2);
1363 auto* t6 =
new TGeoTubeSeg(76.6774, 78.795, 5., 350., 109.4);
1364 auto* t7 =
new TGeoTubeSeg(76.6812, 78.7912, 5., 350., 109.4);
1365 auto* t8 =
new TGeoTubeSeg(76.7062, 78.7662, 5., 350., 109.4);
1366 auto* t9 =
new TGeoTubeSeg(76.7362, 78.7362, 5., 350., 109.4);
1367 auto* tepox2 =
new TGeoTubeSeg(76.6774, 78.795, 5., 109.4, 110.);
1368 auto* tpr2 =
new TGeoTubeSeg(78.795, 78.835, 5., 109., 111.);
1370 auto* tv6 =
new TGeoVolume(
"TPC_IFC7", t6, sm2);
1371 auto* tv7 =
new TGeoVolume(
"TPC_IFC8", t7, sm3);
1372 auto* tv8 =
new TGeoVolume(
"TPC_IFC9", t8, sm5);
1373 auto* tv9 =
new TGeoVolume(
"TPC_IFC10", t9, sm4);
1374 auto* tvep2 =
new TGeoVolume(
"TPC_IFEPOX2", tepox2, smep);
1375 auto* tvpr2 =
new TGeoVolume(
"TPC_PRSTR2", tpr2, sm2);
1380 auto* t10 =
new TGeoTubeSeg(76.6774, 78.785, 93.75, 350., 109.4);
1381 auto* t11 =
new TGeoTubeSeg(76.6812, 78.7812, 93.75, 350., 109.4);
1382 auto* t12 =
new TGeoTubeSeg(76.7312, 78.7312, 93.75, 350., 109.4);
1383 auto* tepox3 =
new TGeoTubeSeg(76.6774, 78.785, 93.75, 109.4, 110.);
1384 auto* tpr3 =
new TGeoTubeSeg(78.785, 78.825, 93.75, 109., 111.);
1386 auto* tv10 =
new TGeoVolume(
"TPC_IFC11", t10, sm2);
1387 auto* tv11 =
new TGeoVolume(
"TPC_IFC12", t11, sm5);
1388 auto* tv12 =
new TGeoVolume(
"TPC_IFC13", t12, sm4);
1389 auto* tvep3 =
new TGeoVolume(
"TPC_IFEPOX3", tepox3, smep);
1390 auto* tvpr3 =
new TGeoVolume(
"TPC_PRSTR3", tpr3, sm2);
1394 tv2->AddNode(tv3, 1);
1395 tv3->AddNode(tv4, 1);
1396 tv4->AddNode(tv5, 1);
1400 tv6->AddNode(tv7, 1);
1401 tv7->AddNode(tv8, 1);
1402 tv8->AddNode(tv9, 1);
1406 tv10->AddNode(tv11, 1);
1407 tv11->AddNode(tv12, 1);
1409 auto* tv100 =
new TGeoVolumeAssembly(
"TPC_IFC");
1415 tv100->AddNode(tv10, 1);
1416 tv100->AddNode(tvep3, 1);
1417 tv100->AddNode(tvpr3, 1);
1419 tv100->AddNode(tv6, 1,
new TGeoTranslation(0., 0., -98.75));
1420 tv100->AddNode(tv6, 2,
new TGeoTranslation(0., 0., 98.75));
1421 tv100->AddNode(tvep2, 1,
new TGeoTranslation(0., 0., -98.75));
1422 tv100->AddNode(tvep2, 2,
new TGeoTranslation(0., 0., 98.75));
1423 tv100->AddNode(tvpr2, 1,
new TGeoTranslation(0., 0., -98.75));
1424 tv100->AddNode(tvpr2, 2,
new TGeoTranslation(0., 0., 98.75));
1426 tv100->AddNode(tv2, 1,
new TGeoTranslation(0., 0., -177.925));
1427 tv100->AddNode(tv2, 2,
new TGeoTranslation(0., 0., 177.925));
1428 tv100->AddNode(tvep1, 1,
new TGeoTranslation(0., 0., -177.925));
1429 tv100->AddNode(tvep1, 2,
new TGeoTranslation(0., 0., 177.925));
1430 tv100->AddNode(tvpr1, 1,
new TGeoTranslation(0., 0., -177.925));
1431 tv100->AddNode(tvpr1, 2,
new TGeoTranslation(0., 0., 177.925));
1435 segrot =
new TGeoRotation();
1436 segrot->RotateZ(120.);
1439 tv100->AddNode(tv10, 2, segrot);
1440 tv100->AddNode(tvep3, 2, segrot);
1441 tv100->AddNode(tvpr3, 2, segrot);
1443 tv100->AddNode(tv6, 3,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1444 tv100->AddNode(tv6, 4,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1445 tv100->AddNode(tvep2, 3,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1446 tv100->AddNode(tvep2, 4,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1447 tv100->AddNode(tvpr2, 3,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1448 tv100->AddNode(tvpr2, 4,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1450 tv100->AddNode(tv2, 3,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1451 tv100->AddNode(tv2, 4,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1452 tv100->AddNode(tvep1, 3,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1453 tv100->AddNode(tvep1, 4,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1454 tv100->AddNode(tvpr1, 3,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1455 tv100->AddNode(tvpr1, 4,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1459 segrot =
new TGeoRotation();
1460 segrot->RotateZ(240.);
1463 tv100->AddNode(tv10, 3, segrot);
1464 tv100->AddNode(tvep3, 3, segrot);
1465 tv100->AddNode(tvpr3, 3, segrot);
1467 tv100->AddNode(tv6, 5,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1468 tv100->AddNode(tv6, 6,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1469 tv100->AddNode(tvep2, 5,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1470 tv100->AddNode(tvep2, 6,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1471 tv100->AddNode(tvpr2, 5,
new TGeoCombiTrans(0., 0., -98.75, segrot));
1472 tv100->AddNode(tvpr2, 6,
new TGeoCombiTrans(0., 0., 98.75, segrot));
1474 tv100->AddNode(tv2, 5,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1475 tv100->AddNode(tv2, 6,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1476 tv100->AddNode(tvep1, 5,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1477 tv100->AddNode(tvep1, 6,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1478 tv100->AddNode(tvpr1, 5,
new TGeoCombiTrans(0., 0., -177.925, segrot));
1479 tv100->AddNode(tvpr1, 6,
new TGeoCombiTrans(0., 0., 177.925, segrot));
1481 tv100->AddNode(tv1, 1,
new TGeoTranslation(0., 0., -252.85));
1482 tv100->AddNode(tv1, 2,
new TGeoTranslation(0., 0., 252.85));
1484 v5->AddNode(v6, 1,
new TGeoTranslation(0., 0., -252.1));
1485 v5->AddNode(v6, 2,
new TGeoTranslation(0., 0., 252.1));
1489 v1->AddNode(hvsm, 1,
new TGeoTranslation(0., 0., -163.8));
1490 v1->AddNode(hvss, 1,
new TGeoTranslation(0., 0., 163.8));
1491 v9->AddNode(tv100, 1);
1496 auto* igro =
new TGeoTube(76.6624, 76.6774, 0.6);
1497 auto* igrio =
new TGeoTube(78.845, 78.86, 0.6);
1498 auto* igrim =
new TGeoTube(78.795, 78.81, 0.6);
1499 auto* igric =
new TGeoTube(78.785, 78.8, 0.6);
1503 auto* igrov =
new TGeoVolume(
"TPC_IGR1", igro, m3);
1504 auto* igriov =
new TGeoVolume(
"TPC_IGR2", igrio, m3);
1505 auto* igrimv =
new TGeoVolume(
"TPC_IGR3", igrim, m3);
1506 auto* igricv =
new TGeoVolume(
"TPC_IGR4", igric, m3);
1510 for (Int_t
i = 0;
i < 24;
i++) {
1511 v5->AddNode(igrov, (
i + 1),
new TGeoTranslation(0., 0., (
i + 1) * 10));
1512 v5->AddNode(igrov, (
i + 25),
new TGeoTranslation(0., 0., -(
i + 1) * 10));
1517 for (Int_t
i = 0;
i < 9;
i++) {
1518 v9->AddNode(igricv, (
i + 1),
new TGeoTranslation(0., 0., (
i + 1) * 10));
1519 v9->AddNode(igricv, (
i + 10),
new TGeoTranslation(0., 0., -(
i + 1) * 10));
1521 v9->AddNode(igrimv, 1,
new TGeoTranslation(0., 0., 100.));
1522 v9->AddNode(igrimv, 2,
new TGeoTranslation(0., 0., -100.));
1524 for (Int_t
i = 0;
i < 13;
i++) {
1525 v9->AddNode(igriov,
i + 1,
new TGeoTranslation(0., 0., 100 + (
i + 1) * 10));
1526 v9->AddNode(igriov,
i + 14,
new TGeoTranslation(0., 0., -(100 + (
i + 1) * 10)));
1533 auto* cfl =
new TGeoPcon(0., 360., 6);
1534 cfl->DefineSection(0, -71.1, 59.7, 61.2);
1535 cfl->DefineSection(1, -68.6, 59.7, 61.2);
1537 cfl->DefineSection(2, -68.6, 60.6124, 61.2);
1538 cfl->DefineSection(3, 68.6, 60.6124, 61.2);
1540 cfl->DefineSection(4, 68.6, 59.7, 61.2);
1541 cfl->DefineSection(5, 71.1, 59.7, 61.2);
1543 auto* cflv =
new TGeoVolume(
"TPC_CDR", cfl, m3);
1545 auto* cd1 =
new TGeoTubeSeg(60.6224, 61.19, 69.8, 0.05, 119.95);
1546 auto* cd2 =
new TGeoTubeSeg(60.6262, 61.1862, 69.8, 0.05, 119.95);
1547 auto* cd3 =
new TGeoTubeSeg(60.6462, 61.1662, 69.8, 0.05, 119.95);
1548 auto* cd4 =
new TGeoTubeSeg(60.6562, 61.1562, 69.8, 0.05, 119.95);
1549 auto* tepox4 =
new TGeoTubeSeg(60.6224, 61.19, 69.8, 359.95, 0.05);
1551 TGeoMedium* sm6 = gGeoManager->GetMedium(
"TPC_Prepreg1");
1552 TGeoMedium* sm8 = gGeoManager->GetMedium(
"TPC_Epoxyfm");
1553 auto* cd1v =
new TGeoVolume(
"TPC_CDR1", cd1, sm2);
1554 auto* cd2v =
new TGeoVolume(
"TPC_CDR2", cd2, sm6);
1555 auto* cd3v =
new TGeoVolume(
"TPC_CDR3", cd3, sm8);
1556 auto* cd4v =
new TGeoVolume(
"TPC_CDR4", cd4, sm4);
1557 auto* tvep4 =
new TGeoVolume(
"TPC_IFEPOX4", tepox4, smep);
1561 auto* cdjl =
new TGeoTubeSeg(60.6562, 60.6762, 69.8, 0., 1.0);
1562 auto* cdju =
new TGeoTubeSeg(61.1362, 61.1562, 69.8, 0., 1.0);
1564 auto* cdjlv =
new TGeoVolume(
"TPC_CDJL", cdjl, sm6);
1565 auto* cdjuv =
new TGeoVolume(
"TPC_CDJU", cdju, sm6);
1569 auto* cs =
new TGeoTube(56.9, 61.2, 0.1);
1570 TGeoMedium* sm7 = gGeoManager->GetMedium(
"TPC_Mylar");
1571 auto* csv =
new TGeoVolume(
"TPC_CDRS", cs, sm7);
1572 v1->AddNode(csv, 1,
new TGeoTranslation(0., 0., -71.2));
1573 v1->AddNode(csv, 2,
new TGeoTranslation(0., 0., 71.2));
1576 auto* se =
new TGeoPcon(0., 360., 6);
1577 se->DefineSection(0, -72.8, 59.7, 61.2);
1578 se->DefineSection(1, -72.3, 59.7, 61.2);
1580 se->DefineSection(2, -72.3, 58.85, 61.2);
1581 se->DefineSection(3, -71.6, 58.85, 61.2);
1583 se->DefineSection(4, -71.6, 59.7, 61.2);
1584 se->DefineSection(5, -71.3, 59.7, 61.2);
1586 auto* sev =
new TGeoVolume(
"TPC_CDCE", se, m3);
1588 auto* si =
new TGeoTube(56.9, 58.8, 1.);
1589 auto* siv =
new TGeoVolume(
"TPC_CDCI", si, m3);
1593 auto*
ref =
new TGeoRotation(
"ref", 90., 0., 90., 90., 180., 0.);
1595 cd1v->AddNode(cd2v, 1);
1596 cd2v->AddNode(cd3v, 1);
1597 cd3v->AddNode(cd4v, 1);
1601 segrot =
new TGeoRotation();
1602 segrot->RotateZ(0.05);
1603 cd4v->AddNode(cdjlv, 1, segrot);
1604 cd4v->AddNode(cdjuv, 1, segrot);
1605 segrot =
new TGeoRotation();
1606 segrot->RotateZ(118.95);
1607 cd4v->AddNode(cdjlv, 2, segrot);
1608 cd4v->AddNode(cdjuv, 2, segrot);
1613 segrot =
new TGeoRotation();
1614 segrot->RotateZ(4.6);
1615 cflv->AddNode(cd1v, 1, segrot);
1616 cflv->AddNode(tvep4, 1, segrot);
1618 segrot =
new TGeoRotation();
1619 segrot->RotateZ(124.6);
1620 cflv->AddNode(cd1v, 2, segrot);
1621 cflv->AddNode(tvep4, 2, segrot);
1623 segrot =
new TGeoRotation();
1624 segrot->RotateZ(244.6);
1625 cflv->AddNode(cd1v, 3, segrot);
1626 cflv->AddNode(tvep4, 3, segrot);
1630 auto* hstr =
new TGeoTubeSeg(60.6124, 60.6224, 68.5, 0., 1.25);
1631 auto* hstrv =
new TGeoVolume(
"TPC_HSTR", hstr, m1);
1632 for (Int_t
i = 0;
i < 144;
i++) {
1633 Double_t
alpha = 1.25 +
i * 2.5;
1634 segrot =
new TGeoRotation();
1635 segrot->RotateZ(
alpha);
1636 cflv->AddNode(hstrv,
i + 1, segrot);
1639 v1->AddNode(siv, 1,
new TGeoTranslation(0., 0., -69.9));
1640 v1->AddNode(siv, 2,
new TGeoTranslation(0., 0., 69.9));
1641 v1->AddNode(sev, 1);
1642 v1->AddNode(sev, 2,
ref);
1643 v1->AddNode(cflv, 1);
1647 auto* ih =
new TGeoTube(81.05, 84.05, 0.3);
1648 auto* oh =
new TGeoTube(250., 256., 0.5);
1649 auto* mem =
new TGeoTube(84.05, 250., 0.00115);
1652 TGeoMedium*
m4 = gGeoManager->GetMedium(
"TPC_G10");
1654 auto* ihv =
new TGeoVolume(
"TPC_IHVH", ih, m3);
1655 auto* ohv =
new TGeoVolume(
"TPC_OHVH", oh, m3);
1657 auto* memv =
new TGeoVolume(
"TPC_HV", mem, sm7);
1659 auto*
cm =
new TGeoVolumeAssembly(
"TPC_HVMEM");
1660 cm->AddNode(ihv, 1);
1661 cm->AddNode(ohv, 1);
1662 cm->AddNode(memv, 1);
1669 Double_t openingAngle = 10. * TMath::DegToRad();
1670 Double_t thick = 1.5;
1671 Double_t shift = thick / TMath::Sin(openingAngle);
1673 Double_t lowEdge = 86.3;
1674 Double_t upEdge = 240.4;
1676 new TGeoTubeSeg(
"tpc_ssec", 74.5, 264.4, 3., 0., 20.);
1678 auto* tpc_hole =
new TGeoPgon(
"tpc_hole", 0., 20., 1, 4);
1680 tpc_hole->DefineSection(0, -3.5, lowEdge - shift, upEdge - shift);
1681 tpc_hole->DefineSection(1, -1.5, lowEdge - shift, upEdge - shift);
1683 tpc_hole->DefineSection(2, -1.5, lowEdge - shift, upEdge + 3. - shift);
1684 tpc_hole->DefineSection(3, 3.5, lowEdge - shift, upEdge + 3. - shift);
1686 Double_t ys = shift * TMath::Sin(openingAngle);
1687 Double_t xs = shift * TMath::Cos(openingAngle);
1688 auto* tr =
new TGeoTranslation(
"tr", xs, ys, 0.);
1689 tr->RegisterYourself();
1690 auto*
chamber =
new TGeoCompositeShape(
"tpc_ssec-tpc_hole:tr");
1691 auto* sv =
new TGeoVolume(
"TPC_WSEG", chamber, m3);
1692 auto* bar =
new TGeoPgon(
"bar", 0., 20., 1, 2);
1693 bar->DefineSection(0, -3., 131.5 - shift, 136.5 - shift);
1694 bar->DefineSection(1, 1.5, 131.5 - shift, 136.5 - shift);
1695 auto* barv =
new TGeoVolume(
"TPC_WBAR", bar, m3);
1696 auto* ch =
new TGeoVolumeAssembly(
"TPC_WCH");
1699 ch->AddNode(barv, 1, tr);
1705 TGeoMedium* m6 = gGeoManager->GetMedium(
"TPC_Makrolon");
1707 auto* ibody =
new TGeoTrd1(13.8742, 21.3328, 4.29, 21.15);
1708 auto* ibdv =
new TGeoVolume(
"TPC_IROCB", ibody, m3);
1710 auto* emp =
new TGeoTrd1(12.3742, 19.8328, 4.05, 19.65);
1711 auto* empv =
new TGeoVolume(
"TPC_IROCE", emp, m1);
1712 ibdv->AddNode(empv, 1,
new TGeoTranslation(0., -0.24, 0.));
1714 Double_t tga = (19.8328 - 12.3742) / 39.3;
1715 Double_t xmin, xmax;
1717 xmin = 9.65 * tga + 12.3742;
1718 xmax = 10.05 * tga + 12.3742;
1720 auto* ib1 =
new TGeoTrd1(xmin, xmax, 2.06, 0.2);
1721 auto* ib1v =
new TGeoVolume(
"TPC_IRB1", ib1, m3);
1722 empv->AddNode(ib1v, 1,
new TGeoTranslation(
"tt1", 0., 1.99, -9.8));
1724 xmin = 19.5 * tga + 12.3742;
1725 xmax = 19.9 * tga + 12.3742;
1727 auto* ib2 =
new TGeoTrd1(xmin, xmax, 2.06, 0.2);
1728 auto* ib2v =
new TGeoVolume(
"TPC_TRB2", ib2, m3);
1729 empv->AddNode(ib2v, 1,
new TGeoTranslation(0., 1.99, 0.05));
1731 xmin = 29.35 * tga + 12.3742;
1732 xmax = 29.75 * tga + 12.3742;
1734 auto* ib3 =
new TGeoTrd1(xmin, xmax, 2.06, 0.2);
1735 auto* ib3v =
new TGeoVolume(
"TPC_IRB3", ib3, m3);
1736 empv->AddNode(ib3v, 1,
new TGeoTranslation(0., 1.99, 9.9));
1740 auto* conn =
new TGeoBBox(0.4, 0.24, 1.937);
1741 auto* connv =
new TGeoVolume(
"TPC_RCCON", conn, m6);
1743 auto* connb =
new TGeoBBox(0.5, 0.25, 2.375);
1744 auto* connbv =
new TGeoVolume(
"TPC_RCCONB", connb, m6);
1748 auto* icsb =
new TGeoTrd1(14.5974, 23.3521, 0.25, 24.825);
1749 auto* icsbv =
new TGeoVolume(
"TPC_ISB", icsb, m4);
1753 TString fileName(gSystem->Getenv(
"VMCWORKDIR"));
1754 fileName +=
"/Detectors/Geometry/TPC/conn_iroc.dat";
1756 in.open(fileName.Data(), ios_base::in);
1757 if (!in.is_open()) {
1758 LOG(fatal) <<
"Cannot open input file : " << fileName.Data();
1760 for (Int_t
i = 0;
i < 132;
i++) {
1762 in >> ang >>
x >>
z;
1769 auto* rrr =
new TGeoRotation();
1772 ibdv->AddNode(connv,
i + 1,
new TGeoCombiTrans(
x, 4.05,
z, rrr));
1773 icsbv->AddNode(connbv,
i + 1,
new TGeoCombiTrans(
x, 0.,
z + 1.725, rrr));
1778 new TGeoTrd1(
"icap", 14.5974, 23.3521, 1.19, 24.825);
1780 new TGeoTrd1(
"ihole", 13.8742, 21.3328, 1.2, 21.15);
1781 auto* tr1 =
new TGeoTranslation(
"tr1", 0., 0., 1.725);
1782 tr1->RegisterYourself();
1783 auto* ic =
new TGeoCompositeShape(
"icap-ihole:tr1");
1784 auto* icv =
new TGeoVolume(
"TPC_IRCAP", ic, m3);
1788 auto* icpp =
new TGeoTrd1(14.5974, 23.3521, 0.16, 24.825);
1789 auto* icppv =
new TGeoVolume(
"TPC_IPP", icpp, m4);
1793 new TGeoTrd1(
"igem", 14.5974, 23.3521, 0.1, 24.825);
1794 new TGeoTrd1(
"igemh", 14.5974 - .5, 23.3521 - .5, 0.11, 24.825 - .5);
1795 auto* icgem =
new TGeoCompositeShape(
"igem-igemh");
1796 auto* icgemv =
new TGeoVolume(
"TPC_ICGEM", icgem, m4);
1800 auto* iroc =
new TGeoVolumeAssembly(
"TPC_IROC");
1802 iroc->AddNode(ibdv, 1);
1803 iroc->AddNode(icv, 1,
new TGeoTranslation(0., 3.1, -1.725));
1804 iroc->AddNode(icsbv, 1,
new TGeoTranslation(0., 4.54, -1.725));
1805 iroc->AddNode(icppv, 1,
new TGeoTranslation(0., 4.95, -1.725));
1806 iroc->AddNode(icgemv, 1,
new TGeoTranslation(0., 5.21, -1.725));
1810 auto* obody =
new TGeoTrd1(22.2938, 40.5084, 4.29, 51.65);
1811 auto* obdv =
new TGeoVolume(
"TPC_OROCB", obody, m3);
1812 auto* oemp =
new TGeoTrd1(20.7938, 39.0084, 3.89, 50.15);
1813 auto* oempv =
new TGeoVolume(
"TPC_OROCE", oemp, m1);
1814 obdv->AddNode(oempv, 1,
new TGeoTranslation(0., -0.4, 0.));
1818 tga = (39.0084 - 20.7938) / 100.3;
1819 xmin = tga * 14.2 + 20.7938;
1820 xmax = tga * 14.6 + 20.7938;
1821 auto* ob1 =
new TGeoTrd1(xmin, xmax, 2.94, 0.2);
1822 auto* ob1v =
new TGeoVolume(
"TPC_ORB1", ob1, m3);
1824 xmin = 30.4 * tga + 20.7938;
1825 xmax = 32.1 * tga + 20.7938;
1826 auto* ob2 =
new TGeoTrd1(xmin, xmax, 2.94, 1.05);
1827 auto* ob2v =
new TGeoVolume(
"TPC_ORB2", ob2, m3);
1829 xmin = 51.5 * tga + 20.7938;
1830 xmax = 51.9 * tga + 20.7938;
1831 auto* ob3 =
new TGeoTrd1(xmin, xmax, 2.94, 0.2);
1832 auto* ob3v =
new TGeoVolume(
"TPC_ORB3", ob3, m3);
1834 xmin = 68.5 * tga + 20.7938;
1835 xmax = 70.6 * tga + 20.7938;
1836 auto* ob4 =
new TGeoTrd1(xmin, xmax, 2.94, 1.05);
1837 auto* ob4v =
new TGeoVolume(
"TPC_ORB4", ob4, m3);
1839 xmin = 89.9 * tga + 20.7938;
1840 xmax = 90.3 * tga + 20.7938;
1841 auto* ob5 =
new TGeoTrd1(xmin, xmax, 2.94, 0.2);
1842 auto* ob5v =
new TGeoVolume(
"TPC_ORB5", ob5, m3);
1844 oempv->AddNode(ob1v, 1,
new TGeoTranslation(0., 0.59, -35.75));
1845 oempv->AddNode(ob2v, 1,
new TGeoTranslation(0., 0.59, -18.7));
1846 oempv->AddNode(ob3v, 1,
new TGeoTranslation(0., 0.59, 1.55));
1847 oempv->AddNode(ob4v, 1,
new TGeoTranslation(0., 0.59, 19.4));
1848 oempv->AddNode(ob5v, 1,
new TGeoTranslation(0., 0.59, 39.95));
1852 auto* conno =
new TGeoBBox(0.4, 0.4, 1.937);
1853 auto* connov =
new TGeoVolume(
"TPC_RCCONO", conno, m6);
1855 auto* connob =
new TGeoBBox(0.5, 0.25, 2.375);
1856 auto* connobv =
new TGeoVolume(
"TPC_RCCONOB", connob, m6);
1860 new TGeoTrd1(
"ocap", 23.3875, 43.524, 1.19, 57.1);
1861 new TGeoTrd1(
"ohole", 22.2938, 40.5084, 1.19, 51.65);
1862 auto* tr5 =
new TGeoTranslation(
"tr5", 0., 0., -2.15);
1863 tr5->RegisterYourself();
1864 auto* oc =
new TGeoCompositeShape(
"ocap-ohole:tr5");
1865 auto* ocv =
new TGeoVolume(
"TPC_ORCAP", oc, m3);
1869 auto* osb =
new TGeoTrd1(23.3874, 43.524, 0.25, 57.1);
1870 auto* osbv =
new TGeoVolume(
"TPC_OSB", osb, m4);
1874 auto* opp =
new TGeoTrd1(23.3874, 43.524, 0.16, 57.1);
1875 auto* oppv =
new TGeoVolume(
"TPC_OPP", opp, m4);
1879 new TGeoTrd1(
"ogem", 23.3874, 43.524, 0.1, 57.1);
1883 new TGeoTrd1(
"ogemh1", 22.548, 28.579, 0.1, 17.625);
1884 new TGeoTrd1(
"ogemh2", 28.949, 35.297, 0.1, 18.45);
1885 new TGeoTrd1(
"ogemh3", 35.667, 42.332, 0.1, 19.425);
1887 auto* tr2 =
new TGeoTranslation(
"tr2", 0., 0., 18.125 - 57.1);
1888 auto* tr3 =
new TGeoTranslation(
"tr3", 0., 0., 55.2 - 57.1);
1889 auto* tr4 =
new TGeoTranslation(
"tr4", 0., 0., 94.175 - 57.1);
1890 tr2->RegisterYourself();
1891 tr3->RegisterYourself();
1892 tr4->RegisterYourself();
1893 auto* ocgem =
new TGeoCompositeShape(
"ogem-ogemh1:tr2-ogemh2:tr3-ogemh3:tr4");
1894 auto* ocgemv =
new TGeoVolume(
"TPC_OCGEM", ocgem, m4);
1898 fileName = gSystem->Getenv(
"VMCWORKDIR");
1899 fileName +=
"/Detectors/Geometry/TPC/conn_oroc.dat";
1900 in.open(fileName.Data(), ios_base::in);
1901 if (!in.is_open()) {
1902 LOG(fatal) <<
"Cannot open input file : " << fileName.Data();
1904 for (Int_t
i = 0;
i < 232;
i++) {
1906 in >> ang >>
x >>
z;
1912 auto* rrr =
new TGeoRotation();
1914 obdv->AddNode(connov,
i + 1,
new TGeoCombiTrans(
x, 3.89,
z, rrr));
1915 osbv->AddNode(connobv,
i + 1,
new TGeoCombiTrans(
x, 0.,
z - 2.15, rrr));
1919 auto* oroc =
new TGeoVolumeAssembly(
"TPC_OROC");
1921 oroc->AddNode(obdv, 1);
1922 oroc->AddNode(ocv, 1,
new TGeoTranslation(0., 3.1, 2.15));
1923 oroc->AddNode(osbv, 1,
new TGeoTranslation(0., 4.54, 2.15));
1924 oroc->AddNode(oppv, 1,
new TGeoTranslation(0., 4.95, 2.15));
1925 oroc->AddNode(ocgemv, 1,
new TGeoTranslation(0., 5.21, 2.15));
1929 auto* secta =
new TGeoVolumeAssembly(
"TPC_SECT");
1930 auto* sectc =
new TGeoVolumeAssembly(
"TPC_SECT");
1931 TGeoRotation rot1(
"rot1", 90., 90., 0.);
1932 TGeoRotation rot2(
"rot2");
1934 auto* rot =
new TGeoRotation(
"rot");
1941 x0 = 110.2 * TMath::Cos(openingAngle);
1942 y0 = 110.2 * TMath::Sin(openingAngle);
1943 auto* combi1a =
new TGeoCombiTrans(
"combi1",
x0,
y0, 1.09, rot);
1944 auto* combi1c =
new TGeoCombiTrans(
"combi1",
x0,
y0, 1.09, rot);
1945 x0 = 188.45 * TMath::Cos(openingAngle);
1946 y0 = 188.45 * TMath::Sin(openingAngle);
1947 auto* combi2a =
new TGeoCombiTrans(
"combi2",
x0,
y0, 1.09, rot);
1948 auto* combi2c =
new TGeoCombiTrans(
"combi2",
x0,
y0, 1.09, rot);
1953 secta->AddNode(ch, 1);
1954 secta->AddNode(iroc, 1, combi1a);
1955 secta->AddNode(oroc, 1, combi2a);
1959 sectc->AddNode(ch, 1);
1960 sectc->AddNode(iroc, 1, combi1c);
1961 sectc->AddNode(oroc, 1, combi2c);
1965 auto* wheela =
new TGeoVolumeAssembly(
"TPC_ENDCAP");
1966 auto* wheelc =
new TGeoVolumeAssembly(
"TPC_ENDCAP");
1968 for (Int_t
i = 0;
i < 18;
i++) {
1969 Double_t
phi = (20. *
i);
1970 auto* rwh =
new TGeoRotation();
1972 wheela->AddNode(secta,
i + 1, rwh);
1973 wheelc->AddNode(sectc,
i + 1, rwh);
1977 auto* combi3 =
new TGeoCombiTrans(
"combi3", 0., 0., 256.6,
ref);
1978 v9->AddNode(wheela, 1, combi3);
1979 v9->AddNode(wheelc, 2,
new TGeoTranslation(0., 0., -256.6));
1983 auto*
sw =
new TGeoPgon(0., 20., 1, 2);
1984 sw->DefineSection(0, -4., 80.5, 251.75);
1985 sw->DefineSection(1, 4., 80.5, 251.75);
1986 auto* swv =
new TGeoVolume(
"TPC_SWSEG",
sw, m3);
1989 shift = thick / TMath::Sin(openingAngle);
1990 auto* sh =
new TGeoPgon(0., 20., 1, 2);
1991 sh->DefineSection(0, -4., 81.5 - shift, 250.75 - shift);
1992 sh->DefineSection(1, 4., 81.5 - shift, 250.75 - shift);
1993 auto* shv =
new TGeoVolume(
"TPC_SWS1", sh, m1);
1995 TGeoMedium* m9 = gGeoManager->GetMedium(
"TPC_Si");
1996 auto* el =
new TGeoPgon(0., 20., 1, 2);
1997 el->DefineSection(0, -1.872, 81.5 - shift, 250.75 - shift);
1998 el->DefineSection(1, 1.872, 81.5 - shift, 250.75 - shift);
1999 auto* elv =
new TGeoVolume(
"TPC_ELEC", el, m9);
2001 shv->AddNode(elv, 1);
2004 ys = shift * TMath::Sin(openingAngle);
2005 xs = shift * TMath::Cos(openingAngle);
2006 swv->AddNode(shv, 1,
new TGeoTranslation(xs, ys, 0.));
2008 auto* co =
new TGeoPgon(0., 20., 1, 2);
2009 co->DefineSection(0, -0.5, 77., 255.25);
2010 co->DefineSection(1, 0.5, 77., 255.25);
2011 auto* cov =
new TGeoVolume(
"TPC_SWC1", co, m3);
2013 auto* coh =
new TGeoPgon(0., 20., 1, 2);
2014 shift = 4. / TMath::Sin(openingAngle);
2015 coh->DefineSection(0, -0.5, 85. - shift, 247.25 - shift);
2016 coh->DefineSection(1, 0.5, 85. - shift, 247.25 - shift);
2018 auto* cohv =
new TGeoVolume(
"TPC_SWC2", coh, m1);
2020 ys = shift * TMath::Sin(openingAngle);
2021 xs = shift * TMath::Cos(openingAngle);
2022 cov->AddNode(cohv, 1,
new TGeoTranslation(xs, ys, 0.));
2026 auto* swhs =
new TGeoVolumeAssembly(
"TPC_SSWSEC");
2027 swhs->AddNode(swv, 1);
2028 swhs->AddNode(cov, 1,
new TGeoTranslation(0., 0., -4.5));
2029 swhs->AddNode(cov, 2,
new TGeoTranslation(0., 0., 4.5));
2033 TGeoRotation* rsw[18];
2034 auto* swheel =
new TGeoVolumeAssembly(
"TPC_SSWHEEL");
2035 for (Int_t
i = 0;
i < 18;
i++) {
2036 Double_t
phi = (20. *
i);
2037 rsw[
i] =
new TGeoRotation();
2038 rsw[
i]->RotateZ(phi);
2039 swheel->AddNode(swhs,
i + 1, rsw[
i]);
2041 v1->AddNode(swheel, 1,
new TGeoTranslation(0., 0., -284.6));
2042 v1->AddNode(swheel, 2,
new TGeoTranslation(0., 0., 284.6));
2047 Int_t totrows = 159;
2051 gGeoManager->Volume(
"TPC_Strip",
"PGON",
m5->GetId(), upar);
2052 upar =
new Double_t[10];
2063 Double_t rlow = 85.225;
2066 upar[6] = rlow + .01;
2070 gGeoManager->Node(
"TPC_Strip", 1,
"TPC_Drift", 0., 0., 124.82, 0, kTRUE, upar, 10);
2071 gGeoManager->Node(
"TPC_Strip", totrows + 1,
"TPC_Drift", 0., 0., -124.82, 0, kTRUE, upar, 10);
2105 TGeoMedium* m7 = gGeoManager->GetMedium(
"TPC_Cu");
2106 TGeoMedium* m10 = gGeoManager->GetMedium(
"TPC_Alumina");
2107 TGeoMedium* m11 = gGeoManager->GetMedium(
"TPC_Peek");
2108 TGeoMedium* m13 = gGeoManager->GetMedium(
"TPC_Brass");
2109 TGeoMedium* m14 = gGeoManager->GetMedium(
"TPC_Alumina1");
2117 auto* rod =
new TGeoPcon(
"rod", 0., 360., 6);
2118 rod->DefineSection(0, -10.43, 1.92, 2.08);
2119 rod->DefineSection(1, -9.75, 1.92, 2.08);
2121 rod->DefineSection(2, -9.75, 1.8, 2.2);
2122 rod->DefineSection(3, 9.75, 1.8, 2.2);
2124 rod->DefineSection(4, 9.75, 1.92, 2.08);
2125 rod->DefineSection(5, 10.43, 1.92, 2.08);
2127 auto* mrodl =
new TGeoVolume(
"TPC_mrodl", rod, m6);
2131 auto* rod1 =
new TGeoPcon(
"rod1", 0., 360., 6);
2132 rod1->DefineSection(0, -8.93, 1.92, 2.08);
2133 rod1->DefineSection(1, -8.25, 1.92, 2.08);
2135 rod1->DefineSection(2, -8.25, 1.8, 2.2);
2136 rod1->DefineSection(3, 8.25, 1.8, 2.2);
2138 rod1->DefineSection(4, 8.25, 1.92, 2.08);
2139 rod1->DefineSection(5, 8.93, 1.92, 2.08);
2141 auto* mrods =
new TGeoVolume(
"TPC_mrods", rod1, m6);
2148 new TGeoTube(
"hhole", 0., 0.3, 0.3);
2153 auto* rhole =
new TGeoRotation();
2154 rhole->RotateX(90.);
2155 TGeoCombiTrans* transf[13];
2157 for (Int_t
i = 0;
i < 13;
i++) {
2158 snprintf(
name, 30,
"transf%d",
i);
2159 transf[
i] =
new TGeoCombiTrans(
name, 0., -2., -9. +
i * 1.5, rhole);
2160 transf[
i]->RegisterYourself();
2163 TString operl(
"hhole:transf0");
2164 for (Int_t
i = 1;
i < 13;
i++) {
2165 snprintf(
name, 30,
"+hhole:transf%d",
i);
2169 TString opers(
"hhole:transf1");
2170 for (Int_t
i = 2;
i < 12;
i++) {
2171 snprintf(
name, 30,
"+hhole:transf%d",
i);
2175 new TGeoCompositeShape(
"hlv", operl.Data());
2176 new TGeoCompositeShape(
"hsv", opers.Data());
2178 auto* rodl =
new TGeoCompositeShape(
"rodl",
"rod-hlv");
2179 auto* rods =
new TGeoCompositeShape(
"rods",
"rod1-hsv");
2181 auto* rodlv =
new TGeoVolume(
"TPC_rodl", rodl, m6);
2182 auto* rodsv =
new TGeoVolume(
"TPC_rods", rods, m6);
2185 auto* bcon =
new TGeoTube(0., 0.3, 0.3);
2186 auto* bconv =
new TGeoVolume(
"TPC_bcon", bcon, m13);
2190 new TGeoBBox(
"hk1", 0.625, 0.015, 0.75);
2191 new TGeoBBox(
"hk2", 0.625, 0.015, 0.15);
2192 auto* tr21 =
new TGeoTranslation(
"tr21", 0., -0.03, -0.6);
2193 auto* tr12 =
new TGeoTranslation(
"tr12", 0., -0.03, 0.6);
2194 tr21->RegisterYourself();
2195 tr12->RegisterYourself();
2197 auto* hook =
new TGeoCompositeShape(
"hook",
"hk1+hk2:tr21+hk2:tr12");
2198 auto* hookv =
new TGeoVolume(
"TPC_hook", hook, m13);
2205 auto* spart =
new TGeoVolumeAssembly(
"TPC_spart");
2207 spart->AddNode(rodsv, 1);
2208 for (Int_t
i = 1;
i < 12;
i++) {
2209 spart->AddNode(bconv,
i, transf[
i]);
2211 for (Int_t
i = 0;
i < 11;
i++) {
2212 spart->AddNode(hookv,
i + 1,
new TGeoTranslation(0., -2.315, -7.5 +
i * 1.5));
2217 auto* lpart =
new TGeoVolumeAssembly(
"TPC_lpart");
2219 lpart->AddNode(rodlv, 1);
2220 for (Int_t
i = 0;
i < 13;
i++) {
2221 lpart->AddNode(bconv,
i + 12, transf[
i]);
2223 for (Int_t
i = 0;
i < 13;
i++) {
2224 lpart->AddNode(hookv,
i + 12,
new TGeoTranslation(0., -2.315, -9. +
i * 1.5));
2229 new TGeoTube(
"ring1", 2.1075, 2.235, 0.53);
2230 new TGeoTube(
"ring2", 1.7925, 1.89, 0.43);
2231 new TGeoTube(
"ring3", 1.89, 2.1075, 0.05);
2232 auto* ring =
new TGeoCompositeShape(
"ring",
"ring1+ring2+ring3");
2233 auto* ringv =
new TGeoVolume(
"TPC_ring", ring, m3);
2237 auto* tpcrrod =
new TGeoVolumeAssembly(
"TPC_rrod");
2238 auto* tpcmrod =
new TGeoVolumeAssembly(
"TPC_mrod");
2240 for (Int_t
i = 0;
i < 11;
i++) {
2241 tpcrrod->AddNode(ringv,
i + 1,
new TGeoTranslation(0., 0., -105. +
i * 21));
2242 tpcmrod->AddNode(ringv,
i + 12,
new TGeoTranslation(0., 0., -105. +
i * 21));
2244 for (Int_t
i = 0;
i < 10;
i++) {
2245 tpcrrod->AddNode(lpart,
i + 1,
new TGeoTranslation(0., 0., -94.5 +
i * 21));
2246 tpcmrod->AddNode(mrodl,
i + 1,
new TGeoTranslation(0., 0., -94.5 +
i * 21));
2251 auto* tpcrp =
new TGeoPcon(0., 360., 6);
2253 tpcrp->DefineSection(0, 123.05, 1.89, 2.1075);
2254 tpcrp->DefineSection(1, 123.59, 1.89, 2.1075);
2256 tpcrp->DefineSection(2, 123.59, 1.8, 2.2);
2257 tpcrp->DefineSection(3, 127., 1.8, 2.2);
2259 tpcrp->DefineSection(4, 127., 0., 2.2);
2260 tpcrp->DefineSection(5, 127.5, 0., 2.2);
2262 auto* tpcrpv =
new TGeoVolume(
"TPC_RP", tpcrp, m6);
2266 tpcrrod->AddNode(spart, 1,
new TGeoTranslation(0., 0., -114.));
2267 tpcrrod->AddNode(spart, 2,
new TGeoTranslation(0., 0., 114.));
2268 tpcrrod->AddNode(ringv, 23,
new TGeoTranslation(0., 0., -123.));
2269 tpcrrod->AddNode(ringv, 24,
new TGeoTranslation(0., 0., 123.));
2270 tpcrrod->AddNode(tpcrpv, 1);
2272 tpcmrod->AddNode(mrods, 1,
new TGeoTranslation(0., 0., -114.));
2273 tpcmrod->AddNode(mrods, 2,
new TGeoTranslation(0., 0., 114.));
2274 tpcmrod->AddNode(ringv, 25,
new TGeoTranslation(0., 0., -123.));
2275 tpcmrod->AddNode(ringv, 26,
new TGeoTranslation(0., 0., 123.));
2276 tpcmrod->AddNode(tpcrpv, 2);
2283 auto* hvr =
new TGeoTube(0., 1.465, 123.);
2284 auto* hvc =
new TGeoTube(0., 0.29, 123.);
2286 auto* hvrv =
new TGeoVolume(
"TPC_HV_Rod", hvr, m6);
2287 auto* hvcv =
new TGeoVolume(
"TPC_HV_Cable", hvc, m7);
2288 hvrv->AddNode(hvcv, 1);
2292 auto* cr =
new TGeoTube(0., 0.45, 123.);
2293 auto* cw =
new TGeoTube(0., 0.15, 123.);
2294 auto* crv =
new TGeoVolume(
"TPC_CR", cr, m10);
2295 auto* cwv =
new TGeoVolume(
"TPC_W", cw, m12);
2299 crv->AddNode(cwv, 1);
2303 auto* pr =
new TGeoTube(0.2, 0.35, 123.);
2304 auto* prv =
new TGeoVolume(
"TPC_PR", pr, m11);
2308 new TGeoTube(
"tub", 0., 1.7, 0.025);
2312 Double_t
n[3],
p[3];
2313 Double_t
slope = TMath::Tan(22. * TMath::DegToRad());
2314 Double_t intp = 1.245;
2325 norm = TMath::Sqrt(
n[0] *
n[0] +
n[1] *
n[1]);
2338 norm = TMath::Sqrt(
n[0] *
n[0] +
n[1] *
n[1]);
2345 new TGeoTube(
"h1", 0., 0.5, 0.025);
2346 new TGeoTube(
"h2", 0., 0.35, 0.025);
2348 auto* ttr11 =
new TGeoTranslation(
"ttr11", -0.866, 0.5, 0.);
2349 auto* ttr22 =
new TGeoTranslation(
"ttr22", 0.866, 0.5, 0.);
2350 ttr11->RegisterYourself();
2351 ttr22->RegisterYourself();
2353 new TGeoBBox(
"elcon", 0.72, 0.005, 0.3);
2354 auto* crr1 =
new TGeoRotation();
2355 crr1->RotateZ(-22.);
2356 auto* ctr1 =
new TGeoCombiTrans(
"ctr1", -0.36011, -1.09951, -0.325, crr1);
2357 ctr1->RegisterYourself();
2358 auto* cs1 =
new TGeoCompositeShape(
"cs1",
"(((((tub-h1:ttr11)-h1:ttr22)-(sp1:sp1_tr))-(sp2:sp2_tr))-h2)+elcon:ctr1");
2360 auto* csvv =
new TGeoVolume(
"TPC_RR_CU", cs1, m7);
2365 auto* rrod =
new TGeoVolumeAssembly(
"TPC_RRIN");
2367 rrod->AddNode(crv, 1, ttr11);
2368 rrod->AddNode(crv, 2, ttr22);
2369 rrod->AddNode(prv, 1);
2371 for (Int_t
i = 0;
i < 165;
i++) {
2372 rrod->AddNode(csvv,
i + 1,
new TGeoTranslation(0., 0., -122.675 +
i * 1.5));
2375 auto*
res =
new TGeoTube(0., 0.15, 0.5);
2376 auto* resv =
new TGeoVolume(
"TPC_RES",
res, m14);
2377 auto* ress =
new TGeoVolumeAssembly(
"TPC_RES_CH");
2378 ress->AddNode(resv, 1,
new TGeoTranslation(0.2, 0., 0.));
2379 ress->AddNode(resv, 2,
new TGeoTranslation(-0.2, 0., 0.));
2381 auto* crr2 =
new TGeoRotation();
2383 auto* crr3 =
new TGeoRotation();
2384 crr3->RotateY(-30.);
2386 for (Int_t
i = 0;
i < 164;
i += 2) {
2387 rrod->AddNode(ress,
i + 1,
new TGeoCombiTrans(0., 1.2, -121.925 +
i * 1.5, crr2));
2388 rrod->AddNode(ress,
i + 2,
new TGeoCombiTrans(0., 1.2, -121.925 + (
i + 1) * 1.5, crr3));
2391 tpcrrod->AddNode(rrod, 1,
new TGeoCombiTrans(0., 0., 0.5, crr1));
2396 Double_t shift1[3] = {0.0, -0.175, 0.0};
2398 new TGeoBBox(
"tpcihs1", 4.7, 0.66, 2.35);
2399 new TGeoBBox(
"tpcihs2", 4.7, 0.485, 1.0, shift1);
2400 new TGeoBBox(
"tpcihs3", 1.5, 0.485, 2.35, shift1);
2401 new TGeoTube(
"tpcihs4", 0.0, 2.38, 0.1);
2403 Double_t pointstrap[16];
2404 pointstrap[0] = 0.0;
2405 pointstrap[1] = 0.0;
2406 pointstrap[2] = 0.0;
2407 pointstrap[3] = 1.08;
2408 pointstrap[4] = 2.3;
2409 pointstrap[5] = 1.08;
2410 pointstrap[6] = 3.38;
2411 pointstrap[7] = 0.0;
2412 pointstrap[8] = 0.0;
2413 pointstrap[9] = 0.0;
2414 pointstrap[10] = 0.0;
2415 pointstrap[11] = 1.08;
2416 pointstrap[12] = 2.3;
2417 pointstrap[13] = 1.08;
2418 pointstrap[14] = 3.38;
2419 pointstrap[15] = 0.0;
2421 auto* tpcihs5 =
new TGeoArb8(
"tpcihs5", 0.6, pointstrap);
2438 auto* trans2 =
new TGeoTranslation(
"trans2", 0.0, 2.84, 2.25);
2439 trans2->RegisterYourself();
2440 auto* trans3 =
new TGeoTranslation(
"trans3", 0.0, 2.84, -2.25);
2441 trans3->RegisterYourself();
2445 new TGeoCompositeShape(
"tpcihs6",
"tpcihs1-(tpcihs2+tpcihs3)-(tpcihs4:trans2)-(tpcihs4:trans3)-(cutil1:cutil1_tr)");
2449 auto* tpcihss =
new TGeoVolume(
"TPC_IHSS", tpcihs6, m6);
2450 auto* tpcihst =
new TGeoVolume(
"TPC_IHSTR", tpcihs5, m6);
2452 auto* rot111 =
new TGeoRotation();
2453 rot111->RotateY(180.0);
2455 auto* tpcihs =
new TGeoVolumeAssembly(
"TPC_IHS");
2456 tpcihs->AddNode(tpcihss, 1);
2457 tpcihs->AddNode(tpcihst, 1,
new TGeoTranslation(-4.7, 0.66, 0.0));
2458 tpcihs->AddNode(tpcihst, 2,
new TGeoCombiTrans(4.7, 0.66, 0.0, rot111));
2462 new TGeoBBox(
"tpcirh1", 4.7, 1.33, 0.5);
2466 new TGeoBBox(
"tpcirh2", 1.05, 0.8, 0.5, shift1);
2470 new TGeoBBox(
"tpcirh3", 1.05, 0.8, 0.5, shift1);
2474 new TGeoBBox(
"tpcirh4", 1.9, 0.25, 0.5, shift1);
2475 new TGeoTube(
"tpcirh5", 0, 1.9, 5);
2477 auto* trans4 =
new TGeoTranslation(
"trans4", 0, 0.83, 0.0);
2478 trans4->RegisterYourself();
2480 auto* tpcirh6 =
new TGeoCompositeShape(
"tpcirh6",
"tpcirh1-tpcirh2-tpcirh3-(tpcirh5:trans4)-tpcirh4");
2484 auto* tpcirh =
new TGeoVolume(
"TPC_IRH", tpcirh6, m6);
2488 TGeoVolume* tpciclamp =
new TGeoVolumeAssembly(
"TPC_ICLP");
2489 tpciclamp->AddNode(tpcihs, 1);
2490 tpciclamp->AddNode(tpcirh, 1,
new TGeoTranslation(0, 1.99, 1.1));
2491 tpciclamp->AddNode(tpcirh, 2,
new TGeoTranslation(0, 1.99, -1.1));
2495 auto* inplug =
new TGeoPcon(
"inplug", 0.0, 360.0, 13);
2497 inplug->DefineSection(0, 0.3, 0.0, 2.2);
2498 inplug->DefineSection(1, 0.6, 0.0, 2.2);
2500 inplug->DefineSection(2, 0.6, 0.0, 1.75);
2501 inplug->DefineSection(3, 0.7, 0.0, 1.75);
2503 inplug->DefineSection(4, 0.7, 1.55, 1.75);
2504 inplug->DefineSection(5, 1.6, 1.55, 1.75);
2506 inplug->DefineSection(6, 1.6, 1.55, 2.2);
2507 inplug->DefineSection(7, 1.875, 1.55, 2.2);
2509 inplug->DefineSection(8, 2.47, 1.75, 2.2);
2511 inplug->DefineSection(9, 2.47, 1.75, 2.08);
2512 inplug->DefineSection(10, 2.57, 1.8, 2.08);
2514 inplug->DefineSection(11, 2.57, 1.92, 2.08);
2515 inplug->DefineSection(12, 2.95, 1.92, 2.08);
2521 new TGeoBBox(
"pcuti", 1.5, 0.11, 1.075, shift1);
2523 auto* inplleft =
new TGeoCompositeShape(
"inplleft",
"inplug-pcuti");
2524 auto* tpcinlplug =
new TGeoVolume(
"TPC_INPLL", inplleft, m6);
2528 TGeoVolume* tpcihpl =
new TGeoVolumeAssembly(
"TPC_IHPL");
2529 tpcihpl->AddNode(tpcinlplug, 1);
2530 tpcihpl->AddNode(tpcinlplug, 2,
ref);
2531 tpcihpl->AddNode(tpciclamp, 1,
new TGeoTranslation(0.0, -2.765, 0.0));
2537 pointstrap[0] = 0.0;
2538 pointstrap[1] = 0.0;
2539 pointstrap[2] = 0.0;
2540 pointstrap[3] = 2.8;
2541 pointstrap[4] = 3.1;
2542 pointstrap[5] = 2.8 - 3.1 * TMath::Tan(15. * TMath::DegToRad());
2543 pointstrap[6] = 3.1;
2544 pointstrap[7] = 0.0;
2545 pointstrap[8] = 0.0;
2546 pointstrap[9] = 0.0;
2547 pointstrap[10] = 0.0;
2548 pointstrap[11] = 2.8;
2549 pointstrap[12] = 3.1;
2550 pointstrap[13] = 2.8 - 3.1 * TMath::Tan(15. * TMath::DegToRad());
2551 pointstrap[14] = 3.1;
2552 pointstrap[15] = 0.0;
2554 auto* tpcomh1 =
new TGeoArb8(
"tpcomh1", 1.05, pointstrap);
2555 auto* tpcomh2 =
new TGeoBBox(
"tpcomh2", 0.8, 1.4, 6);
2557 auto* tpcomh1v =
new TGeoVolume(
"TPC_OMH1", tpcomh1, m7);
2558 auto* tpcomh2v =
new TGeoVolume(
"TPC_OMH2", tpcomh2, m7);
2560 TGeoVolume* tpcomh3v =
new TGeoVolumeAssembly(
"TPC_OMH3");
2561 tpcomh3v->AddNode(tpcomh1v, 1,
new TGeoTranslation(0.8, -1.4, 4.95));
2562 tpcomh3v->AddNode(tpcomh1v, 2,
new TGeoTranslation(0.8, -1.4, -4.95));
2563 tpcomh3v->AddNode(tpcomh2v, 1);
2569 new TGeoBBox(
"tpcomh3", 1.65, 1.15, 3.4);
2570 auto* tpcomh4 =
new TGeoBBox(
"tpcomh4", 0.75, 0.7, 3.4, shift1);
2579 n[1] = -1.0 * TMath::Tan(30. * TMath::DegToRad());
2591 n[1] = -1.0 * TMath::Tan(30. * TMath::DegToRad());
2602 n[0] = 1.0 * TMath::Tan(75. * TMath::DegToRad());
2614 n[0] = 1.0 * TMath::Tan(75 * TMath::DegToRad());
2627 n[1] = -1.0 * TMath::Tan(20. * TMath::DegToRad());
2632 auto* tpcomh5 =
new TGeoCompositeShape(
"tpcomh5",
"tpcomh3-(cutomh1:cutomh1_tr)-(cutomh2:cutomh2_tr)-(cutomh3:cutomh3_tr)-(cutomh4:cutomh4_tr)-(cutomh5:cutomh5_tr)");
2634 auto* tpcomh5v =
new TGeoVolume(
"TPC_OMH5", tpcomh5, m6);
2635 auto* tpcomh4v =
new TGeoVolume(
"TPC_OMH6", tpcomh4, m6);
2637 auto* tpcomh7v =
new TGeoVolumeAssembly(
"TPC_OMH7");
2638 tpcomh7v->AddNode(tpcomh5v, 1);
2639 tpcomh7v->AddNode(tpcomh4v, 1);
2643 auto* tpcomh =
new TGeoVolumeAssembly(
"TPC_OMH");
2644 tpcomh->AddNode(tpcomh3v, 1,
new TGeoTranslation(1.5, 0., 0.));
2645 tpcomh->AddNode(tpcomh3v, 2,
new TGeoCombiTrans(-1.5, 0., 0., rot111));
2646 tpcomh->AddNode(tpcomh7v, 1,
new TGeoTranslation(0.65 + 1.5, 2.55, 0.0));
2647 tpcomh->AddNode(tpcomh7v, 2,
new TGeoCombiTrans(-0.65 - 1.5, 2.55, 0.0, rot111));
2651 new TGeoBBox(
"tpcohs1", 3.8, 0.675, 2.35);
2657 new TGeoBBox(
"tpcohs2", 1.5, 0.5, 2.35, shift1);
2658 new TGeoBBox(
"tpcohs3", 3.8, 0.5, 0.85, shift1);
2664 auto* tpcohs4 =
new TGeoBBox(
"tpsohs4", 3.1, 0.5, 0.7, shift1);
2666 auto* tpcohs4v =
new TGeoVolume(
"TPC_OHS4", tpcohs4, m6);
2678 auto* tpcohs5 =
new TGeoCompositeShape(
"tpcohs5",
"tpcohs1-tpcohs2-tpcohs3-(cutohs1:cutohs1_tr)");
2679 auto* tpcohs5v =
new TGeoVolume(
"TPC_OHS5", tpcohs5, m6);
2681 auto* tpcohs =
new TGeoVolumeAssembly(
"TPC_OHS");
2682 tpcohs->AddNode(tpcohs5v, 1);
2683 tpcohs->AddNode(tpcohs4v, 1);
2690 new TGeoBBox(
"tpcorh1", 3.1, 1.825, 0.55);
2696 new TGeoBBox(
"tpcorh2", 0.5, 2.75, 1.1, shift1);
2702 new TGeoBBox(
"tpcorh3", 0.5, 2.75, 1.1, shift1);
2708 new TGeoBBox(
"tpcorh4", 3.9, 2.75, 0.5, shift1);
2714 new TGeoBBox(
"tpcorh5", 1.95, 0.5, 1.1, shift1);
2720 new TGeoBBox(
"tpcorh6", 2.4, 0.5, 0.6, shift1);
2722 new TGeoTube(
"tpcorh7", 0, 1.95, 0.85);
2723 new TGeoTube(
"tpcorh8", 0, 2.4, 0.6);
2725 auto* trans33 =
new TGeoTranslation(
"trans33", 0.0, 0.0, 0.55);
2726 trans33->RegisterYourself();
2729 new TGeoCompositeShape(
"tpcorh9",
"tpcorh1-tpcorh2-tpcorh3-tpcorh4-tpcorh5-tpcorh6-(tpcorh8:trans33)-tpcorh7");
2731 auto* tpcorh9v =
new TGeoVolume(
"TPC_ORH", tpcorh9, m6);
2735 auto* tpcorh =
new TGeoVolumeAssembly(
"TPC_ORH2");
2737 tpcorh->AddNode(tpcorh9v, 1,
new TGeoTranslation(0.0, 0.0, 1.25));
2738 tpcorh->AddNode(tpcorh9v, 2,
new TGeoCombiTrans(0.0, 0.0, -1.25, rot111));
2742 auto* outplug =
new TGeoPcon(
"outplug", 0.0, 360.0, 13);
2744 outplug->DefineSection(0, 0.5, 0.0, 2.2);
2745 outplug->DefineSection(1, 0.7, 0.0, 2.2);
2746 outplug->DefineSection(2, 0.7, 1.55, 2.2);
2747 outplug->DefineSection(3, 0.8, 1.55, 2.2);
2748 outplug->DefineSection(4, 0.8, 1.55, 1.75);
2749 outplug->DefineSection(5, 1.2, 1.55, 1.75);
2750 outplug->DefineSection(6, 1.2, 1.55, 2.2);
2751 outplug->DefineSection(7, 1.875, 1.55, 2.2);
2752 outplug->DefineSection(8, 2.47, 1.75, 2.2);
2753 outplug->DefineSection(9, 2.47, 1.75, 2.08);
2754 outplug->DefineSection(10, 2.57, 1.8, 2.08);
2755 outplug->DefineSection(11, 2.57, 1.92, 2.08);
2756 outplug->DefineSection(12, 2.95, 1.92, 2.08);
2762 new TGeoBBox(
"cutout", 2.5, 0.11, 1.01, shift1);
2765 auto* outplleft =
new TGeoCompositeShape(
"outplleft",
"outplug-cutout");
2766 auto* outplleftv =
new TGeoVolume(
"TPC_OPLL", outplleft, m6);
2771 auto* tpcohpl =
new TGeoVolumeAssembly(
"TPC_OHPL");
2773 tpcohpl->AddNode(outplleftv, 1);
2774 tpcohpl->AddNode(outplleftv, 2,
ref);
2775 tpcohpl->AddNode(tpcorh, 1);
2776 tpcohpl->AddNode(tpcohs, 1,
new TGeoTranslation(0.0, 3.925, 0));
2782 pointstrap[0] = 0.0;
2783 pointstrap[1] = 0.0;
2784 pointstrap[2] = 0.0;
2785 pointstrap[3] = 2.8;
2786 pointstrap[4] = 3.1;
2787 pointstrap[5] = 1.96;
2788 pointstrap[6] = 3.1;
2789 pointstrap[7] = 0.0;
2790 pointstrap[8] = 0.0;
2791 pointstrap[9] = 0.0;
2792 pointstrap[10] = 0.0;
2793 pointstrap[11] = 2.8;
2794 pointstrap[12] = 3.1;
2795 pointstrap[13] = 1.96;
2796 pointstrap[14] = 3.1;
2797 pointstrap[15] = 0.0;
2799 auto* tpcmmh1 =
new TGeoArb8(
"tpcmmh1", 1.75, pointstrap);
2800 auto* tpcmmh2 =
new TGeoBBox(
"tpcmmh2", 0.8, 1.4, 12.5);
2802 auto* tpcmmh1v =
new TGeoVolume(
"TPC_MMH1", tpcmmh1, m6);
2803 auto* tpcmmh2v =
new TGeoVolume(
"TPC_MMH2", tpcmmh2, m6);
2805 auto* tpcmmhs =
new TGeoVolumeAssembly(
"TPC_MMHS");
2806 tpcmmhs->AddNode(tpcmmh1v, 1,
new TGeoTranslation(0.8, -1.4, 10.75));
2807 tpcmmhs->AddNode(tpcmmh1v, 2,
new TGeoTranslation(0.8, -1.4, -10.75));
2808 tpcmmhs->AddNode(tpcmmh2v, 1);
2816 new TGeoBBox(
"tpcmmhc1", 1.65, 1.85, 8.9);
2817 new TGeoBBox(
"tpcmmhc2", 0.9, 0.7, 8.9, shift1);
2827 n[2] = 8.0 * TMath::Tan(13. * TMath::DegToRad());
2837 n[2] = -8.0 * TMath::Tan(13. * TMath::DegToRad());
2847 n[2] = 6.1 * TMath::Tan(20. * TMath::DegToRad());
2857 n[2] = -6.1 * TMath::Tan(20 * TMath::DegToRad());
2865 n[0] = 2.4 * TMath::Tan(30 * TMath::DegToRad());
2875 n[0] = 2.4 * TMath::Tan(30 * TMath::DegToRad());
2882 new TGeoCompositeShape(
"TPC_MMHC",
"tpcmmhc1-tpcmmhc2-(cutmmh1:cutmmh1_tr)-(cutmmh2:cutmmh2_tr)-(cutmmh3:cutmmh3_tr)-(cutmmh4:cutmmh4_tr)-(cutmmh5:cutmmh5_tr)-(cutmmh6:cutmmh6_tr)");
2884 auto* tpcmmhcv =
new TGeoVolume(
"TPC_MMHC", tpcmmhc, m6);
2886 TGeoVolume* tpcmmh =
new TGeoVolumeAssembly(
"TPC_MMH");
2888 tpcmmh->AddNode(tpcmmhcv, 1,
new TGeoTranslation(0.65 + 1.5, 1.85, 0.0));
2889 tpcmmh->AddNode(tpcmmhcv, 2,
new TGeoCombiTrans(-0.65 - 1.5, 1.85, 0.0, rot111));
2890 tpcmmh->AddNode(tpcmmhs, 1,
new TGeoTranslation(1.5, 0.0, 0.0));
2891 tpcmmh->AddNode(tpcmmhs, 2,
new TGeoCombiTrans(-1.5, 0.0, 0.0, rot111));
2901 auto* gres1 =
new TGeoTube(0., 0.375, 125.);
2903 auto* vgres1 =
new TGeoVolume(
"TPC_GRES1", gres1, m14);
2908 xrc = 79.3 * TMath::Cos(350. * TMath::DegToRad());
2909 yrc = 79.3 * TMath::Sin(350. * TMath::DegToRad());
2911 v9->AddNode(vgres1, 1,
new TGeoTranslation(xrc, yrc, 126.9));
2912 v9->AddNode(vgres1, 2,
new TGeoTranslation(xrc, yrc, -126.9));
2914 xrc = 79.3 * TMath::Cos(190. * TMath::DegToRad());
2915 yrc = 79.3 * TMath::Sin(190. * TMath::DegToRad());
2917 v9->AddNode(vgres1, 3,
new TGeoTranslation(xrc, yrc, 126.9));
2918 v9->AddNode(vgres1, 4,
new TGeoTranslation(xrc, yrc, -126.9));
2920 TGeoRotation refl(
"refl", 90., 0., 90., 90., 180., 0.);
2921 TGeoRotation rotrod(
"rotrod");
2923 TGeoRotation* rotpos[2];
2925 TGeoRotation* rotrod1[2];
2929 auto* clampi1 =
new TGeoBBox(
"clampi1", 0.2, 3.1, 0.8);
2930 auto* clampi1v =
new TGeoVolume(
"TPC_clampi1v", clampi1, m6);
2932 pointstrap[0] = 0.49;
2933 pointstrap[1] = 0.375;
2935 pointstrap[2] = 0.49;
2936 pointstrap[3] = -0.375;
2938 pointstrap[4] = -0.49;
2939 pointstrap[5] = -0.375;
2941 pointstrap[6] = -0.49;
2942 pointstrap[7] = 1.225;
2944 pointstrap[8] = 0.49;
2945 pointstrap[9] = 0.375;
2947 pointstrap[10] = 0.49;
2948 pointstrap[11] = -0.375;
2950 pointstrap[12] = -0.49;
2951 pointstrap[13] = -0.375;
2953 pointstrap[14] = -0.49;
2954 pointstrap[15] = 1.225;
2956 auto* clitrap =
new TGeoArb8(
"clitrap", 0.25, pointstrap);
2957 auto* clitrapv =
new TGeoVolume(
"TPC_clitrapv", clitrap, m6);
2959 auto* clamprot =
new TGeoRotation();
2960 clamprot->RotateX(180.);
2962 new TGeoBBox(
"clibox", 1.125, 3.1, .1);
2963 new TGeoTube(
"clitub", 0., 2.2, 0.1);
2967 auto* clitr1 =
new TGeoTranslation(
"clitr1", 1.125, 0., 0.);
2968 clitr1->RegisterYourself();
2969 auto* clihold =
new TGeoCompositeShape(
"clihold",
"clibox-clitub:clitr1");
2970 auto* cliholdv =
new TGeoVolume(
"TPC_cliholdv", clihold, m6);
2974 TGeoVolume* iclamp =
new TGeoVolumeAssembly(
"TPC_iclamp");
2976 iclamp->AddNode(clampi1v, 1);
2977 iclamp->AddNode(clitrapv, 1,
new TGeoTranslation(0.69, -2.725, 0.35));
2978 iclamp->AddNode(clitrapv, 2,
new TGeoTranslation(0.69, -2.725, -0.35));
2979 iclamp->AddNode(clitrapv, 3,
new TGeoCombiTrans(0.69, 2.725, 0.35, clamprot));
2980 iclamp->AddNode(clitrapv, 4,
new TGeoCombiTrans(0.69, 2.725, -0.35, clamprot));
2981 iclamp->AddNode(cliholdv, 1,
new TGeoTranslation(1.325, 0., 0.));
2985 auto* clampo1 =
new TGeoBBox(
"clampo1", 0.25, 3.1, 1.);
2986 auto* clampo2 =
new TGeoBBox(
"clampo2", 0.4, 0.85, 1.);
2988 auto* clampo1v =
new TGeoVolume(
"TPC_clampo1v", clampo1, m6);
2989 auto* clampo2v =
new TGeoVolume(
"TPC_clampo2v", clampo2, m6);
2991 auto* oclamp =
new TGeoVolumeAssembly(
"TPC_oclamp");
2993 oclamp->AddNode(clampo1v, 1);
2995 oclamp->AddNode(clampo2v, 1,
new TGeoTranslation(0.65, -2.25, 0));
2996 oclamp->AddNode(clampo2v, 2,
new TGeoTranslation(0.65, 2.25, 0));
2999 pointstrap[0] = 0.375;
3000 pointstrap[1] = 0.75;
3001 pointstrap[2] = 0.375;
3002 pointstrap[3] = -0.35;
3003 pointstrap[4] = -0.375;
3004 pointstrap[5] = -0.35;
3005 pointstrap[6] = -0.375;
3006 pointstrap[7] = 0.35;
3008 pointstrap[8] = 0.375;
3009 pointstrap[9] = 0.75;
3010 pointstrap[10] = 0.375;
3011 pointstrap[11] = -0.35;
3012 pointstrap[12] = -0.375;
3013 pointstrap[13] = -0.35;
3014 pointstrap[14] = -0.375;
3015 pointstrap[15] = 0.35;
3017 auto* clotrap =
new TGeoArb8(
"clotrap", 0.25, pointstrap);
3018 auto* clotrapv =
new TGeoVolume(
"TPC_clotrapv", clotrap, m6);
3020 oclamp->AddNode(clotrapv, 1,
new TGeoTranslation(-0.625, -2.75, 0.35));
3021 oclamp->AddNode(clotrapv, 2,
new TGeoTranslation(-0.625, -2.75, -0.35));
3022 oclamp->AddNode(clotrapv, 3,
new TGeoCombiTrans(-0.625, 2.75, 0.35, clamprot));
3023 oclamp->AddNode(clotrapv, 4,
new TGeoCombiTrans(-0.625, 2.75, -0.35, clamprot));
3025 auto* clampo3 =
new TGeoBBox(
"clampo3", 1.6, 0.45, .1);
3026 auto* clampo3v =
new TGeoVolume(
"TPC_clampo3v", clampo3, m6);
3028 oclamp->AddNode(clampo3v, 1,
new TGeoTranslation(-1.85, 2.625, 0.));
3029 oclamp->AddNode(clampo3v, 2,
new TGeoTranslation(-1.85, -2.625, 0));
3031 auto* clampo4 =
new TGeoTubeSeg(
"clampo4", 2.2, 3.1, 0.1, 90., 270.);
3032 auto* clampo4v =
new TGeoVolume(
"TPC_clampo4v", clampo4, m6);
3034 oclamp->AddNode(clampo4v, 1,
new TGeoTranslation(-3.45, 0., 0.));
3038 TGeoRotation rot102(
"rot102");
3039 rot102.RotateY(-90.);
3041 for (Int_t
i = 0;
i < 18;
i++) {
3044 angle = TMath::DegToRad() * 20. * (Double_t)
i;
3050 auto* rot12 =
new TGeoRotation();
3051 rot12->RotateZ(-90.0 +
i * 20.);
3052 v9->AddNode(tpcihpl,
i + 1,
new TGeoCombiTrans(
x,
y, 0., rot12));
3055 rotrod.RotateZ(-90. +
i * 20.);
3056 rotrod1[0] =
new TGeoRotation();
3057 rotpos[0] =
new TGeoRotation();
3059 rotrod1[0]->RotateZ(90. +
i * 20.);
3060 *rotpos[0] = refl * rotrod;
3061 v9->AddNode(tpcrrod, 1,
new TGeoCombiTrans(
x,
y,
z, rotrod1[0]));
3062 v9->AddNode(tpcrrod, 2,
new TGeoCombiTrans(
x,
y, -
z, rotpos[0]));
3064 v9->AddNode(tpcmrod,
i + 1,
new TGeoTranslation(
x,
y,
z));
3065 v9->AddNode(tpcmrod,
i + 19,
new TGeoCombiTrans(
x,
y, -
z,
ref));
3073 rot12 =
new TGeoRotation();
3074 rot12->RotateZ(
i * 20.);
3077 v9->AddNode(iclamp, 7 *
i + 1,
new TGeoCombiTrans(
x,
y, 5.25, rot12));
3078 v9->AddNode(iclamp, 7 *
i + 2,
new TGeoCombiTrans(
x,
y, 38.25, rot12));
3079 v9->AddNode(iclamp, 7 *
i + 3,
new TGeoCombiTrans(
x,
y, 80.25, rot12));
3080 v9->AddNode(iclamp, 7 *
i + 4,
new TGeoCombiTrans(
x,
y, 122.25, rot12));
3081 v9->AddNode(iclamp, 7 *
i + 5,
new TGeoCombiTrans(
x,
y, 164.25, rot12));
3082 v9->AddNode(iclamp, 7 *
i + 6,
new TGeoCombiTrans(
x,
y, 206.25, rot12));
3083 v9->AddNode(iclamp, 7 *
i + 7,
new TGeoCombiTrans(
x,
y, 246.75, rot12));
3085 v9->AddNode(iclamp, 7 *
i + 127,
new TGeoCombiTrans(
x,
y, -5.25, rot12));
3086 v9->AddNode(iclamp, 7 *
i + 128,
new TGeoCombiTrans(
x,
y, -38.25, rot12));
3087 v9->AddNode(iclamp, 7 *
i + 129,
new TGeoCombiTrans(
x,
y, -80.25, rot12));
3088 v9->AddNode(iclamp, 7 *
i + 130,
new TGeoCombiTrans(
x,
y, -122.25, rot12));
3089 v9->AddNode(iclamp, 7 *
i + 131,
new TGeoCombiTrans(
x,
y, -164.25, rot12));
3090 v9->AddNode(iclamp, 7 *
i + 132,
new TGeoCombiTrans(
x,
y, -206.25, rot12));
3091 v9->AddNode(iclamp, 7 *
i + 133,
new TGeoCombiTrans(
x,
y, -246.75, rot12));
3103 auto* rot33 =
new TGeoRotation();
3104 rot33->RotateZ(-90 +
i * 20.);
3106 v9->AddNode(tpcohpl,
i + 1,
new TGeoCombiTrans(
x,
y, 0., rot33));
3108 Double_t xxx = 256.297 * TMath::Cos((
i * 20. + 10.) * TMath::DegToRad());
3109 Double_t yyy = 256.297 * TMath::Sin((
i * 20. + 10.) * TMath::DegToRad());
3111 TGeoRotation rot101(
"rot101");
3112 rot101.RotateZ(90. +
i * 20. + 10.);
3113 auto* rot103 =
new TGeoRotation(
"rot103");
3114 *rot103 = rot101 * rot102;
3116 auto* trh100 =
new TGeoCombiTrans(xxx, yyy, 0., rot103);
3120 v9->AddNode(tpcmmh, 1, trh100);
3123 v9->AddNode(tpcomh,
i + 1, trh100);
3128 rotrod.RotateZ(90. +
i * 20.);
3129 rotrod1[1] =
new TGeoRotation();
3130 rotpos[1] =
new TGeoRotation();
3131 rotrod1[1]->RotateZ(90. +
i * 20.);
3132 *rotpos[1] = refl * rotrod;
3133 v9->AddNode(tpcrrod, 3,
new TGeoCombiTrans(
x,
y,
z, rotrod1[1]));
3134 v9->AddNode(tpcrrod, 4,
new TGeoCombiTrans(
x,
y, -
z, rotpos[1]));
3136 v9->AddNode(tpcmrod,
i + 37,
new TGeoTranslation(
x,
y,
z));
3137 v9->AddNode(tpcmrod,
i + 55,
new TGeoCombiTrans(
x,
y, -
z,
ref));
3140 v9->AddNode(hvrv, 1,
new TGeoTranslation(
x,
y,
z + 0.7));
3148 rot12 =
new TGeoRotation();
3149 rot12->RotateZ(
i * 20.);
3152 v9->AddNode(oclamp, 7 *
i + 1,
new TGeoCombiTrans(
x,
y, 5.25, rot12));
3153 v9->AddNode(oclamp, 7 *
i + 2,
new TGeoCombiTrans(
x,
y, 38.25, rot12));
3154 v9->AddNode(oclamp, 7 *
i + 3,
new TGeoCombiTrans(
x,
y, 80.25, rot12));
3155 v9->AddNode(oclamp, 7 *
i + 4,
new TGeoCombiTrans(
x,
y, 122.25, rot12));
3156 v9->AddNode(oclamp, 7 *
i + 5,
new TGeoCombiTrans(
x,
y, 164.25, rot12));
3157 v9->AddNode(oclamp, 7 *
i + 6,
new TGeoCombiTrans(
x,
y, 206.25, rot12));
3158 v9->AddNode(oclamp, 7 *
i + 7,
new TGeoCombiTrans(
x,
y, 246.75, rot12));
3160 v9->AddNode(oclamp, 7 *
i + 127,
new TGeoCombiTrans(
x,
y, -5.25, rot12));
3161 v9->AddNode(oclamp, 7 *
i + 128,
new TGeoCombiTrans(
x,
y, -38.25, rot12));
3162 v9->AddNode(oclamp, 7 *
i + 129,
new TGeoCombiTrans(
x,
y, -80.25, rot12));
3163 v9->AddNode(oclamp, 7 *
i + 130,
new TGeoCombiTrans(
x,
y, -122.25, rot12));
3164 v9->AddNode(oclamp, 7 *
i + 131,
new TGeoCombiTrans(
x,
y, -164.25, rot12));
3165 v9->AddNode(oclamp, 7 *
i + 132,
new TGeoCombiTrans(
x,
y, -206.25, rot12));
3166 v9->AddNode(oclamp, 7 *
i + 133,
new TGeoCombiTrans(
x,
y, -246.75, rot12));
3170 TGeoVolume* alice = gGeoManager->GetVolume(
"barrel");
3171 alice->AddNode(
v1, 1,
new TGeoTranslation(0., 30., 0.));
3175void Detector::LoadGeometryFromFile()
3178 if (mGeoFileName.IsNull()) {
3179 LOG(fatal) <<
"TPC geometry file name not set";
3183 TFile* fGeoFile = TFile::Open(mGeoFileName);
3184 if (!fGeoFile || !fGeoFile->IsOpen() || fGeoFile->IsZombie()) {
3185 LOG(fatal) <<
"Could not open TPC geometry file '" << mGeoFileName <<
"'";
3189 TGeoVolume* tpcVolume =
dynamic_cast<TGeoVolume*
>(fGeoFile->Get(
"TPC_M"));
3191 LOG(fatal) <<
"Could not retrieve TPC geometry from file '" << mGeoFileName <<
"'";
3195 LOG(info) <<
"Loaded TPC geometry from file '" << mGeoFileName <<
"'";
3196 TGeoVolume* alice = gGeoManager->GetVolume(
"barrel");
3197 alice->AddNode(tpcVolume, 1,
new TGeoTranslation(0., 30., 0.));
3200void Detector::defineSensitiveVolumes()
3202 TGeoManager* geoManager = gGeoManager;
3203 TGeoVolume*
v =
nullptr;
3207 const Int_t nSensitive = 1;
3208 const char* volumeNames[nSensitive] = {
"TPC_Drift"};
3211 for (Int_t ivol = 0; ivol < nSensitive; ++ivol) {
3212 TString volumeName = volumeNames[ivol];
3213 v = geoManager->GetVolume(volumeName.Data());
3215 LOG(
error) <<
"Could not find volume '" << volumeName <<
"'";
3224 auto vmc = TVirtualMC::GetMC();
3225 if (strcmp(vmc->GetName(),
"TFluka") == 0) {
3226 LOG(info) <<
"Setting special FLUKA parameters for TPC Driftgas";
3228 Int_t
index = mgr.getMediumID(
"TPC", kDriftGas2);
3229 vmc->Gstpar(
index,
"PRIMIO_E", 20.77);
3230 vmc->Gstpar(
index,
"PRIMIO_N", 14.35);
3231 vmc->Gstpar(
index,
"LOSS", 14);
3232 vmc->Gstpar(
index,
"STRA", 4);
3238 static thread_local Double_t
n = 0;
3239 static thread_local Double_t c1 = 0;
3240 static thread_local Double_t c2 = 0;
3241 static thread_local Double_t b1 = 0;
3242 static thread_local Double_t b2 = 0;
3246 }
else if (k >= 0.4 && k < 4) {
3247 n = 1. / k + (k - 0.4) / k / 3.6;
3248 }
else if (k >= 4.) {
3249 n = 1. / TMath::Sqrt(k);
3253 c1 = (k < 0.4) ? 0 : b1 * (TMath::Log(b1) - 1.) / 2.;
3254 c2 = b2 * (TMath::Log(b2) - 1.) / 2.;
3261 Double_t w1 = c1 + TMath::Log(nu1);
3262 Double_t w2 = c2 + TMath::Log(nu2);
3263 y =
n * (b1 * w2 - b2 * w1);
3268 if (TMath::Log(
y) >=
x) {
3272 return TMath::Exp(
x);
3279 name.Form(
"%sHitsShiftedSector%d", GetName(), probe);
3280 return std::string(
name.Data());
3282 return std::string();
3288 auto const& detParam = ParameterDetector::Instance();
3289 LOG(info) <<
"TPC SetSpecialPhysicsCuts: UseGeant4Edep=" << detParam.UseGeant4Edep;
3290 if (detParam.UseGeant4Edep) {
3292 const float specialCut = detParam.SpecialCutsGeV;
3293 for (
int med : {(int)kDriftGas1, (
int)kDriftGas2, (int)kCO2}) {