7 : m_builder(pb), m_energy(e), m_et(et), m_isTallest(
false)
20 for(
size_t i = 0;
i < 4; ++
i )
23 corners[
i+4].fZ = corners[
i].fZ + scale;
25 m_tower->SetVertex( j, corners[j] );
31 m_tower->SetLineColor( kBlack );
38 m_tower =
new TEveBox(
"EcalRecHitTower" );
39 std::vector<TEveVector> towerCorners = corners;
54 m_ls =
new TEveStraightLineSet(
"EcalRecHitLineSet" );
59 m_ls->AddLine( c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ );
60 m_ls->AddLine( c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ );
61 m_ls->AddLine( c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ );
62 m_ls->AddLine( c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ );
65 m_ls->SetMarkerStyle( 1 );
66 m_ls->AddLine( c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ );
67 m_ls->AddMarker( 0, 0. );
86 for(
unsigned int i = 0;
i < 4; ++
i )
91 m_tower->SetVertex(
i, data[0], data[1], 0 );
92 m_tower->SetVertex(
i+4, data[0], data[1], scale);
97 float d = 0.5 * (
m_tower->GetVertex(1)[0] -
m_tower->GetVertex(0)[0]);
99 float z = scale * 1.001;
100 setLine(0, c.fX - d, c.fY -d, z, c.fX + d, c.fY -d, z);
101 setLine(1, c.fX + d, c.fY -d, z, c.fX + d, c.fY +d, z);
102 setLine(2, c.fX + d, c.fY +d, z, c.fX - d, c.fY +d, z);
103 setLine(3, c.fX - d, c.fY +d, z, c.fX - d, c.fY -d, z);
108 setLine( 4, c.fX - d, c.fY - d, z, c.fX + d, c.fY + d, z );
109 setLine( 5, c.fX - d, c.fY + d, z, c.fX + d, c.fY - d, z );
112 TEveStraightLineSet::Marker_t*
m = ((TEveStraightLineSet::Marker_t*)(
m_ls->GetMarkerPlex().Atom(0)));
113 m->fV[0] = c.fX; m->fV[1] = c.fY; m->fV[2] =
z;
117 m_ls->StampTransBBox();
125 TEveStraightLineSet::Line_t*
l = ((TEveStraightLineSet::Line_t*)(
m_ls->GetLinePlex().Atom(idx)));
154 m_ls->AddLine( x1, y1, z1, x2, y2, z2 );
161 m_ls->AddLine(v1.fX, v1.fY, v1.fZ, v2.fX, v2.fY, v2.fZ);
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
FWPFEcalRecHitLegoProxyBuilder * m_builder
void addLine(float x1, float y1, float z1, float x2, float y2, float z2)
void buildTower(const std::vector< TEveVector > &corners, const FWViewContext *vc)
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
FWViewEnergyScale * getEnergyScale() const
void setupEveBox(std::vector< TEveVector > &corners, float scale)
FWPFLegoRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, FWPFEcalRecHitLegoProxyBuilder *pb, const FWViewContext *vc, float e, float et)
float getScaleFactorLego() const
void updateScale(const FWViewContext *vc)
Log< T >::type log(const T &t)
void setIsTallest(bool b)
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
TEveStraightLineSet * m_ls
float getMaxValLog(bool et) const