10 #include <framework/logging/Logger.h>
27 int tessellatedSolidID;
29 unsigned int nApexPerCell;
31 std::vector<std::vector<double>> posV1;
32 std::vector<std::vector<double>> posV2;
33 std::vector<std::vector<double>> posV3;
36 tessellatedSolidID = 0;
41 void defineDummyApex()
43 std::vector<double> apex;
44 for (
unsigned int i = 0; i < 3; i++)
46 posV1.push_back(apex);
47 posV2.push_back(apex);
48 posV3.push_back(apex);
50 void pushBackApexesCoordinates(
const std::vector<double>& apex1x,
const std::vector<double>& apex1y,
51 const std::vector<double>& apex1z,
52 const std::vector<double>& apex2x,
const std::vector<double>& apex2y,
const std::vector<double>& apex2z,
53 const std::vector<double>& apex3x,
const std::vector<double>& apex3y,
const std::vector<double>& apex3z)
55 if (nCells != apex1x.size())
56 B2ERROR(
"tessellatedSolidStr: apex1x.size() != nCells");
57 if (nCells != apex1y.size())
58 B2ERROR(
"tessellatedSolidStr: apex1y.size() != nCells");
59 if (nCells != apex1z.size())
60 B2ERROR(
"tessellatedSolidStr: apex1z.size() != nCells");
61 if (nCells != apex2x.size())
62 B2ERROR(
"tessellatedSolidStr: apex2x.size() != nCells");
63 if (nCells != apex2y.size())
64 B2ERROR(
"tessellatedSolidStr: apex2y.size() != nCells");
65 if (nCells != apex2z.size())
66 B2ERROR(
"tessellatedSolidStr: apex2z.size() != nCells");
67 if (nCells != apex3x.size())
68 B2ERROR(
"tessellatedSolidStr: apex3x.size() != nCells");
69 if (nCells != apex3y.size())
70 B2ERROR(
"tessellatedSolidStr: apex3y.size() != nCells");
71 if (nCells != apex3z.size())
72 B2ERROR(
"tessellatedSolidStr: apex3z.size() != nCells");
73 for (
unsigned int i = 0; i < nCells; i++) {
74 std::vector<double> apex1;
75 std::vector<double> apex2;
76 std::vector<double> apex3;
77 apex1.push_back(apex1x.at(i));
78 apex1.push_back(apex1y.at(i));
79 apex1.push_back(apex1z.at(i));
80 apex2.push_back(apex2x.at(i));
81 apex2.push_back(apex2y.at(i));
82 apex2.push_back(apex2z.at(i));
83 apex3.push_back(apex3x.at(i));
84 apex3.push_back(apex3y.at(i));
85 apex3.push_back(apex3z.at(i));
86 posV1.push_back(apex1);
87 posV2.push_back(apex2);
88 posV3.push_back(apex3);
91 void printInfo(
int verboseLevel = 0)
93 std::cout <<
"tessellatedSolidID " << tessellatedSolidID << std::endl
94 <<
"nCells " << nCells << std::endl
95 <<
"nApexPerCell " << nApexPerCell << std::endl;
96 if (verboseLevel > 0) {
97 for (
unsigned int i = 0; i < posV1.size(); i++) {
98 std::cout << std::setw(20) <<
"apex1 : x y z " <<
" " << posV1[i][0] <<
" " << posV1[i][1] <<
" " << posV1[i][2] << std::endl
99 << std::setw(20) <<
"apex2 : x y z " <<
" " << posV2[i][0] <<
" " << posV2[i][1] <<
" " << posV2[i][2] << std::endl
100 << std::setw(20) <<
"apex3 : x y z " <<
" " << posV3[i][0] <<
" " << posV3[i][1] <<
" " << posV3[i][2] << std::endl;
Abstract base class for different kinds of events.
Structure which holds apexes of the tessellation volumes.