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);
55 for (
const auto &
c : clusters) {
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) {
78 const int total_points = parameters[0];
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 =
gradient_steps * (fmin(
hitmap[it->first]->energy() / saturation_energy, 1.0f));
125 float centerX = (corners[6] + corners[6 +
offset]) / 2;
126 float centerY = (corners[7] + corners[7 +
offset]) / 2;
127 float radius = fabs(corners[6] - corners[6 + offset]) / 2;
128 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]), radius, 90.0, shapes[3]);
130 const uint8_t colorFactor =
gradient_steps * (fmin(
hitmap[it->first]->energy() / saturation_energy, 1.0f));
140 hex_boxset->RefitPlex();
142 hex_boxset->CSCTakeAnyParentAsMaster();
144 hex_boxset->CSCApplyMainColorToMatchingChildren();
145 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
146 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
147 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
149 oItemHolder.AddElement(hex_boxset);
155 boxset->CSCTakeAnyParentAsMaster();
157 boxset->CSCApplyMainColorToMatchingChildren();
158 boxset->CSCApplyMainTransparencyToMatchingChildren();
159 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().color());
160 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
162 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