CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

FWPFClusterRPZProxyBuilder Class Reference

#include <FWPFClusterRPZProxyBuilder.h>

Inheritance diagram for FWPFClusterRPZProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::PFCluster > FWSimpleProxyBuilder FWProxyBuilderBase FWPFEcalClusterRPZProxyBuilder FWPFHcalClusterRPZProxyBuilder

List of all members.

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< ScalableLinesm_clusters
FWPFClusterRPZUtilsm_clusterUtils

Private Member Functions

 FWPFClusterRPZProxyBuilder (const FWPFClusterRPZProxyBuilder &)
const FWPFClusterRPZProxyBuilderoperator= (const FWPFClusterRPZProxyBuilder &)

Detailed Description

Definition at line 25 of file FWPFClusterRPZProxyBuilder.h.


Constructor & Destructor Documentation

FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( )

Definition at line 4 of file FWPFClusterRPZProxyBuilder.cc.

References m_clusterUtils.

FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder ( ) [virtual]

Definition at line 10 of file FWPFClusterRPZProxyBuilder.cc.

References m_clusterUtils.

{
   delete m_clusterUtils;
}
FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( const FWPFClusterRPZProxyBuilder ) [private]

Member Function Documentation

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 ( )
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, 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]

Member Data Documentation

Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.

Referenced by build(), cleanLocal(), scaleProduct(), and sharedBuild().