CMS 3D CMS Logo

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 FWSimpleProxyBuilderTemplateoperator= (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 FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) 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 ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
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() [1/2]

FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( )

◆ ~FWPFClusterRPZProxyBuilder()

FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder ( )
override

Definition at line 7 of file FWPFClusterRPZProxyBuilder.cc.

References m_clusterUtils.

7 { delete m_clusterUtils; }

◆ FWPFClusterRPZProxyBuilder() [2/2]

FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( const FWPFClusterRPZProxyBuilder )
delete

Member Function Documentation

◆ build()

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(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), Calorimetry_cff::dp, hcalRecHitTable_cff::energy, reco::PFCluster::energy(), l1tnanotables_cff::et, 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);
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 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
const fireworks::Context & context() const
std::vector< ScalableLines > m_clusters
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:169
double energy() const
cluster energy
Definition: PFCluster.h:74
static float caloR1(bool offset=true)
Definition: Context.cc:187
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
def ls(path, rec=False)
Definition: eostools.py:349
static float caloZ1(bool offset=true)
Definition: Context.cc:190
const FWEventItem * item() const

◆ classPurpose()

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

◆ classView()

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

Definition at line 95 of file FWPFClusterRPZProxyBuilder.cc.

◆ cleanLocal()

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

◆ havePerViewProduct()

bool FWPFClusterRPZProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWPFClusterRPZProxyBuilder.h.

40 { return true; }

◆ operator=()

const FWPFClusterRPZProxyBuilder& FWPFClusterRPZProxyBuilder::operator= ( const FWPFClusterRPZProxyBuilder )
delete

◆ purpose()

const std::string& FWPFClusterRPZProxyBuilder::purpose ( ) const
inline

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

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

◆ scaleProduct()

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, amptDefault_cfi::proj, 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 }
bool getPlotEt() const
FWViewEnergyScale * getEnergyScale() const
std::vector< ScalableLines > m_clusters
Definition: value.py:1
float getScaleFactor3D() const

◆ sharedBuild()

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(), Calorimetry_cff::dp, hcalRecHitTable_cff::energy, reco::PFCluster::energy(), l1tnanotables_cff::et, FWProxyBuilderBase::item(), eostools::ls(), m_clusters, m_clusterUtils, alignCSCRings::r, 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);
38 
40  ls->SetLineColor(dp.color());
41  m_clusters.push_back(ScalableLines(ls, et, energy, vc));
42  setupAddElement(ls, &oItemHolder);
43 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
const fireworks::Context & context() const
std::vector< ScalableLines > m_clusters
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:169
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
def ls(path, rec=False)
Definition: eostools.py:349
const FWEventItem * item() const

◆ typeName()

const std::string& FWPFClusterRPZProxyBuilder::typeName ( ) const
inline

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

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

◆ view()

const std::string& FWPFClusterRPZProxyBuilder::view ( ) const
inline

Definition at line 44 of file FWPFClusterRPZProxyBuilder.h.

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

Member Data Documentation

◆ m_clusters

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

Definition at line 48 of file FWPFClusterRPZProxyBuilder.h.

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

◆ m_clusterUtils

FWPFClusterRPZUtils* FWPFClusterRPZProxyBuilder::m_clusterUtils
protected