namespace for SectorMapHelper-related stuff
More...
|
template<class HitType > |
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: More...
|
|
namespace for SectorMapHelper-related stuff
◆ printStaticSectorRelations()
void Belle2::SecMapHelper::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:
function for printing relationBetweenStaticSectors:
- 'filters' contains the static sectors
configName is used for the fileName to be able to recognize the outputs
- nHit-Combinations shows links of 2-, 3- or 4-static sectors in a row
- print2File prints to a file if yes or to screen if no
- suppressDeadSectors discards sectors without links if set to true
Definition at line 85 of file VXDTFFiltersHelperFunctions.h.
87 for (const auto* staticSector : filters.getStaticSectors()) {
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);