4 #include "INDRAGeometryBuilder.h"
17 #include "KVDataSet.h"
59 TString alt_dataset = GetDataSetEnv(fDataSet,
"INDRA.StructureFile",
"");
60 if(alt_dataset==
"") alt_dataset=fDataSet;
64 Info(
"read_indra_struct_file",
"Reading INDRA structure from file : %s", path.Data());
65 fStrucInfos.ReadFile(path,
kEnvAll);
67 auto run_index_multiplier = GetDataSetEnv(alt_dataset,
"DataSet.RunFileIndexMultiplier.raw", 1);
70 KVString lruns = fStrucInfos.GetValue(
"AddOnForRuns",
"");
73 while (!lruns.
End()) {
77 if (nlr.
Contains(fCurrentRun*run_index_multiplier))
79 path = fStrucInfos.GetValue(sruns.
Data(),
"");
80 Info(
"BuildGeometry",
"Additional geometry for run=%d in file #%s#", fCurrentRun, path.Data());
88 SetName(fStrucInfos.GetValue(
"INDRA.Name",
""));
89 SetTitle(fStrucInfos.GetValue(
"INDRA.Title",
""));
91 KVString layers = fStrucInfos.GetValue(
"INDRA.Layers",
"");
93 while (!layers.
End()) read_layer_infos(layers.
Next());
106 Int_t number = fStrucInfos.GetValue(
Form(
"INDRA.Layer.%s.Number",
name), 0);
107 Info(
"read_layer_infos",
"Building layer %d:%s", number,
name);
110 while (!rings.
End()) {
113 read_ring_infos(ring_num, prefix);
126 Info(
"read_ring_infos",
"Building ring %d (%s)", ring_number, prefix);
128 Int_t ntel = fStrucInfos.GetValue(
Form(
"%s.Ntel", prefix), 0);
129 Int_t step = fStrucInfos.GetValue(
Form(
"%s.Step", prefix), 1);
130 Int_t num_first = fStrucInfos.GetValue(
Form(
"%s.Nfirst", prefix), 1);
131 Double_t thmin = fStrucInfos.GetValue(
Form(
"%s.ThMin", prefix), 0.0);
132 Double_t thmax = fStrucInfos.GetValue(
Form(
"%s.ThMax", prefix), 0.0);
133 Double_t phi_0 = fStrucInfos.GetValue(
Form(
"%s.Phi0", prefix), 0.0);
134 Double_t dphi = fStrucInfos.GetValue(
Form(
"%s.Dphi", prefix), -1.0);
135 dphi = (dphi < 0. ? 360. / ntel : dphi);
139 UInt_t counter = num_first;
140 auto det_props = read_telescope_infos(prefix, ring_number, counter, ntel, thmin, thmax, phi);
142 for (
int i = 0; i < ntel; i++) {
144 for (
auto&
d : det_props) detector_map[
d.name] =
d;
146 phi = (phi + dphi > 360. ? (phi + dphi - 360.) : (phi + dphi));
148 if (i + 1 < ntel) det_props = read_telescope_infos(prefix, ring_number, counter, ntel, thmin, thmax, phi);
157 std::vector<INDRAGeometryBuilder::detector_properties>
160 double thmin,
double thmax,
double phi)
164 KVString telescopes = fStrucInfos.GetValue(
Form(
"%s.Telescope", prefix),
"");
165 telescopes.
Begin(
" ");
167 while (!telescopes.
End()) {
169 KVNumberList mods = fStrucInfos.GetValue(
Form(
"%s.Telescope.%s.Modules", prefix,
name.Data()),
"1-100");
173 KVString detectors = fStrucInfos.GetValue(
Form(
"INDRA.Telescope.%s.Detectors",
name.Data()),
"");
174 double aziwidth = fStrucInfos.GetValue(
Form(
"INDRA.Telescope.%s.AziWidth",
name.Data()), 0.0);
175 double phimin = phi-0.5*aziwidth;
176 double phimax = phi+0.5*aziwidth;
178 detectors.
Begin(
" ");
180 std::vector<detector_properties> det_props;
181 while (!detectors.
End()) {
187 if (dettype ==
"PHOS") fWithPhoswich =
kTRUE;
190 if (dettype ==
"SILI" || dettype ==
"SI75")
191 det_props.push_back(
detector_properties{
Form(
"%s_%02d", dettype.
Data(), ring), detthick, ring, 0, {thmin, thmax}, {phimin, phimax},
true});
192 else if (dettype ==
"PHOS") {
196 det_props.push_back(
detector_properties{
Form(
"%s_%02d", dettype.
Data(), module), detthick, 1, module, {thmin, thmax}, {phimin, phimax},
true});
198 else if (dettype ==
"SI")
200 det_props.push_back(
detector_properties{
Form(
"%s_%02d%02d", dettype.
Data(), ring, module), detthick *
KVUnits::um, ring, module, {thmin, thmax}, {phimin, phimax},
true});
202 det_props.push_back(
detector_properties{
Form(
"%s_%02d%02d", dettype.
Data(), ring, module), detthick, ring, module, {thmin, thmax}, {phimin, phimax},
true});
223 for (
int i = 0; i < 8; i++) {
225 offY += coo[2 * i + 1];
229 for (
int i = 0; i < 8; i++) {
231 coo[2 * i + 1] -= offY;
241 : fDataSet(_data_set), fCurrentRun(current_run)
265 for (
int i = 0; i < 4; i++) {
266 Double_t rap = (planeDist + depth) / planeDist;
267 backcoords[i] = rap * frontcoords[i];
304 for (
int i = 0; i <= 3; i++) {
324 for (
int i = 0; i <= 3; i++) {
358 auto nlay = infos.
GetValue(
"LAYERS", 1);
361 for (
int lay = 1; lay <= nlay; ++lay) {
364 auto gas_pressure = infos.
GetValue(
Form(
"LAYER.%d.PRESSURE", lay), -1.0);
365 if (gas_pressure > 0) mat->SetPressure(gas_pressure *
KVUnits::torr);
366 auto thick = infos.
GetValue(
Form(
"LAYER.%d.THICK", lay), -1.0);
367 if (thick > 0) mat->SetThickness(thick *
KVUnits::cm);
368 auto dens = infos.
GetValue(
Form(
"LAYER.%d.DENSITY", lay), -1.0);
384 printf(
"Total thickness : %f cm\n",
fCurrentDetector.GetTotalThicknessInCM());
385 printf(
"Frame centre:\n");
387 printf(
"Inner centre:\n");
389 printf(
"Outer centre: \n");
391 printf(
"Coordinates of outer pads :\n");
393 printf(
"Coordinates of inner pads :\n");
423 for (
int i = 0; i < 8; i++) {
424 vertices[2 * i] = corners[i].
X();
425 vertices[2 * i + 1] = corners[i].
Y();
430 vol_name.
Form(
"STRUCT_%s_%02d", det_type.
Data(), ring_num);
433 vol_name.
Form(
"DEADZONE_%s_%02d", det_type.
Data(), ring_num);
459 for (
int i = 0; i < 4; i++) {
460 ownframe[i] = rot_to_frame * orig[i] - displZ;
489 det->second.thick = thickness;
492 Warning(
"SetDetectorThickness",
"New thickness value %f given for %s,"
493 " but detector is apparently absent from geometry?",
494 thickness, detname.
Data());
544 Info(
"CheckDetectorPresent",
"%s - present:%d thick:%f",
548 return (it !=
detector_map.end()) && it->second.present;
561 if (!strcmp(det,
"PHOS"))
582 for (i = 1; i <=
Ndets; i++) {
583 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
591 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
596 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
604 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
611 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, outerMod);
617 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, outerMod);
627 Info(
"MakeRing",
"Detector type %s ring number %d : ABSENT", det, ring);
630 Info(
"MakeRing",
"Detector type %s ring number %d : %d/%d detectors present", det, ring, npresent, ntotal);
635 bool made_prototype_block{
false};
637 for (i = 1; i <=
Ndets; i++) {
642 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
646 npresent += (
Int_t)first_is_present;
648 if (first_is_present) {
660 made_prototype_block =
false;
668 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
673 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
681 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, innerMod);
688 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, outerMod);
694 if (!strcmp(det,
"PHOS"))
fDetName.
Form(
"%s_%02d", det, outerMod);
702 if (!npresent)
Info(
"MakeRing",
"\tBlock %d: ABSENT", i);
703 else if (npresent < ntotal) {
704 Info(
"MakeRing",
"\tBlock %d: %d/%d detectors present", i, npresent, ntotal);
705 Info(
"MakeRing",
"\tCASE NOT TREATED. ALL DETECTORS PRESENT.");
709 if (!made_prototype_block) {
711 made_prototype_block =
true;
713 Info(
"MakeRing",
"DET:%s RING:%d Making new prototype group for i=%d/%d",
714 det, ring, i,
Ndets);
760 if (((ring > 9 && ring < 13) && i == 1) || (ring > 12 && i == 2)) {
794 if (thick > 0.0) ++no_abs;
796 multi_layer = (no_abs > 1);
802 TVector3 frontPlane[4], backPlane[4], frontCentre, backCentre;
804 for (
int i = 0; i < 4; i++) frontPlane[i] = som[i];
834 for (
int i = 0; i < 8; i++) {
835 vertices[2 * i] = corners[i].
X();
836 vertices[2 * i + 1] = corners[i].
Y();
843 else vol_name =
Form(
"%s_%d_%s", det, no_abs,
abs->GetName());
846 vol_name =
Form(
"DET_%s", det);
854 Double_t trans_z = -fTotalThickness / 2. + depth_in_det + dz;
864 depth_in_det += thick;
868 for (
int i = 0; i < 4; i++) frontPlane[i] = backPlane[i];
869 frontCentre = backCentre;
894 TVector3 a10 = corners[1] - corners[0];
895 TVector3 a21 = corners[2] - corners[1];
931 corners[3] =
l * (d0 / (
l * normal));
933 corners[2] =
l * (d0 / (
l * normal));
935 corners[1] =
l * (d0 / (
l * normal));
937 corners[0] =
l * (d0 / (
l * normal));
946 std::vector<std::vector<theta_phi>> CSI_COORDS = {
948 { {2.40628, 30}, {2.40628, 60}, {2.40628, 90}, {2.40628, 120}, {2.40628, 150}, {2.40628, 180}, {2.40628, 210}, {2.40628, 240},
949 {2.40628, 270}, {2.40628, 300}, {2.40628, 330}, {2.40628, 0}
952 { {3.59843, 30}, {3.59843, 60}, {3.59843, 90}, {3.59843, 120},
953 {3.59843, 150}, {3.59843, 180}, {3.59843, 210}, {3.59843, 240}, {3.59843, 270}, {3.59843, 300}, {3.59843, 330}, {3.59843, 0}
956 { {5.6605, 20.427}, {5.6605, 39.573}, {5.6605, 50.427}, {5.6605, 69.573}, {5.6605, 80.427}, {5.6605, 99.573}, {5.6605, 110.427},
957 {5.6605, 129.573}, {5.6605, 140.427}, {5.6605, 159.573}, {5.6605, 170.427}, {5.6605, 189.573}, {5.6605, 200.427}, {5.6605, 219.573},
958 {5.6605, 230.427}, {5.6605, 249.573}, {5.6605, 260.427}, {5.6605, 279.573}, {5.6605, 290.427}, {5.6605, 309.573}, {5.6605, 320.427},
959 {5.6605, 339.573}, {5.6605, 350.427}, {5.6605, 9.57299}
962 { {8.23882, 20.2681}, {8.23882, 39.7319}, {8.23882, 50.2681}, {8.23882, 69.7319},
963 {8.23882, 80.2681}, {8.23882, 99.7319}, {8.23882, 110.268}, {8.23882, 129.732}, {8.23882, 140.268}, {8.23882, 159.732},
964 {8.23882, 170.268}, {8.23882, 189.732}, {8.23882, 200.268}, {8.23882, 219.732}, {8.23882, 230.268}, {8.23882, 249.732},
965 {8.23882, 260.268}, {8.23882, 279.732}, {8.23882, 290.268}, {8.23882, 309.732}, {8.23882, 320.268}, {8.23882, 339.732},
966 {8.23882, 350.268}, {8.23882, 9.73186}
969 { {11.7348, 20.452}, {11.7348, 39.548}, {11.7348, 50.452}, {11.7348, 69.548}, {11.7348, 80.452},
970 {11.7348, 99.548}, {11.7348, 110.452}, {11.7348, 129.548}, {11.7348, 140.452}, {11.7348, 159.548}, {11.7348, 170.452},
971 {11.7348, 189.548}, {11.7348, 200.452}, {11.7348, 219.548}, {11.7348, 230.452}, {11.7348, 249.548}, {11.7348, 260.452},
972 {11.7348, 279.548}, {11.7348, 290.452}, {11.7348, 309.548}, {11.7348, 320.452}, {11.7348, 339.548}, {11.7348, 350.452},
976 { {16.4298, 20.1517}, {16.4298, 39.8483}, {16.4298, 50.1517}, {16.4298, 69.8483}, {16.4298, 80.1517},
977 {16.4298, 99.8483}, {16.4298, 110.152}, {16.4298, 129.848}, {16.4298, 140.152}, {16.4298, 159.848}, {16.4298, 170.152},
978 {16.4298, 189.848}, {16.4298, 200.152}, {16.4298, 219.848}, {16.4298, 230.152}, {16.4298, 249.848}, {16.4298, 260.152},
979 {16.4298, 279.848}, {16.4298, 290.152}, {16.4298, 309.848}, {16.4298, 320.152}, {16.4298, 339.848}, {16.4298, 350.152},
983 { {23.1125, 20.5305}, {23.1125, 39.4695}, {23.1125, 50.5305}, {23.1125, 69.4695}, {23.1125, 80.5305},
984 {23.1125, 99.4695}, {23.1125, 110.531}, {23.1125, 129.469}, {23.1125, 140.531}, {23.1125, 159.469}, {23.1125, 170.531},
985 {23.1125, 189.469}, {23.1125, 200.531}, {23.1125, 219.469}, {23.1125, 230.531}, {23.1125, 249.469}, {23.1125, 260.531},
986 {23.1125, 279.469}, {23.1125, 290.531}, {23.1125, 309.469}, {23.1125, 320.531}, {23.1125, 339.469}, {23.1125, 350.531},
990 { {30.1022, 20.2707}, {30.1022, 39.7293}, {30.1022, 50.2707}, {30.1022, 69.7293}, {30.1022, 80.2707},
991 {30.1022, 99.7293}, {30.1022, 110.271}, {30.1022, 129.729}, {30.1022, 140.271}, {30.1022, 159.729}, {30.1022, 170.271},
992 {30.1022, 189.729}, {30.1022, 200.271}, {30.1022, 219.729}, {30.1022, 230.271}, {30.1022, 249.729}, {30.1022, 260.271},
993 {30.1022, 279.729}, {30.1022, 290.271}, {30.1022, 309.729}, {30.1022, 320.271}, {30.1022, 339.729}, {30.1022, 350.271},
997 { {39.6964, 20.3843}, {39.6964, 39.6157}, {39.6964, 50.3843}, {39.6964, 69.6157}, {39.6964, 80.3843},
998 {39.6964, 99.6157}, {39.6964, 110.384}, {39.6964, 129.616}, {39.6964, 140.384}, {39.6964, 159.616}, {39.6964, 170.384},
999 {39.6964, 189.616}, {39.6964, 200.384}, {39.6964, 219.616}, {39.6964, 230.384}, {39.6964, 249.616}, {39.6964, 260.384},
1000 {39.6964, 279.616}, {39.6964, 290.384}, {39.6964, 309.616}, {39.6964, 320.384}, {39.6964, 339.616}, {39.6964, 350.384},
1004 { {49.4614, 20.6178}, {46., 39.3822},
1005 {49.4614, 50.6178}, {49.4614, 69.3822}, {49.4614, 80.6178},
1006 {49.4614, 99.3822}, {49.4614, 110.618}, {49.4614, 129.382}, {49.4614, 140.618}, {49.4614, 159.382}, {49.4614, 170.618},
1007 {49.4614, 189.382}, {49.4614, 200.618}, {49.4614, 219.382}, {49.4614, 230.618}, {49.4614, 249.382}, {49.4614, 260.618},
1008 {49.4614, 279.382}, {49.4614, 290.618}, {49.4614, 309.382}, {49.4614, 320.618}, {49.4614, 339.382}, {49.4614, 350.618},
1012 { {63.6629, 20.7968}, {60., 39.2032},
1013 {63.6629, 50.7968}, {63.6629, 69.2032}, {63.6629, 80.7968},
1014 {63.6629, 99.2032}, {63.6629, 110.797}, {63.6629, 129.203}, {63.6629, 140.797}, {63.6629, 159.203}, {63.6629, 170.797},
1015 {63.6629, 189.203}, {63.6629, 200.797}, {63.6629, 219.203}, {63.6629, 230.797}, {63.6629, 249.203}, {63.6629, 260.797},
1016 {63.6629, 279.203}, {63.6629, 290.797}, {63.6629, 309.203}, {63.6629, 320.797}, {63.6629, 339.203}, {63.6629, 350.797},
1020 { {79.188, 21.4427}, {75., 38.5573},
1021 {79.188, 51.4427}, {79.188, 68.5573}, {79.188, 81.4427}, {79.188, 98.5573},
1022 {79.188, 111.443}, {79.188, 128.557}, {79.188, 141.443}, {79.188, 158.557}, {79.188, 171.443}, {79.188, 188.557}, {79.188, 201.443},
1023 {79.188, 218.557}, {79.188, 231.443}, {79.188, 248.557}, {79.188, 261.443}, {79.188, 278.557}, {79.188, 291.443}, {79.188, 308.557},
1024 {79.188, 321.443}, {79.188, 338.557}, {79.188, 351.443}, {79.188, 8.55734}
1027 { {101.234, 28.5099}, {101.703, 45}, {101.234, 61.4901}, {95., 73.5099},
1028 {101.703, 90}, {101.234, 106.49}, {101.234, 118.51}, {101.703, 135}, {101.234, 151.49}, {101.234, 163.51},
1029 {101.703, 180}, {101.234, 196.49}, {101.234, 208.51}, {101.703, 225}, {101.234, 241.49}, {101.234, 253.51}, {101.703, 270},
1030 {101.234, 286.49}, {101.234, 298.51}, {101.703, 315}, {101.234, 331.49}, {101.234, 343.51}, {101.703, 0}, {101.234, 16.4901}
1033 { {118.722, 30.9923}, {118.722, 59.0077}, {118.722, 75.9923},
1034 {118.722, 104.008}, {118.722, 120.992}, {118.722, 149.008},
1035 {118.722, 165.992}, {118.722, 194.008}, {118.722, 210.992}, {118.722, 239.008}, {118.722, 255.992}, {118.722, 284.008},
1036 {118.722, 300.992}, {118.722, 329.008}, {118.722, 345.992}, {118.722, 14.0077}
1039 { {136.289, 30.5072}, {136.289, 59.4928}, {136.289, 75.5072},
1040 {136.289, 104.493}, {136.289, 120.507}, {136.289, 149.493}, {136.289, 165.507}, {136.289, 194.493},
1041 {136.289, 210.507}, {136.289, 239.493}, {136.289, 255.507}, {136.289, 284.493}, {136.289, 300.507}, {136.289, 329.493},
1042 {136.289, 345.507}, {136.289, 14.4928}
1045 { {150.75, 45}, {150.75, 80},
1046 {150.75, 135}, {150.75, 180}, {150.75, 225}, {150.75, 270}, {150.75, 315}, {150.75, 0}
1049 { {168.561, 45}, {174., 90},
1050 {168.561, 135}, {168.561, 180}, {168.561, 225}, {168.561, 270}, {168.561, 315}, {168.561, 0.}
1053 std::vector<theta_phi> ETALON_COORDS = {
1054 {50.389351, 36.335958},
1065 auto get_direction = [&](
int ring,
int module) {
1066 if (ring == 2)
return CSI_COORDS[1][module / 2];
1067 return CSI_COORDS[ring - 1][module - 1];
1069 auto get_etalon_direction = [&](
int ring) {
1070 return ETALON_COORDS[ring - 10];
1073 std::vector<theta_phi> directions_for_import;
1075 using ring_t = std::unordered_map<int, int>;
1076 std::unordered_map<int, ring_t> ring_module;
1078 if (
p.second.module > 0) {
1079 auto ring =
p.second.ring;
1080 auto module =
p.second.module;
1081 if (!ring_module[ring][module]) {
1082 directions_for_import.push_back(get_direction(ring, module));
1083 ++ring_module[ring][module];
1087 auto ring =
p.second.ring;
1088 directions_for_import.push_back(get_etalon_direction(ring));
1091 return directions_for_import;
1111 Info(
"CheckImportResults",
"Checking results of import of %lu expected detectors",
1114 unsigned long found = 0;
1116 auto _det = detlist->
FindObject(det.first.c_str());
1118 Error(
"CheckImportResults",
"Detector %s was not imported",
1124 dynamic_cast<KVDetector*
>(_det)->SetPhiMinMax(det.second.phiminmax.first,det.second.phiminmax.second);
1125 dynamic_cast<KVDetector*
>(_det)->SetPolarMinMax(det.second.thetaminmax.first,det.second.thetaminmax.second);
1129 Warning(
"CheckImportResults",
"Found %lu imported detectors (%lu missing)",
1132 Info(
"CheckImportResults",
"All %lu expected detectors were imported", found);
1154 for (
int i = 0; i < 4; i++) {
1155 newpad[3 - i].
SetMagThetaPhi(orig[i].
Mag(), orig[i].Theta(), 2.*phicentre - orig[i].Phi());
1171 new TGeoBBox(
"TARGET_FRAME", 3., 3., 0.1 / 2.);
1172 new TGeoEltu(
"TARGET_HOLE", 2., 2., 0.1 / 2.);
1194 Error(
"Build",
"You must define gGeoManager with KVMultiDetArray::CreateGeoManager before calling this method");
1209 for (
int ring = 2; ring <= 16; ring += 2) {
1211 if (ring > 1 && ring < 10)
MakeRing(
"SI", ring);
1218 for (
int ring = 10; ring <= 17; ring++) {
1222 if (closeGeometry) {
1272 Error(
"Build",
"You must build the geometry with gDataSet->BuildMultiDetector() before calling this method");
1277 Error(
"Build",
"You must defined gGeoManager with KVMultiDetArray::CreateGeoManager before calling this method");
1286 for (
int ring = 2; ring <= 16; ring += 2) {
1288 if (ring > 1 && ring < 10) {
1297 for (
int ring = 10; ring <= 17; ring++) {
1318 Double_t sili_diameter_total = 2.54;
1321 Double_t sili_diameter_active = 2.36;
1322 Double_t sili_silicon_thickness = 0.22;
1323 Double_t sili_lithium_thickness = 0.0044;
1325 Double_t si75_diameter_active = 2.2;
1331 (sili_diameter_total) / 2., (sili_diameter_total + 2 * holder_thickness) / 2., holder_length / 2.);
1335 Double_t w = sili_silicon_thickness + sili_lithium_thickness;
1337 sili_diameter_active / 2., (sili_diameter_total) / 2.,
w / 2.);
1345 0., (sili_diameter_active) / 2., (sili_silicon_thickness) / 2.);
1347 0., (sili_diameter_active) / 2., (sili_lithium_thickness) / 2.);
1355 0., (si75_diameter_active) / 2., (si75_thickness) / 2.);
1357 (si75_diameter_active) / 2., (sili_diameter_total) / 2., (si75_thickness) / 2.);
1376 Double_t dist[] = {17.4005, 17.4005, 17.4005, 16.7005, 16.7005, 16.7005, 17.4005, 17.4005,};
1397 h = rot2 * trans *
p * rot1;
1399 else if (RING == 11) {
1401 h = rot2 * trans *
p * rot1;
1403 else if (RING == 12) {
1405 h = rot2 * trans *
p * rot1;
1407 else if (RING == 13) {
1409 h = rot2 * trans *
p * rot1;
1411 else if (RING == 14) {
1413 h = rot2 * trans *
p * rot1;
1415 else if (RING == 15) {
1417 h = rot2 * trans *
p * rot1;
1419 else if (RING == 16) {
1421 h = rot2 * trans *
p * rot1;
1425 h = rot2 * trans *
p * rot1;
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Build INDRA geometry from Huguet CAO infos.
void CorrectCoordinates(Double_t *, Double_t &, Double_t &)
void MakeDetector(const Char_t *det, TVector3 *som, TVector3 cen)
make volume corresponding to the actual detector
std::vector< theta_phi > GetDirectionsToTestForImport() const
void Print(Option_t *="") const override
Int_t Ndets
number of detectors in ring
Bool_t CheckImportResults(const KVSeqCollection *)
void CalculateBackPlaneCoordinates(TVector3 *frontcoords, TVector3 centre, Double_t depth, TVector3 *backcoords)
TGeoVolume * fDetVolume
geo volume representing frame
void CalculateCentre(TVector3 *corners, TVector3 ¢re)
void BuildEtalonVolumes()
void read_indra_struct_file()
file containing structure of array
Double_t fEtalonTheta[10]
void ReadDetCAO(const Char_t *detname, Int_t ring)
std::unordered_map< std::string, detector_properties > detector_map
Int_t fActiveLayer
type name of current detector
void read_layer_infos(const Char_t *name)
read infos on layer 'name' in file "$KVROOT/KVFiles/data/indra-struct.[dataset].env"
TString fDetName
name of detector
TVector3 fInnerCentre
centre of inner face
void PlaceFrame(Double_t phi, Int_t copy_no)
position frame (dead zone) volume in geometry
KVMaterial fFrameMat
material of outer frame
void ReflectPad(TVector3 *orig, Double_t phicentre, TVector3 *newpad)
Double_t phi0
theoretical geometry
TVector3 fInnerFront[4]
coords of inner front face
Bool_t SetDetectorThickness(const TString &detname, Double_t thickness)
std::vector< detector_properties > read_telescope_infos(const Char_t *prefix, Int_t ring, Int_t mod, Int_t ntel, double thmin, double thmax, double phi)
read telescope infos in file "$KVROOT/KVFiles/data/indra-struct.[dataset].env"
void MakeEtalon(int RING)
void CalculateCornersInPlane(TVector3 *plane, Double_t thetamin, Double_t thetamax, Double_t phimin, Double_t phimax, TVector3 *corners)
TString fCurrentDetectorType
list of materials making up layers of current detector
TVector3 fOuterFront[4]
coords of outer front face
TVector3 fOuterCentre
centre of outer face
Bool_t CheckDetectorPresent(TString detname)
void TransformToOwnFrame(TVector3 *orig, TVector3 ¢re, TVector3 *ownframe)
TVector3 fFrameFront[4]
coords of outer front face
INDRAGeometryBuilder(const TString &_data_set, Int_t current_run=-1)
Default constructor.
void Build(Bool_t withTarget=kTRUE, Bool_t closeGeometry=kTRUE)
void read_ring_infos(Int_t number, const Char_t *prefix)
read infos on ring in file "$KVROOT/KVFiles/data/indra-struct.[dataset].env"
void MakeRing(const Char_t *det, int ring)
void MakeFrame(TString det_type, Int_t ring_num)
TVector3 fFrameCentre
centre of frame
TGeoVolume * fFrameVolume
geo volume representing frame
KVDetector fCurrentDetector
void PlaceDetector()
position detector inside frame
TGeoTranslation * fDetectorPosition
TGeoVolumeAssembly * fEtalonVol
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
TString GetFullPathToDataSetFile(const Char_t *filename)
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual Double_t GetThickness() const
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
virtual void SetMaterial(const Char_t *type)
void SetDetectorThicknesses()
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Bool_t HasParameter(const Char_t *name) const
Strings used to represent a set of ranges of values.
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
KaliVeda extensions to ROOT collection classes.
TObject * FindObject(const char *name) const override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Calculation/correction of energy losses of particles through an experimental target.
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=nullptr)
void CloseGeometry(Option_t *option="d")
TGeoMedium * GetMedium(const char *medium) const
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
TGeoVolume * GetTopVolume() const
TGeoVolume * MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz)
virtual Int_t GetDefaultColor() const
TGeoMaterial * GetMaterial() const
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
void SetDz(Double_t dz) override
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
void Draw(Option_t *option="") override
TGeoMaterial * GetMaterial() const
TGeoNode * GetNode(const char *name) const
virtual void SetMedium(TGeoMedium *medium)
void SetLineColor(Color_t lcolor) override
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
TRotation & SetYEulerAngles(Double_t phi, Double_t theta, Double_t psi)
const char * Data() const
void Form(const char *fmt,...)
void SetMagThetaPhi(Double_t mag, Double_t theta, Double_t phi)
void Print(Option_t *option="") const override
TVector3 Cross(const TVector3 &) const
T Mag(const SVector< T, D > &rhs)
RVec< PromoteType< T > > abs(const RVec< T > &v)
const long double torr
pressures
double dist(AxisAngle const &r1, AxisAngle const &r2)
constexpr Double_t DegToRad()
constexpr Double_t RadToDeg()