13#include <framework/logging/Logger.h>
14#include <tracking/trackFindingVXD/environment/VXDTFFilters.h>
23 namespace SecMapHelper {
74 template<
class HitType>
76 unsigned int nHitCombinations = 2,
bool print2File =
true,
bool suppressDeadSectors =
true)
78 if (nHitCombinations <2 or nHitCombinations > 4)
79 B2FATAL(
"printStaticSectorRelations: input-parameter wrong ("
81 <<
", allowed only 2-4), skipping print-function!");
83 std::string secIDCombis =
"## printed " + std::to_string(nHitCombinations) +
"-sector-combi-output of secMap: " + configName +
86 if (staticSector ==
nullptr)
continue;
87 std::string mainSecID = staticSector->getFullSecID().getFullSecString();
89 if (nHitCombinations == 2) {
90 const auto& innerSectors = staticSector->getInner2spSecIDs();
91 if (innerSectors.empty()) {
92 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
94 for (
const auto& innerID : innerSectors) {
95 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + innerID.getFullSecString() +
"\",\n";
99 }
else if (nHitCombinations == 3) {
101 const auto& innerSectors = staticSector->getInner3spSecIDs();
102 if (innerSectors.empty()) {
103 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
105 for (
const auto& innerIDpair : innerSectors) {
106 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + innerIDpair.first.getFullSecString() +
"\",\n";
107 secIDCombis +=
"\"" + innerIDpair.first.getFullSecString() +
"\" -> \"" + innerIDpair.second.getFullSecString() +
"\",\n";
111 }
else if (nHitCombinations == 4) {
113 const auto& innerSectors = staticSector->getInner4spSecIDs();
114 if (innerSectors.empty()) {
115 if (suppressDeadSectors ==
false) { secIDCombis +=
"\"" + mainSecID +
"\",\n"; }
117 for (
const auto& innerIDtriplet : innerSectors) {
118 secIDCombis +=
"\"" + mainSecID +
"\" -> \"" + std::get<0>(innerIDtriplet).getFullSecString() +
"\",\n";
119 secIDCombis +=
"\"" + std::get<0>(innerIDtriplet).getFullSecString() +
"\" -> \"" + std::get<1>
120 (innerIDtriplet).getFullSecString() +
"\",\n";
121 secIDCombis +=
"\"" + std::get<1>(innerIDtriplet).getFullSecString() +
"\" -> \"" + std::get<2>
122 (innerIDtriplet).getFullSecString() +
"\",\n";
131 if (print2File ==
true) {
132 B2DEBUG(29,
"Printing static sector relations to file " << configName <<
"4Mathematica.txt...\n");
134 ofs.open(configName +
"4Mathematica.txt", std::ofstream::out | std::ofstream::trunc);
Class that contains all the static sectors to which the filters are attached.
const std::vector< staticSector_t * > & getStaticSectors() const
JKL: intended for some checks only - returns CompactIDsMap storing the static sectors.
void printStaticSectorRelations(const VXDTFFilters< HitType > &filters, const std::string &configName, unsigned int nHitCombinations=2, bool print2File=true, bool suppressDeadSectors=true)
TODO dot-compatible version of printStaticSectorRelations:
Abstract base class for different kinds of events.