7 #include "TEveBoxSet.h" 67 TEveElement &oItemHolder,
75 TEveBoxSet *boxset =
new TEveBoxSet();
77 boxset->UseSingleColor();
78 boxset->SetPickable(
true);
79 boxset->SetAntiFlick(
true);
81 unsigned int ID = iData.
id();
83 const bool z = (
ID >> 25) & 0
x1;
86 if (((z_plus & z_minus) != 1) && (((z_plus | z_minus) == 0) || !(
z == z_minus ||
z == !z_plus)))
93 if (corners ==
nullptr ||
parameters ==
nullptr || shapes ==
nullptr)
97 const bool isScintillator = (total_points == 4);
98 const uint8_t
type = ((
ID >> 28) & 0xF);
113 if (ll != ((
ID >> (isScintillator ? 17 : 20)) & 0x1F))
117 boxset->Reset(isScintillator ? TEveBoxSet::kBT_FreeBox : TEveBoxSet::kBT_Hex,
true, 64);
120 if (isScintillator) {
121 const int total_vertices = 3 * total_points;
123 std::vector<float> pnts(24);
124 for (
int i = 0;
i < total_points; ++
i) {
125 pnts[
i * 3 + 0] = corners[
i * 3];
126 pnts[
i * 3 + 1] = corners[
i * 3 + 1];
127 pnts[
i * 3 + 2] = corners[
i * 3 + 2];
129 pnts[(
i * 3 + 0) + total_vertices] = corners[
i * 3];
130 pnts[(
i * 3 + 1) + total_vertices] = corners[
i * 3 + 1];
131 pnts[(
i * 3 + 2) + total_vertices] = corners[
i * 3 + 2] + shapes[3];
133 boxset->AddBox(&pnts[0]);
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 boxset->AddHex(TEveVector(centerX, centerY, corners[2]),
radius, shapes[2], shapes[3]);
152 boxset->CSCTakeAnyParentAsMaster();
154 boxset->CSCApplyMainColorToMatchingChildren();
155 boxset->CSCApplyMainTransparencyToMatchingChildren();
156 boxset->SetMainColor(
item()->defaultDisplayProperties().color());
157 boxset->SetMainTransparency(
item()->defaultDisplayProperties().transparency());
159 oItemHolder.AddElement(boxset);
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static constexpr float gradient[3][gradient_steps]
FWProxyBuilderConfiguration * getConfig() const
DetId id() const
get the id
FWHGCRecHitProxyBuilder()
constexpr float energy() const
const float * getCorners(unsigned int id) const
virtual void setItem(const FWEventItem *iItem)
~FWHGCRecHitProxyBuilder(void) override
const FWHGCRecHitProxyBuilder & operator=(const FWHGCRecHitProxyBuilder &)=delete
FWGenericParameter< T > * assertParam(const std::string &name, T def)
const FWGeometry * getGeom() const
const float * getShapePars(unsigned int id) const
static constexpr uint8_t gradient_steps
const float * getParameters(unsigned int id) const
T value(const std::string &name)
const FWEventItem * item() const
void setItem(const FWEventItem *iItem) override
static constexpr unsigned int kISpyBit