16 #include "TEveBoxSet.h" 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);
61 for (
const auto &it : (*c).hits_and_fractions())
66 const bool z = (it.first >> 25) & 0
x1;
70 ((z_plus & z_minus) != 1) &&
71 (((z_plus | z_minus) == 0) || !(z == z_minus || z == !z_plus)))
78 if (corners ==
nullptr || parameters ==
nullptr || shapes ==
nullptr)
83 const int total_points = parameters[0];
84 const bool isScintillator = (total_points == 4);
85 const uint8_t
type = ((it.first >> 28) & 0xF);
106 if (ll != ((it.first >> (isScintillator ? 17 : 20)) & 0x1F))
113 const int total_vertices = 3 * total_points;
115 std::vector<float> pnts(24);
116 for (
int i = 0;
i < total_points; ++
i)
118 pnts[
i * 3 + 0] = corners[
i * 3];
119 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
120 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
122 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
123 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
124 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
126 boxset->AddBox(&pnts[0]);
128 const uint8_t colorFactor =
gradient_steps*(fmin(
hitmap[it.first]->energy()/saturation_energy, 1.0f));
139 float centerX = (corners[6] + corners[6 +
offset]) / 2;
140 float centerY = (corners[7] + corners[7 +
offset]) / 2;
141 float radius = fabs(corners[6] - corners[6 + offset]) / 2;
142 hex_boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
143 radius, 90.0, shapes[3]);
145 const uint8_t colorFactor =
gradient_steps*(fmin(
hitmap[it.first]->energy()/saturation_energy, 1.0f));
156 hex_boxset->RefitPlex();
158 hex_boxset->CSCTakeAnyParentAsMaster();
161 hex_boxset->CSCApplyMainColorToMatchingChildren();
162 hex_boxset->CSCApplyMainTransparencyToMatchingChildren();
163 hex_boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().
color());
164 hex_boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
166 oItemHolder.AddElement(hex_boxset);
173 boxset->CSCTakeAnyParentAsMaster();
176 boxset->CSCApplyMainColorToMatchingChildren();
177 boxset->CSCApplyMainTransparencyToMatchingChildren();
178 boxset->SetMainColor(
item()->modelInfo(iIndex).displayProperties().
color());
179 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
181 oItemHolder.AddElement(boxset);
FWProxyBuilderConfiguration * getConfig() const
#define REGISTER_PROXYBUILDER_METHODS()
std::map< DetId, const HGCRecHit * > hitmap
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
FWCaloParticleProxyBuilder(void)
static const int kAllRPZBits
static uint8_t gradient[3][gradient_steps]
const float * getParameters(unsigned int id) const
const FWCaloParticleProxyBuilder & operator=(const FWCaloParticleProxyBuilder &)=delete
~FWCaloParticleProxyBuilder(void) override
const FWEventItem * item() const
static const int kAll3DBits
const float * getShapePars(unsigned int id) const
const SimClusterRefVector & simClusters() const
const float * getCorners(unsigned int id) const
static uint8_t gradient_steps
T value(const std::string &name)
const FWGeometry * getGeom() const