iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement
44 TEveBoxSet *hex_boxset =
new TEveBoxSet();
46 hex_boxset->UseSingleColor();
47 hex_boxset->SetPickable(
true);
48 hex_boxset->Reset(TEveBoxSet::kBT_Hex,
true, 64);
49 hex_boxset->SetAntiFlick(
true);
52 TEveBoxSet *boxset =
new TEveBoxSet();
54 boxset->UseSingleColor();
55 boxset->SetPickable(
true);
56 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, 64);
57 boxset->SetAntiFlick(
true);
59 const float energy = fmin(10 * iData.
energy() / saturation_energy, 1.0);
63 for (std::unordered_set<unsigned>::const_iterator it =
cells.begin(), itEnd =
cells.end(); it != itEnd; ++it) {
64 const bool z = (*it >> 25) & 0
x1;
67 if (((z_plus & z_minus) != 1) && (((z_plus | z_minus) == 0) || !(
z == z_minus ||
z == !z_plus)))
74 if (corners ==
nullptr ||
parameters ==
nullptr || shapes ==
nullptr) {
79 const bool isScintillator = (total_points == 4);
80 const uint8_t
type = ((*it >> 28) & 0xF);
95 if (ll != ((*it >> (isScintillator ? 17 : 20)) & 0x1F))
100 if (isScintillator) {
101 const int total_vertices = 3 * total_points;
103 std::vector<float> pnts(24);
104 for (
int i = 0;
i < total_points; ++
i) {
105 pnts[
i * 3 + 0] = corners[
i * 3];
106 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
107 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
109 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
110 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
111 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
113 boxset->AddBox(&pnts[0]);
114 boxset->DigitColor(
energy * 255, 0, 255 -
energy * 255);
122 float centerX = (corners[6] + corners[6 +
offset]) / 2;
123 float centerY = (corners[7] + corners[7 +
offset]) / 2;
124 float radius = fabs(corners[6] - corners[6 +
offset]) / 2;
125 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
radius, shapes[2], shapes[3]);
126 hex_boxset->DigitColor(
energy * 255, 0, 255 -
energy * 255);
133 hex_boxset->RefitPlex();
135 hex_boxset->CSCTakeAnyParentAsMaster();
137 hex_boxset->CSCApplyMainColorToMatchingChildren();
138 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
139 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
140 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
142 oItemHolder.AddElement(hex_boxset);
148 boxset->CSCTakeAnyParentAsMaster();
150 boxset->CSCApplyMainColorToMatchingChildren();
151 boxset->CSCApplyMainTransparencyToMatchingChildren();
152 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
153 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
155 oItemHolder.AddElement(boxset);
FWProxyBuilderConfiguration * getConfig() const
std::unordered_set< unsigned > getCellsFromTriggerCell(const unsigned trigger_cell_id) const
const float * getCorners(unsigned int id) const
const FWGeometry * getGeom() const
const float * getShapePars(unsigned int id) const
const float * getParameters(unsigned int id) const
T value(const std::string &name)
const FWEventItem * item() const
double energy() const final
energy