9 #include "TEveStraightLineSet.h" 10 #include "TEveCompound.h" 41 TEveElementList* product,
54 unsigned int id =
set->detId();
57 const float* pars =
geom->getParameters(
id);
58 const float*
shape =
geom->getShapePars(
id);
66 product->AddElement(itemHolder);
68 if (!
geom->contains(
id)) {
69 fwLog(
fwlog::kWarning) <<
"failed get geometry of Phase2TrackerCluster1D with detid: " <<
id << std::endl;
73 float halfLength =
shape[2];
74 float pitchSecond = pars[1];
78 TEveStraightLineSet* lineSet =
new TEveStraightLineSet;
80 float((*itc).column()) * pitchSecond - halfLength,
83 float((*itc).column() + 1.0) * pitchSecond - halfLength,
86 float globalPointBeg[3];
87 float globalPointEnd[3];
88 geom->localToGlobal(
id, localPointBeg, globalPointBeg);
89 geom->localToGlobal(
id, localPointEnd, globalPointEnd);
91 lineSet->AddLine(globalPointBeg, globalPointEnd);
92 lineSet->AddMarker(0, 0.5
f);
95 lineSet->SetMarkerColor(
dp.color());
106 if (TEveStraightLineSet*
ls = dynamic_cast<TEveStraightLineSet*>(*
parent->BeginChildren())) {
108 for (TEveProjectable::ProjList_i
j =
ls->BeginProjecteds();
j !=
ls->EndProjecteds(); ++
j) {
109 if (TEveStraightLineSet* pls = dynamic_cast<TEveStraightLineSet*>(*
j)) {
110 pls->SetMarkerColor(
c);
111 pls->ElementChanged();
115 ls->SetMarkerColor(
c);
116 ls->ElementChanged();
122 "Phase2TrackerCluster1D",
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
data_type const * const_iterator
const FWPhase2TrackerCluster1DProxyBuilder & operator=(const FWPhase2TrackerCluster1DProxyBuilder &)=delete
static const int kAll3DBits
const_iterator end(bool update=false) const
float phase2PixelLocalX(const double mpx, const float *, const float *)
const FWDisplayProperties & defaultDisplayProperties() const
void localModelChanges(const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin(bool update=false) const
const FWGeometry * getGeom() const
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
~FWPhase2TrackerCluster1DProxyBuilder(void) override
FWPhase2TrackerCluster1DProxyBuilder(void)
ModelInfo modelInfo(int iIndex) const
const FWEventItem * item() const