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
50 << rawid << std::endl;
54 TEveStraightLineSet* segmentSet =
new TEveStraightLineSet();
56 segmentSet->SetLineWidth( 3 );
62 if( TGeoBBox* box = dynamic_cast<TGeoBBox*>( shape->GetShape()))
68 double localPosition[3] = { pos.
x(), pos.
y(), pos.
z() };
69 double localDirectionIn[3] = { dir.
x(), dir.
y(), dir.
z() };
70 double localDirectionOut[3] = { -dir.
x(), -dir.
y(), -dir.
z() };
72 Double_t distIn = box->DistFromInside( localPosition, localDirectionIn );
73 Double_t distOut = box->DistFromInside( localPosition, localDirectionOut );
76 float localSegmentInnerPoint[3] = {
static_cast<float>(localPosition[0] + vIn.
x()),
77 static_cast<float>(localPosition[1] + vIn.
y()),
78 static_cast<float>(localPosition[2] + vIn.
z())
81 float localSegmentOuterPoint[3] = {
static_cast<float>(localPosition[0] + vOut.
x()),
82 static_cast<float>(localPosition[1] + vOut.
y()),
83 static_cast<float>(localPosition[2] + vOut.
z())
86 float globalSegmentInnerPoint[3];
87 float globalSegmentOuterPoint[3];
89 geom->
localToGlobal( rawid, localSegmentInnerPoint, globalSegmentInnerPoint, localSegmentOuterPoint, globalSegmentOuterPoint );
91 segmentSet->AddLine( globalSegmentInnerPoint[0], globalSegmentInnerPoint[1], globalSegmentInnerPoint[2],
92 globalSegmentOuterPoint[0], globalSegmentOuterPoint[1], globalSegmentOuterPoint[2] );
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
void localToGlobal(unsigned int id, const float *local, float *global) const
const FWEventItem * item() const
uint32_t rawId() const
get the raw id
virtual LocalVector localDirection() const
Local direction in Chamber frame.
TEveGeoShape * getEveShape(unsigned int id) const
bool contains(unsigned int id) const
virtual LocalPoint localPosition() const
Local position in Chamber frame.
Vector3DBase unit() const
const FWGeometry * getGeom() const