#include <FWLegoCandidate.h>
Public Member Functions | |
FWLegoCandidate (const FWViewContext *vc, const fireworks::Context &context, float et, float energy, float pt, float eta, float phi) | |
FWLegoCandidate () | |
void | updateScale (const FWViewContext *vc, const fireworks::Context &) |
virtual | ~FWLegoCandidate () |
Private Member Functions | |
FWLegoCandidate (const FWLegoCandidate &) | |
const FWLegoCandidate & | operator= (const FWLegoCandidate &) |
Private Attributes | |
float | m_energy |
float | m_et |
float | m_eta |
float | m_phi |
float | m_pt |
Definition at line 29 of file FWLegoCandidate.h.
FWLegoCandidate::FWLegoCandidate | ( | const FWViewContext * | vc, |
const fireworks::Context & | context, | ||
float | et, | ||
float | energy, | ||
float | pt, | ||
float | eta, | ||
float | phi | ||
) |
Definition at line 8 of file FWLegoCandidate.cc.
References funct::cos(), f, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactorLego(), create_public_lumi_plots::log, m_energy, m_eta, m_phi, m_pt, Pi, CosmicsPD_Skims::radius, funct::sin(), and Geom::twoPi().
: m_energy(energy), m_et(et), m_pt(pt), m_eta(eta), m_phi(phi) { float base = 0.001; // Floor offset 1% // First vertical line FWViewEnergyScale *caloScale = vc->getEnergyScale(); float val = caloScale->getPlotEt() ? m_pt : m_energy; // Use pt instead of et AddLine( m_eta, m_phi, base, m_eta, m_phi, base + val * caloScale->getScaleFactorLego() ); AddMarker( 0, 1.f ); SetMarkerStyle( 3 ); SetMarkerSize( 0.01 ); SetDepthTest( false ); // Circle pt const unsigned int nLineSegments = 20; const double radius = log( 1 + m_pt ) / log(10) / 30.f; //const double radius = m_pt / 100.f; const double twoPi = 2 * TMath::Pi(); for( unsigned int iPhi = 0; iPhi < nLineSegments; ++iPhi ) { AddLine( m_eta + radius * cos( twoPi / nLineSegments * iPhi ), m_phi + radius * sin( twoPi / nLineSegments * iPhi ), base, m_eta + radius * cos( twoPi / nLineSegments * ( iPhi + 1 ) ), m_phi + radius * sin( twoPi / nLineSegments * ( iPhi + 1 ) ), base ); } }
FWLegoCandidate::FWLegoCandidate | ( | ) | [inline] |
Definition at line 35 of file FWLegoCandidate.h.
{}
virtual FWLegoCandidate::~FWLegoCandidate | ( | ) | [inline, virtual] |
Definition at line 36 of file FWLegoCandidate.h.
{}
FWLegoCandidate::FWLegoCandidate | ( | const FWLegoCandidate & | ) | [private] |
const FWLegoCandidate& FWLegoCandidate::operator= | ( | const FWLegoCandidate & | ) | [private] |
void FWLegoCandidate::updateScale | ( | const FWViewContext * | vc, |
const fireworks::Context & | context | ||
) |
Definition at line 45 of file FWLegoCandidate.cc.
References FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactorLego(), prof2calltree::l, m, m_energy, and m_pt.
Referenced by FWPFPatJetLegoProxyBuilder< T >::scaleProduct(), FWPFBlockProxyBuilder::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), and FWPFCandidatesLegoProxyBuilder::scaleProduct().
{ FWViewEnergyScale *caloScale = vc->getEnergyScale(); float val = caloScale->getPlotEt() ? m_pt : m_energy; // Use pt instead of et float scaleFac = caloScale->getScaleFactorLego(); // Resize first line TEveChunkManager::iterator li( GetLinePlex() ); li.next(); TEveStraightLineSet::Line_t &l = * ( TEveStraightLineSet::Line_t* ) li(); l.fV2[2] = l.fV1[2] + val * scaleFac; // Move end point (marker) TEveChunkManager::iterator mi( GetMarkerPlex() ); mi.next(); TEveStraightLineSet::Marker_t &m = * ( TEveStraightLineSet::Marker_t* ) mi(); m.fV[2] = l.fV2[2]; // Set to new top of line }
float FWLegoCandidate::m_energy [private] |
Definition at line 46 of file FWLegoCandidate.h.
Referenced by FWLegoCandidate(), and updateScale().
float FWLegoCandidate::m_et [private] |
Definition at line 47 of file FWLegoCandidate.h.
float FWLegoCandidate::m_eta [private] |
Definition at line 49 of file FWLegoCandidate.h.
Referenced by FWLegoCandidate().
float FWLegoCandidate::m_phi [private] |
Definition at line 50 of file FWLegoCandidate.h.
Referenced by FWLegoCandidate().
float FWLegoCandidate::m_pt [private] |
Definition at line 48 of file FWLegoCandidate.h.
Referenced by FWLegoCandidate(), and updateScale().