#include <FWPFClusterRPZProxyBuilder.h>
Public Member Functions | |
virtual void | build (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc) |
virtual void | cleanLocal () |
FWPFClusterRPZProxyBuilder () | |
virtual bool | havePerViewProduct (FWViewType::EType) const |
REGISTER_PROXYBUILDER_METHODS () | |
virtual void | scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) |
virtual | ~FWPFClusterRPZProxyBuilder () |
Protected Member Functions | |
virtual void | sharedBuild (const reco::PFCluster &cluster, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc, float radius) |
Protected Attributes | |
std::vector< ScalableLines > | m_clusters |
FWPFClusterRPZUtils * | m_clusterUtils |
Private Member Functions | |
FWPFClusterRPZProxyBuilder (const FWPFClusterRPZProxyBuilder &) | |
const FWPFClusterRPZProxyBuilder & | operator= (const FWPFClusterRPZProxyBuilder &) |
Definition at line 25 of file FWPFClusterRPZProxyBuilder.h.
FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder | ( | ) |
Definition at line 4 of file FWPFClusterRPZProxyBuilder.cc.
References m_clusterUtils.
{ m_clusterUtils = new FWPFClusterRPZUtils(); }
FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder | ( | ) | [virtual] |
Definition at line 10 of file FWPFClusterRPZProxyBuilder.cc.
References m_clusterUtils.
{ delete m_clusterUtils; }
FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder | ( | const FWPFClusterRPZProxyBuilder & | ) | [private] |
void FWPFClusterRPZProxyBuilder::build | ( | const reco::PFCluster & | iData, |
unsigned int | iIndex, | ||
TEveElement & | oItemHolder, | ||
const FWViewContext * | |||
) | [virtual] |
iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement
Reimplemented from FWSimpleProxyBuilderTemplate< reco::PFCluster >.
Reimplemented in FWPFEcalClusterRPZProxyBuilder, and FWPFHcalClusterRPZProxyBuilder.
Definition at line 57 of file FWPFClusterRPZProxyBuilder.cc.
References FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFMaths::calculateEt(), fireworks::Context::caloR1(), fireworks::Context::caloZ1(), FWDisplayProperties::color(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), reco::PFCluster::energy(), relval_parameters_module::energy, FWProxyBuilderBase::item(), python::rootplot::utilities::ls(), m_clusters, m_clusterUtils, FWProxyBuilderBase::setupAddElement(), fireworks::Context::voteMaxEtAndEnergy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().
{ /* Handles RhoZ view */ float energy, et; float ecalR = context().caloR1(); float ecalZ = context().caloZ1(); const FWDisplayProperties &dp = item()->defaultDisplayProperties(); TEveScalableStraightLineSet *ls; TEveVector centre = TEveVector( iData.x(), iData.y(), iData.z() ); energy = iData.energy(); et = FWPFMaths::calculateEt( centre, energy ); context().voteMaxEtAndEnergy( et, energy ); ls = m_clusterUtils->buildRhoZClusterLineSet( iData, vc, context().caloTransAngle(), energy, et, ecalR, ecalZ ); ls->SetLineColor( dp.color() ); m_clusters.push_back( ScalableLines( ls, et, energy, vc ) ); setupAddElement( ls, &oItemHolder ); }
virtual void FWPFClusterRPZProxyBuilder::cleanLocal | ( | ) | [inline, virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 36 of file FWPFClusterRPZProxyBuilder.h.
References m_clusters.
{ m_clusters.clear(); }
virtual bool FWPFClusterRPZProxyBuilder::havePerViewProduct | ( | FWViewType::EType | ) | const [inline, virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 35 of file FWPFClusterRPZProxyBuilder.h.
{ return true; }
const FWPFClusterRPZProxyBuilder& FWPFClusterRPZProxyBuilder::operator= | ( | const FWPFClusterRPZProxyBuilder & | ) | [private] |
FWPFClusterRPZProxyBuilder::REGISTER_PROXYBUILDER_METHODS | ( | ) |
Reimplemented in FWPFEcalClusterRPZProxyBuilder, and FWPFHcalClusterRPZProxyBuilder.
void FWPFClusterRPZProxyBuilder::scaleProduct | ( | TEveElementList * | parent, |
FWViewType::EType | viewType, | ||
const FWViewContext * | vc | ||
) | [virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 17 of file FWPFClusterRPZProxyBuilder.cc.
References FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), i, m_clusters, trackerHitRTTI::proj, and relativeConstraints::value.
{ typedef std::vector<ScalableLines> Lines_t; FWViewEnergyScale *caloScale = vc->getEnergyScale(); for( Lines_t::iterator i = m_clusters.begin(); i != m_clusters.end(); ++i ) { if( vc == (*i).m_vc ) { float value = caloScale->getPlotEt() ? (*i).m_et : (*i).m_energy; (*i).m_ls->SetScale( caloScale->getScaleFactor3D() * value ); TEveProjected *proj = *(*i).m_ls->BeginProjecteds(); proj->UpdateProjection(); } } }
void FWPFClusterRPZProxyBuilder::sharedBuild | ( | const reco::PFCluster & | cluster, |
unsigned int | iIndex, | ||
TEveElement & | oItemHolder, | ||
const FWViewContext * | vc, | ||
float | radius | ||
) | [protected, virtual] |
Definition at line 36 of file FWPFClusterRPZProxyBuilder.cc.
References FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFMaths::calculateEt(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), reco::PFCluster::energy(), relval_parameters_module::energy, FWProxyBuilderBase::item(), python::rootplot::utilities::ls(), m_clusters, m_clusterUtils, FWProxyBuilderBase::setupAddElement(), fireworks::Context::voteMaxEtAndEnergy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().
Referenced by FWPFEcalClusterRPZProxyBuilder::build(), and FWPFHcalClusterRPZProxyBuilder::build().
{ /* Handles RhoPhi view */ TEveScalableStraightLineSet *ls; TEveVector centre = TEveVector( iData.x(), iData.y(), iData.z() ); const FWDisplayProperties &dp = item()->defaultDisplayProperties(); float energy, et; energy = iData.energy(); et = FWPFMaths::calculateEt( centre, energy ); context().voteMaxEtAndEnergy( et, energy ); ls = m_clusterUtils->buildRhoPhiClusterLineSet( iData, vc, energy, et, r ); ls->SetLineColor( dp.color() ); m_clusters.push_back( ScalableLines( ls, et, energy, vc ) ); setupAddElement( ls, &oItemHolder ); }
std::vector<ScalableLines> FWPFClusterRPZProxyBuilder::m_clusters [protected] |
Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.
Referenced by build(), cleanLocal(), scaleProduct(), and sharedBuild().
Definition at line 43 of file FWPFClusterRPZProxyBuilder.h.
Referenced by build(), FWPFClusterRPZProxyBuilder(), sharedBuild(), and ~FWPFClusterRPZProxyBuilder().