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
40 TEveBoxSet *hex_boxset =
new TEveBoxSet(
"Silicon");
42 hex_boxset->UseSingleColor();
43 hex_boxset->SetPickable(
true);
44 hex_boxset->Reset(TEveBoxSet::kBT_Hex,
true, 64);
45 hex_boxset->SetAntiFlick(kTRUE);
48 TEveBoxSet *boxset =
new TEveBoxSet(
"Scintillator");
50 boxset->UseSingleColor();
51 boxset->SetPickable(
true);
52 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, 64);
53 boxset->SetAntiFlick(kTRUE);
56 std::vector<std::pair<DetId, float>> clusterDetIds =
c->hitsAndFractions();
58 for (
std::vector<std::pair<DetId, float>>::iterator it = clusterDetIds.begin(), itEnd = clusterDetIds.end();
64 const bool z = (it->first >> 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->first >> 28) & 0xF);
95 if (ll != ((it->first >> (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]);
115 const uint8_t colorFactor =
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 =
142 hex_boxset->RefitPlex();
144 hex_boxset->CSCTakeAnyParentAsMaster();
146 hex_boxset->CSCApplyMainColorToMatchingChildren();
147 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
148 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
149 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
151 oItemHolder.AddElement(hex_boxset);
157 boxset->CSCTakeAnyParentAsMaster();
159 boxset->CSCApplyMainColorToMatchingChildren();
160 boxset->CSCApplyMainTransparencyToMatchingChildren();
161 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
162 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
164 oItemHolder.AddElement(boxset);
FWProxyBuilderConfiguration * getConfig() const
static constexpr uint8_t gradient_steps
const edm::PtrVector< reco::BasicCluster > & clusters() const
const float * getCorners(unsigned int id) const
static constexpr uint8_t gradient[3][gradient_steps]
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
std::unordered_map< DetId, const HGCRecHit *> * hitmap