CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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

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
 
const std::string & purpose () const
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWPFClusterRPZProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCluster >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
virtual void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- Static Public Member Functions inherited from FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Protected Member Functions

virtual void sharedBuild (const reco::PFCluster &cluster, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc, float radius)
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCluster >
virtual void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context)
 
virtual void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context)
 
virtual void buildViewType (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const reco::PFClustermodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- Protected Member Functions inherited from FWProxyBuilderBase
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 

Protected Attributes

std::vector< ScalableLinesm_clusters
 
FWPFClusterRPZUtilsm_clusterUtils
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Private Member Functions

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

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 

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.

11 {
12  delete m_clusterUtils;
13 }
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 FWPFHcalClusterRPZProxyBuilder, and FWPFEcalClusterRPZProxyBuilder.

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::dp, reco::PFCluster::energy(), stringResolutionProvider_cfi::et, FWProxyBuilderBase::item(), eostools::ls(), m_clusters, m_clusterUtils, FWProxyBuilderBase::setupAddElement(), fireworks::Context::voteMaxEtAndEnergy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

59 {
60  /* Handles RhoZ view */
61  float energy, et;
62  float ecalR = context().caloR1();
63  float ecalZ = context().caloZ1();
65  TEveScalableStraightLineSet *ls;
66  TEveVector centre = TEveVector( iData.x(), iData.y(), iData.z() );
67 
68  energy = iData.energy();
69  et = FWPFMaths::calculateEt( centre, energy );
70  context().voteMaxEtAndEnergy( et, energy );
71 
72  ls = m_clusterUtils->buildRhoZClusterLineSet( iData, vc, context().caloTransAngle(), energy, et, ecalR, ecalZ );
73  ls->SetLineColor( dp.color() );
74 
75  m_clusters.push_back( ScalableLines( ls, et, energy, vc ) );
76  setupAddElement( ls, &oItemHolder );
77 }
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:183
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:163
const FWEventItem * item() const
Color_t color() const
std::vector< ScalableLines > m_clusters
static float caloR1(bool offset=true)
Definition: Context.cc:208
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:157
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:82
def ls(path, rec=False)
Definition: eostools.py:348
auto dp
Definition: deltaR.h:22
et
define resolution functions of each parameter
static float caloZ1(bool offset=true)
Definition: Context.cc:218
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:160
const std::string & FWPFClusterRPZProxyBuilder::classPurpose ( )
static

Definition at line 104 of file FWPFClusterRPZProxyBuilder.cc.

const std::string & FWPFClusterRPZProxyBuilder::classRegisterTypeName ( )
static

Definition at line 104 of file FWPFClusterRPZProxyBuilder.cc.

const std::string & FWPFClusterRPZProxyBuilder::classTypeName ( )
static

Definition at line 104 of file FWPFClusterRPZProxyBuilder.cc.

const std::string & FWPFClusterRPZProxyBuilder::classView ( )
static

Definition at line 104 of file FWPFClusterRPZProxyBuilder.cc.

virtual void FWPFClusterRPZProxyBuilder::cleanLocal ( )
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWPFClusterRPZProxyBuilder.h.

References m_clusters.

40 { m_clusters.clear(); }
std::vector< ScalableLines > m_clusters
virtual bool FWPFClusterRPZProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 38 of file FWPFClusterRPZProxyBuilder.h.

38 { return true; }
const FWPFClusterRPZProxyBuilder& FWPFClusterRPZProxyBuilder::operator= ( const FWPFClusterRPZProxyBuilder )
private
const std::string& FWPFClusterRPZProxyBuilder::purpose ( ) const
inline

Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.

44 :
45  // ----------------------- Data Members ----------------------------
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(), mps_fire::i, m_clusters, and relativeConstraints::value.

18 {
19  typedef std::vector<ScalableLines> Lines_t;
20  FWViewEnergyScale *caloScale = vc->getEnergyScale();
21 
22  for( Lines_t::iterator i = m_clusters.begin(); i != m_clusters.end(); ++i )
23  {
24  if( vc == (*i).m_vc )
25  {
26  float value = caloScale->getPlotEt() ? (*i).m_et : (*i).m_energy;
27  (*i).m_ls->SetScale( caloScale->getScaleFactor3D() * value );
28  TEveProjected *proj = *(*i).m_ls->BeginProjecteds();
29  proj->UpdateProjection();
30  }
31  }
32 }
float getScaleFactor3D() const
FWViewEnergyScale * getEnergyScale() const
std::vector< ScalableLines > m_clusters
Definition: value.py:1
bool getPlotEt() const
void FWPFClusterRPZProxyBuilder::sharedBuild ( const reco::PFCluster cluster,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext vc,
float  radius 
)
protectedvirtual

Definition at line 36 of file FWPFClusterRPZProxyBuilder.cc.

References FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFMaths::calculateEt(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), reco::dp, reco::PFCluster::energy(), stringResolutionProvider_cfi::et, FWProxyBuilderBase::item(), eostools::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().

38 {
39  /* Handles RhoPhi view */
40  TEveScalableStraightLineSet *ls;
41  TEveVector centre = TEveVector( iData.x(), iData.y(), iData.z() );
43  float energy, et;
44 
45  energy = iData.energy();
46  et = FWPFMaths::calculateEt( centre, energy );
47  context().voteMaxEtAndEnergy( et, energy );
48 
49  ls = m_clusterUtils->buildRhoPhiClusterLineSet( iData, vc, energy, et, r );
50  ls->SetLineColor( dp.color() );
51  m_clusters.push_back( ScalableLines( ls, et, energy, vc ) );
52  setupAddElement( ls, &oItemHolder );
53 }
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:183
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
const FWEventItem * item() const
std::vector< ScalableLines > m_clusters
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
def ls(path, rec=False)
Definition: eostools.py:348
auto dp
Definition: deltaR.h:22
et
define resolution functions of each parameter
const std::string& FWPFClusterRPZProxyBuilder::typeName ( ) const
inline

Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.

44 :
45  // ----------------------- Data Members ----------------------------
const std::string& FWPFClusterRPZProxyBuilder::view ( ) const
inline

Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.

44 :
45  // ----------------------- Data Members ----------------------------

Member Data Documentation

std::vector<ScalableLines> FWPFClusterRPZProxyBuilder::m_clusters
protected

Definition at line 46 of file FWPFClusterRPZProxyBuilder.h.

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

FWPFClusterRPZUtils* FWPFClusterRPZProxyBuilder::m_clusterUtils
protected