13 #include "TEveGeoNode.h"
14 #include "TEveStraightLineSet.h"
15 #include "TEvePointSet.h"
55 << rawid << std::endl;
59 TEveStraightLineSet* segmentSet =
new TEveStraightLineSet();
61 segmentSet->SetLineWidth( 3 );
67 if( TGeoBBox* box = dynamic_cast<TGeoBBox*>( shape->GetShape()))
73 double localPosition[3] = { pos.
x(), pos.
y(), pos.
z() };
74 double localDirectionIn[3] = { dir.
x(), dir.
y(), dir.
z() };
75 double localDirectionOut[3] = { -dir.
x(), -dir.
y(), -dir.
z() };
81 localDirectionIn[0]=0;
82 localDirectionOut[0]=0;
85 Double_t distIn = box->DistFromInside( localPosition, localDirectionIn );
86 Double_t distOut = box->DistFromInside( localPosition, localDirectionOut );
89 float localSegmentInnerPoint[3] = {
static_cast<float>(localPosition[0] + vIn.
x()),
90 static_cast<float>(localPosition[1] + vIn.
y()),
91 static_cast<float>(localPosition[2] + vIn.
z())
94 float localSegmentOuterPoint[3] = {
static_cast<float>(localPosition[0] + vOut.
x()),
95 static_cast<float>(localPosition[1] + vOut.
y()),
96 static_cast<float>(localPosition[2] + vOut.
z())
99 float globalSegmentInnerPoint[3];
100 float globalSegmentOuterPoint[3];
102 geom->
localToGlobal( rawid, localSegmentInnerPoint, globalSegmentInnerPoint, localSegmentOuterPoint, globalSegmentOuterPoint );
104 segmentSet->AddLine( globalSegmentInnerPoint[0], globalSegmentInnerPoint[1], globalSegmentInnerPoint[2],
105 globalSegmentOuterPoint[0], globalSegmentOuterPoint[1], globalSegmentOuterPoint[2] );
109 TEvePointSet* pointSet =
new TEvePointSet;
111 pointSet->SetMarkerSize(1.5);
114 std::vector<DTRecHit1D> recHits;
124 for (std::vector<DTRecHit1D>::const_iterator rh=recHits.begin(); rh!=recHits.end(); ++rh){
125 DTLayerId layerId = (*rh).wireId().layerId();
127 float hitLocalPos[3]= {hpos.
x(), hpos.
y(), hpos.
z()};
133 float hitGlobalPoint[3];
135 pointSet->SetNextPoint(hitGlobalPoint[0], hitGlobalPoint[1], hitGlobalPoint[2]);
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
virtual ~FWDTSegmentProxyBuilder(void)
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
REGISTER_PROXYBUILDER_METHODS()
void localToGlobal(unsigned int id, const float *local, float *global) const
const FWEventItem * item() const
static const int kAll3DBits
uint32_t rawId() const
get the raw id
virtual LocalVector localDirection() const
Local direction in Chamber frame.
TEveGeoShape * getEveShape(unsigned int id) const
void buildViewType(const DTRecSegment4D &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
virtual bool haveSingleProduct() const override
int superLayer() const
Return the superlayer number.
bool contains(unsigned int id) const
const FWDTSegmentProxyBuilder & operator=(const FWDTSegmentProxyBuilder &)
virtual LocalPoint localPosition() const
Local position in Chamber frame.
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
Vector3DBase unit() const
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
FWDTSegmentProxyBuilder(void)
const FWGeometry * getGeom() const