CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
FWPFClusterRPZProxyBuilder Class Reference

#include <FWPFClusterRPZProxyBuilder.h>

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

Public Member Functions

void build (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc) override
 
void cleanLocal () override
 
 FWPFClusterRPZProxyBuilder ()
 
 FWPFClusterRPZProxyBuilder (const FWPFClusterRPZProxyBuilder &)=delete
 
bool havePerViewProduct (FWViewType::EType) const override
 
const FWPFClusterRPZProxyBuilderoperator= (const FWPFClusterRPZProxyBuilder &)=delete
 
const std::string & purpose () const
 
void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWPFClusterRPZProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCluster >
 FWSimpleProxyBuilderTemplate ()
 
 FWSimpleProxyBuilderTemplate (const FWSimpleProxyBuilderTemplate &)=delete
 
const
FWSimpleProxyBuilderTemplate
operator= (const FWSimpleProxyBuilderTemplate &)=delete
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)=delete
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)=delete
 
 ~FWSimpleProxyBuilder () override
 
- 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 >
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
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
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- 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
 

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 ( )
FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder ( )
override

Definition at line 7 of file FWPFClusterRPZProxyBuilder.cc.

References m_clusterUtils.

7 { delete m_clusterUtils; }
FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( const FWPFClusterRPZProxyBuilder )
delete

Member Function Documentation

void FWPFClusterRPZProxyBuilder::build ( const reco::PFCluster iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overridevirtual

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 46 of file FWPFClusterRPZProxyBuilder.cc.

References FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFMaths::calculateEt(), fireworks::Context::caloR1(), fireworks::Context::caloZ1(), FWDisplayProperties::color(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), relval_parameters_module::energy, reco::PFCluster::energy(), FWProxyBuilderBase::item(), eostools::ls(), m_clusters, m_clusterUtils, FWProxyBuilderBase::setupAddElement(), fireworks::Context::voteMaxEtAndEnergy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

49  {
50  /* Handles RhoZ view */
51  float energy, et;
52  float ecalR = context().caloR1();
53  float ecalZ = context().caloZ1();
55  TEveScalableStraightLineSet *ls;
56  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
57 
58  energy = iData.energy();
59  et = FWPFMaths::calculateEt(centre, energy);
60  context().voteMaxEtAndEnergy(et, energy);
61 
62  ls = m_clusterUtils->buildRhoZClusterLineSet(iData, vc, context().caloTransAngle(), energy, et, ecalR, ecalZ);
63  ls->SetLineColor(dp.color());
64 
65  m_clusters.push_back(ScalableLines(ls, et, energy, vc));
66  setupAddElement(ls, &oItemHolder);
67 }
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
def ls
Definition: eostools.py:349
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
const FWEventItem * item() const
Color_t color() const
std::vector< ScalableLines > m_clusters
static float caloR1(bool offset=true)
Definition: Context.cc:180
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:74
static float caloZ1(bool offset=true)
Definition: Context.cc:183
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
const std::string & FWPFClusterRPZProxyBuilder::classPurpose ( )
static

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

void FWPFClusterRPZProxyBuilder::cleanLocal ( )
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 42 of file FWPFClusterRPZProxyBuilder.h.

References m_clusters.

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

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWPFClusterRPZProxyBuilder.h.

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

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

46 :
47  // ----------------------- Data Members ----------------------------
void FWPFClusterRPZProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 10 of file FWPFClusterRPZProxyBuilder.cc.

References FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), mps_fire::i, m_clusters, and relativeConstraints::value.

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

Definition at line 27 of file FWPFClusterRPZProxyBuilder.cc.

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

28  {
29  /* Handles RhoPhi view */
30  TEveScalableStraightLineSet *ls;
31  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
33  float energy, et;
34 
35  energy = iData.energy();
36  et = FWPFMaths::calculateEt(centre, energy);
37  context().voteMaxEtAndEnergy(et, energy);
38 
39  ls = m_clusterUtils->buildRhoPhiClusterLineSet(iData, vc, energy, et, r);
40  ls->SetLineColor(dp.color());
41  m_clusters.push_back(ScalableLines(ls, et, energy, vc));
42  setupAddElement(ls, &oItemHolder);
43 }
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
def ls
Definition: eostools.py:349
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
const std::string& FWPFClusterRPZProxyBuilder::typeName ( ) const
inline

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

46 :
47  // ----------------------- Data Members ----------------------------
const std::string& FWPFClusterRPZProxyBuilder::view ( ) const
inline

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

46 :
47  // ----------------------- Data Members ----------------------------

Member Data Documentation

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

Definition at line 48 of file FWPFClusterRPZProxyBuilder.h.

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

FWPFClusterRPZUtils* FWPFClusterRPZProxyBuilder::m_clusterUtils
protected