7 : m_builder(pb), m_energy(e), m_et(et), m_isTallest(
false)
20 for(
size_t i = 0;
i < corners.size(); ++
i )
26 m_tower->SetLineColor( kBlack );
33 for(
size_t i = 0;
i < 4; ++
i )
34 corners[
i+4].fZ = corners[
i].fZ + scale;
41 m_tower =
new TEveBox(
"EcalRecHitTower" );
42 std::vector<TEveVector> towerCorners = corners;
58 m_ls =
new TEveStraightLineSet(
"EcalRecHitLineSet" );
63 m_ls->AddLine(c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ);
64 m_ls->AddLine(c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ);
65 m_ls->AddLine(c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ);
66 m_ls->AddLine(c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ);
69 m_ls->SetMarkerStyle(1);
70 m_ls->AddLine(c.fX, c.fY, c.fZ, c.fX, c.fY, c.fZ);
71 m_ls->AddMarker(0, 0.);
90 for(
unsigned int i = 0;
i < 4; ++
i )
95 m_tower->SetVertex(
i, data[0], data[1], 0 );
96 m_tower->SetVertex(
i+4, data[0], data[1], scale);
101 float d = 0.5 * (
m_tower->GetVertex(1)[0] -
m_tower->GetVertex(0)[0]);
103 float z = scale * 1.001;
104 setLine(0, c.fX - d, c.fY -d, z, c.fX + d, c.fY -d, z);
105 setLine(1, c.fX + d, c.fY -d, z, c.fX + d, c.fY +d, z);
106 setLine(2, c.fX + d, c.fY +d, z, c.fX - d, c.fY +d, z);
107 setLine(3, c.fX - d, c.fY +d, z, c.fX - d, c.fY -d, z);
112 setLine( 4, c.fX - d, c.fY - d, z, c.fX + d, c.fY + d, z );
113 setLine( 5, c.fX - d, c.fY + d, z, c.fX + d, c.fY - d, z );
116 TEveStraightLineSet::Marker_t*
m = ((TEveStraightLineSet::Marker_t*)(
m_ls->GetMarkerPlex().Atom(0)));
117 m->fV[0] = c.fX; m->fV[1] = c.fY; m->fV[2] =
z;
121 m_ls->StampTransBBox();
129 TEveStraightLineSet::Line_t*
l = ((TEveStraightLineSet::Line_t*)(
m_ls->GetLinePlex().Atom(idx)));
158 m_ls->AddLine( x1, y1, z1, x2, y2, z2 );
165 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)
void convertToTower(std::vector< TEveVector > &corners, float scale)
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
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 setupEveBox(const std::vector< TEveVector > &corners)
void setIsTallest(bool b)
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
TEveStraightLineSet * m_ls
float getMaxValLog(bool et) const