7 #include "TEveBoxSet.h" 22 {0.2082*255, 0.0592*255, 0.0780*255, 0.0232*255, 0.1802*255, 0.5301*255, 0.8186*255, 0.9956*255, 0.9764*255},
23 {0.1664*255, 0.3599*255, 0.5041*255, 0.6419*255, 0.7178*255, 0.7492*255, 0.7328*255, 0.7862*255, 0.9832*255},
24 {0.5293*255, 0.8684*255, 0.8385*255, 0.7914*255, 0.6425*255, 0.4662*255, 0.3499*255, 0.1968*255, 0.0539*255}
53 TEveBoxSet* boxset =
new TEveBoxSet();
55 boxset->UseSingleColor();
56 boxset->SetPickable(
true);
57 boxset->SetAntiFlick(
true);
59 unsigned int ID = iData.
id();
61 const bool z = (ID >> 25) & 0
x1;
65 ((z_plus & z_minus) != 1) &&
66 (((z_plus | z_minus) == 0) || !(z == z_minus || z == !z_plus)))
73 if (corners ==
nullptr || parameters ==
nullptr || shapes ==
nullptr)
76 const int total_points = parameters[0];
77 const bool isScintillator = (total_points == 4);
78 const uint8_t
type = ((ID >> 28) & 0xF);
99 if (ll != ((ID >> (isScintillator ? 17 : 20)) & 0x1F))
103 boxset->Reset(isScintillator ? TEveBoxSet::kBT_FreeBox : TEveBoxSet::kBT_Hex,
true, 64);
108 const int total_vertices = 3 * total_points;
110 std::vector<float> pnts(24);
111 for (
int i = 0;
i < total_points; ++
i)
113 pnts[
i * 3 + 0] = corners[
i * 3];
114 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
115 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
117 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
118 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
119 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
121 boxset->AddBox(&pnts[0]);
128 float centerX = (corners[6] + corners[6 +
offset]) / 2;
129 float centerY = (corners[7] + corners[7 +
offset]) / 2;
130 float radius = fabs(corners[6] - corners[6 + offset]) / 2;
131 boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
132 radius, 90.0, shapes[3]);
142 boxset->CSCTakeAnyParentAsMaster();
145 boxset->CSCApplyMainColorToMatchingChildren();
146 boxset->CSCApplyMainTransparencyToMatchingChildren();
147 boxset->SetMainColor(
item()->defaultDisplayProperties().
color());
148 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
150 oItemHolder.AddElement(boxset);
constexpr float energy() const
FWProxyBuilderConfiguration * getConfig() const
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
const float * getParameters(unsigned int id) const
FWHGCRecHitProxyBuilder()
const FWEventItem * item() const
const float * getShapePars(unsigned int id) const
virtual void setItem(const FWEventItem *iItem)
~FWHGCRecHitProxyBuilder(void) override
const FWHGCRecHitProxyBuilder & operator=(const FWHGCRecHitProxyBuilder &)=delete
DetId id() const
get the id
static uint8_t gradient_steps
FWGenericParameter< T > * assertParam(const std::string &name, T def)
const float * getCorners(unsigned int id) const
T value(const std::string &name)
static float gradient[3][gradient_steps]
const FWGeometry * getGeom() const
void setItem(const FWEventItem *iItem) override