13 #include "TEveGeoNode.h" 14 #include "TEveStraightLineSet.h" 41 TEveElement& oItemHolder,
47 fwLog(
fwlog::kError) <<
"failed to get geometry of CSC chamber with rawid: " << rawid << std::endl;
51 TEveStraightLineSet* segmentSet =
new TEveStraightLineSet();
53 segmentSet->SetLineWidth(3);
57 if (TGeoTrap* trap = dynamic_cast<TGeoTrap*>(shape->GetShape()))
63 Double_t localPosition[3] = {pos.
x(), pos.
y(), pos.
z()};
64 Double_t localDirectionIn[3] = {dir.
x(), dir.
y(), dir.
z()};
65 Double_t localDirectionOut[3] = {-dir.
x(), -dir.
y(), -dir.
z()};
67 float distIn = trap->DistFromInside(localPosition, localDirectionIn);
68 float distOut = trap->DistFromInside(localPosition, localDirectionOut);
71 float localSegmentInnerPoint[3] = {
static_cast<float>(localPosition[0] + vIn.
x()),
72 static_cast<float>(localPosition[1] + vIn.
y()),
73 static_cast<float>(localPosition[2] + vIn.
z())};
75 float localSegmentOuterPoint[3] = {
static_cast<float>(localPosition[0] + vOut.
x()),
76 static_cast<float>(localPosition[1] + vOut.
y()),
77 static_cast<float>(localPosition[2] + vOut.
z())};
79 float globalSegmentInnerPoint[3];
80 float globalSegmentOuterPoint[3];
83 rawid, localSegmentInnerPoint, globalSegmentInnerPoint, localSegmentOuterPoint, globalSegmentOuterPoint);
85 segmentSet->AddLine(globalSegmentInnerPoint[0],
86 globalSegmentInnerPoint[1],
87 globalSegmentInnerPoint[2],
88 globalSegmentOuterPoint[0],
89 globalSegmentOuterPoint[1],
90 globalSegmentOuterPoint[2]);
CSCDetId cscDetId() const
LocalVector localDirection() const override
Local direction.
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
constexpr uint32_t rawId() const
get the raw id
const FWEventItem * item() const
static const int kAll3DBits
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
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
FWCSCSegmentProxyBuilder(void)
const FWCSCSegmentProxyBuilder & operator=(const FWCSCSegmentProxyBuilder &)=delete
const FWGeometry * getGeom() const
Basic3DVector unit() const