16 #include "TEveBoxSet.h"
36 TEveElement &oItemHolder,
45 TEveBoxSet *hex_boxset =
new TEveBoxSet();
47 hex_boxset->UseSingleColor();
48 hex_boxset->SetPickable(
true);
49 hex_boxset->Reset(TEveBoxSet::kBT_Hex,
true, 64);
50 hex_boxset->SetAntiFlick(
true);
53 TEveBoxSet *boxset =
new TEveBoxSet();
55 boxset->UseSingleColor();
56 boxset->SetPickable(
true);
57 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, 64);
58 boxset->SetAntiFlick(
true);
61 for (
const auto &it : (*c).hits_and_fractions()) {
65 const bool z = (it.first >> 25) & 0
x1;
68 if (((z_plus & z_minus) != 1) && (((z_plus | z_minus) == 0) || !(
z == z_minus ||
z == !z_plus)))
75 if (corners ==
nullptr ||
parameters ==
nullptr || shapes ==
nullptr) {
80 const bool isScintillator = (total_points == 4);
81 const uint8_t
type = ((it.first >> 28) & 0xF);
96 if (ll != ((it.first >> (isScintillator ? 17 : 20)) & 0x1F))
101 if (isScintillator) {
102 const int total_vertices = 3 * total_points;
104 std::vector<float> pnts(24);
105 for (
int i = 0;
i < total_points; ++
i) {
106 pnts[
i * 3 + 0] = corners[
i * 3];
107 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
108 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
110 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
111 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
112 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
114 boxset->AddBox(&pnts[0]);
116 const uint8_t colorFactor =
gradient_steps * (fmin(
hitmap->at(it.first)->energy() / saturation_energy, 1.0f));
126 float centerX = (corners[6] + corners[6 +
offset]) / 2;
127 float centerY = (corners[7] + corners[7 +
offset]) / 2;
128 float radius = fabs(corners[6] - corners[6 +
offset]) / 2;
129 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
radius, 90.0, shapes[3]);
131 const uint8_t colorFactor =
gradient_steps * (fmin(
hitmap->at(it.first)->energy() / saturation_energy, 1.0f));
141 hex_boxset->RefitPlex();
143 hex_boxset->CSCTakeAnyParentAsMaster();
145 hex_boxset->CSCApplyMainColorToMatchingChildren();
146 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
147 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
148 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
150 oItemHolder.AddElement(hex_boxset);
156 boxset->CSCTakeAnyParentAsMaster();
158 boxset->CSCApplyMainColorToMatchingChildren();
159 boxset->CSCApplyMainTransparencyToMatchingChildren();
160 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
161 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
163 oItemHolder.AddElement(boxset);