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
48 TEveBoxSet *hex_boxset =
new TEveBoxSet();
50 hex_boxset->UseSingleColor();
51 hex_boxset->SetPickable(
true);
52 hex_boxset->Reset(TEveBoxSet::kBT_Hex,
true, 64);
53 hex_boxset->SetAntiFlick(
true);
56 TEveBoxSet *boxset =
new TEveBoxSet();
58 boxset->UseSingleColor();
59 boxset->SetPickable(
true);
60 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, 64);
61 boxset->SetAntiFlick(
true);
63 const float energy = fmin(iData.
energy() / (saturation_energy * 100), 1.0);
68 for (
auto &it :
cells) {
69 const bool z = (it >> 25) & 0
x1;
72 if (((z_plus & z_minus) != 1) && (((z_plus | z_minus) == 0) || !(
z == z_minus ||
z == !z_plus)))
79 if (corners ==
nullptr ||
parameters ==
nullptr || shapes ==
nullptr) {
84 const bool isScintillator = (total_points == 4);
85 const uint8_t
type = ((it >> 28) & 0xF);
100 if (ll != ((it >> (isScintillator ? 17 : 20)) & 0x1F))
105 if (isScintillator) {
106 const int total_vertices = 3 * total_points;
108 std::vector<float> pnts(24);
109 for (
int i = 0;
i < total_points; ++
i) {
110 pnts[
i * 3 + 0] = corners[
i * 3];
111 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
112 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
114 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
115 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
116 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
118 boxset->AddBox(&pnts[0]);
119 boxset->DigitColor(
energy * 255, 0, 255 -
energy * 255);
127 float centerX = (corners[6] + corners[6 +
offset]) / 2;
128 float centerY = (corners[7] + corners[7 +
offset]) / 2;
129 float radius = fabs(corners[6] - corners[6 +
offset]) / 2;
130 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
radius, 90.0, shapes[3]);
131 hex_boxset->DigitColor(
energy * 255, 0, 255 -
energy * 255);
139 hex_boxset->RefitPlex();
141 hex_boxset->CSCTakeAnyParentAsMaster();
143 hex_boxset->CSCApplyMainColorToMatchingChildren();
144 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
145 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
146 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
148 oItemHolder.AddElement(hex_boxset);
154 boxset->CSCTakeAnyParentAsMaster();
156 boxset->CSCApplyMainColorToMatchingChildren();
157 boxset->CSCApplyMainTransparencyToMatchingChildren();
158 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
159 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
161 oItemHolder.AddElement(boxset);
FWProxyBuilderConfiguration * getConfig() const
const std::unordered_map< uint32_t, edm::Ptr< C > > & constituents() const
std::unordered_set< unsigned > getCellsFromTriggerCell(const unsigned trigger_cell_id) const
const float * getCorners(unsigned int id) const
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
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