13 #include "TEveGeoNode.h" 14 #include "TEveStraightLineSet.h" 42 unsigned int iIndex, TEveElement& oItemHolder,
const FWViewContext* )
50 << rawid << std::endl;
54 TEveStraightLineSet* segmentSet =
new TEveStraightLineSet();
56 segmentSet->SetLineWidth( 3 );
60 if( TGeoTrap* trap = dynamic_cast<TGeoTrap*>( shape->GetShape()))
66 Double_t localPosition[3] = { pos.
x(), pos.
y(), pos.
z() };
67 Double_t localDirectionIn[3] = { dir.
x(), dir.
y(), dir.
z() };
68 Double_t localDirectionOut[3] = { -dir.
x(), -dir.
y(), -dir.
z() };
70 float distIn = trap->DistFromInside( localPosition, localDirectionIn );
71 float distOut = trap->DistFromInside( localPosition, localDirectionOut );
74 float localSegmentInnerPoint[3] = {
static_cast<float>(localPosition[0] + vIn.
x()),
75 static_cast<float>(localPosition[1] + vIn.
y()),
76 static_cast<float>(localPosition[2] + vIn.
z())
79 float localSegmentOuterPoint[3] = {
static_cast<float>(localPosition[0] + vOut.
x()),
80 static_cast<float>(localPosition[1] + vOut.
y()),
81 static_cast<float>(localPosition[2] + vOut.
z())
84 float globalSegmentInnerPoint[3];
85 float globalSegmentOuterPoint[3];
87 geom->
localToGlobal( rawid, localSegmentInnerPoint, globalSegmentInnerPoint, localSegmentOuterPoint, globalSegmentOuterPoint );
89 segmentSet->AddLine( globalSegmentInnerPoint[0], globalSegmentInnerPoint[1], globalSegmentInnerPoint[2],
90 globalSegmentOuterPoint[0], globalSegmentOuterPoint[1], globalSegmentOuterPoint[2] );
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
CSCDetId cscDetId() const
LocalVector localDirection() const override
Local direction.
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
static const int kAll3DBits
uint32_t rawId() const
get the raw id
TEveGeoShape * getEveShape(unsigned int id) const
~FWCSCSegmentProxyBuilder(void) override
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
LocalPoint localPosition() const override
bool contains(unsigned int id) const
Vector3DBase unit() const
FWCSCSegmentProxyBuilder(void)
const FWCSCSegmentProxyBuilder & operator=(const FWCSCSegmentProxyBuilder &)=delete
const FWGeometry * getGeom() const