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
37 TEveBoxSet *hex_boxset =
new TEveBoxSet(
"Silicon");
39 hex_boxset->UseSingleColor();
40 hex_boxset->SetPickable(
true);
41 hex_boxset->Reset(TEveBoxSet::kBT_Hex,
true, 64);
42 hex_boxset->SetAntiFlick(kTRUE);
45 TEveBoxSet *boxset =
new TEveBoxSet(
"Scintillator");
47 boxset->UseSingleColor();
48 boxset->SetPickable(
true);
49 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, 64);
50 boxset->SetAntiFlick(kTRUE);
52 for (
const auto &
c : clusters)
54 std::vector<std::pair<DetId, float>> clusterDetIds =
c->hitsAndFractions();
56 for (std::vector<std::pair<DetId, float>>::iterator it = clusterDetIds.begin(), itEnd = clusterDetIds.end();
62 const bool z = (it->first >> 25) & 0
x1;
66 ((z_plus & z_minus) != 1) &&
67 (((z_plus | z_minus) == 0) || !(z == z_minus || z == !z_plus)))
74 if (corners ==
nullptr || parameters ==
nullptr || shapes ==
nullptr)
79 const int total_points = parameters[0];
80 const bool isScintillator = (total_points == 4);
81 const uint8_t
type = ((it->first >> 28) & 0xF);
102 if (ll != ((it->first >> (isScintillator ? 17 : 20)) & 0x1F))
109 const int total_vertices = 3 * total_points;
111 std::vector<float> pnts(24);
112 for (
int i = 0;
i < total_points; ++
i)
114 pnts[
i * 3 + 0] = corners[
i * 3];
115 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
116 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
118 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
119 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
120 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
122 boxset->AddBox(&pnts[0]);
124 const uint8_t colorFactor =
gradient_steps*(fmin(
hitmap[it->first]->energy()/saturation_energy, 1.0f));
135 float centerX = (corners[6] + corners[6 +
offset]) / 2;
136 float centerY = (corners[7] + corners[7 +
offset]) / 2;
137 float radius = fabs(corners[6] - corners[6 + offset]) / 2;
138 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
139 radius, 90.0, shapes[3]);
141 const uint8_t colorFactor =
gradient_steps*(fmin(
hitmap[it->first]->energy()/saturation_energy, 1.0f));
152 hex_boxset->RefitPlex();
154 hex_boxset->CSCTakeAnyParentAsMaster();
157 hex_boxset->CSCApplyMainColorToMatchingChildren();
158 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
159 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().
color());
160 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
162 oItemHolder.AddElement(hex_boxset);
169 boxset->CSCTakeAnyParentAsMaster();
172 boxset->CSCApplyMainColorToMatchingChildren();
173 boxset->CSCApplyMainTransparencyToMatchingChildren();
174 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().
color());
175 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
177 oItemHolder.AddElement(boxset);
FWProxyBuilderConfiguration * getConfig() const
std::map< DetId, const HGCRecHit * > hitmap
static uint8_t gradient[3][gradient_steps]
const float * getParameters(unsigned int id) const
const FWEventItem * item() const
const float * getShapePars(unsigned int id) const
const edm::PtrVector< reco::BasicCluster > & clusters() const
const float * getCorners(unsigned int id) const
static uint8_t gradient_steps
T value(const std::string &name)
const FWGeometry * getGeom() const