56 << rawid << std::endl;
60 TEveStraightLineSet* segmentSet =
new TEveStraightLineSet();
62 segmentSet->SetLineWidth( 3 );
68 if( TGeoBBox* box = dynamic_cast<TGeoBBox*>( shape->GetShape()))
74 double localPosition[3] = { pos.
x(), pos.
y(), pos.
z() };
75 double localDirectionIn[3] = { dir.
x(), dir.
y(), dir.
z() };
76 double localDirectionOut[3] = { -dir.
x(), -dir.
y(), -dir.
z() };
82 localDirectionIn[0]=0;
83 localDirectionOut[0]=0;
86 Double_t distIn = box->DistFromInside( localPosition, localDirectionIn );
87 Double_t distOut = box->DistFromInside( localPosition, localDirectionOut );
90 float localSegmentInnerPoint[3] = {
static_cast<float>(localPosition[0] + vIn.
x()),
91 static_cast<float>(localPosition[1] + vIn.
y()),
92 static_cast<float>(localPosition[2] + vIn.
z())
95 float localSegmentOuterPoint[3] = {
static_cast<float>(localPosition[0] + vOut.
x()),
96 static_cast<float>(localPosition[1] + vOut.
y()),
97 static_cast<float>(localPosition[2] + vOut.
z())
100 float globalSegmentInnerPoint[3];
101 float globalSegmentOuterPoint[3];
103 geom->
localToGlobal( rawid, localSegmentInnerPoint, globalSegmentInnerPoint, localSegmentOuterPoint, globalSegmentOuterPoint );
105 segmentSet->AddLine( globalSegmentInnerPoint[0], globalSegmentInnerPoint[1], globalSegmentInnerPoint[2],
106 globalSegmentOuterPoint[0], globalSegmentOuterPoint[1], globalSegmentOuterPoint[2] );
110 TEvePointSet* pointSet =
new TEvePointSet;
112 pointSet->SetMarkerSize(1.5);
115 std::vector<DTRecHit1D> recHits;
120 copy(phiRecHits.begin(), phiRecHits.end(), back_inserter(recHits));
124 copy(zRecHits.begin(), zRecHits.end(), back_inserter(recHits));
127 for (std::vector<DTRecHit1D>::const_iterator rh=recHits.begin(); rh!=recHits.end(); ++rh){
128 DTLayerId layerId = (*rh).wireId().layerId();
130 float hitLocalPos[3]= {hpos.
x(), hpos.
y(), hpos.
z()};
140 float hitGlobalPoint[3];
142 pointSet->SetNextPoint(hitGlobalPoint[0], hitGlobalPoint[1], hitGlobalPoint[2]);
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 DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
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
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
int superLayer() const
Return the superlayer number.
bool contains(unsigned int id) const
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.
const FWGeometry * getGeom() const