15 #include <framework/logging/Logger.h>
16 #include <tracking/trackFindingVXD/environment/VXDTFFilters.h>
25 namespace SecMapHelper {
76 template<
class HitType>
78 unsigned int nHitCombinations = 2,
bool print2File =
true,
bool suppressDeadSectors =
true)
80 if (nHitCombinations <2 or nHitCombinations > 4)
81 B2FATAL(
"printStaticSectorRelations: input-parameter wrong ("
83 <<
", allowed only 2-4), skipping print-function!");
85 std::string secIDCombis =
"## printed " + std::to_string(nHitCombinations) +
"-sector-combi-output of secMap: " + configName +
88 if (staticSector ==
nullptr)
continue;
89 std::string mainSecID = staticSector->getFullSecID().getFullSecString();
91 if (nHitCombinations == 2) {
92 const auto& innerSectors = staticSector->getInner2spSecIDs();
93 if (innerSectors.empty()) {
94 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
96 for (
const auto& innerID : innerSectors) {
97 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + innerID.getFullSecString() +
"\",\n";
101 }
else if (nHitCombinations == 3) {
103 const auto& innerSectors = staticSector->getInner3spSecIDs();
104 if (innerSectors.empty()) {
105 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
107 for (
const auto& innerIDpair : innerSectors) {
108 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + innerIDpair.first.getFullSecString() +
"\",\n";
109 secIDCombis +=
"\"" + innerIDpair.first.getFullSecString() +
"\" -> \"" + innerIDpair.second.getFullSecString() +
"\",\n";
113 }
else if (nHitCombinations == 4) {
115 const auto& innerSectors = staticSector->getInner4spSecIDs();
116 if (innerSectors.empty()) {
117 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
119 for (
const auto& innerIDtriplet : innerSectors) {
120 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + std::get<0>(innerIDtriplet).getFullSecString() +
"\",\n";
121 secIDCombis +=
"\"" + std::get<0>(innerIDtriplet).getFullSecString() +
"\" -> \"" + std::get<1>
122 (innerIDtriplet).getFullSecString() +
"\",\n";
123 secIDCombis +=
"\"" + std::get<1>(innerIDtriplet).getFullSecString() +
"\" -> \"" + std::get<2>
124 (innerIDtriplet).getFullSecString() +
"\",\n";
133 if (print2File ==
true) {
134 B2DEBUG(99,
"Printing static sector relations to file " << configName <<
"4Mathematica.txt...\n");
136 ofs.open(configName +
"4Mathematica.txt", std::ofstream::out | std::ofstream::trunc);