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

void build (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc) override
 
void cleanLocal () override
 
 FWPFClusterRPZProxyBuilder ()
 
bool havePerViewProduct (FWViewType::EType) const override
 
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 ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 ~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 ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
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 (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) 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
 
virtual void buildViewType (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
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
 

Private Member Functions

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

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

Definition at line 4 of file FWPFClusterRPZProxyBuilder.cc.

References m_clusterUtils.

◆ ~FWPFClusterRPZProxyBuilder()

FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder ( )
override

Definition at line 7 of file FWPFClusterRPZProxyBuilder.cc.

7 { delete m_clusterUtils; }

References m_clusterUtils.

◆ FWPFClusterRPZProxyBuilder() [2/2]

FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder ( const FWPFClusterRPZProxyBuilder )
privatedelete

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.

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 }

References FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFMaths::calculateEt(), fireworks::Context::caloR1(), fireworks::Context::caloZ1(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), Calorimetry_cff::dp, HCALHighEnergyHPDFilter_cfi::energy, reco::PFCluster::energy(), EgHLTOffHistBins_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().

◆ 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.

42 { m_clusters.clear(); }

References 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 )
privatedelete

◆ 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.

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 }

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

◆ sharedBuild()

void FWPFClusterRPZProxyBuilder::sharedBuild ( const reco::PFCluster cluster,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext vc,
float  radius 
)
protectedvirtual

◆ 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
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
reco::CaloCluster::y
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
mps_fire.i
i
Definition: mps_fire.py:428
FWPFClusterRPZUtils
Definition: FWPFClusterRPZUtils.h:38
FWPFClusterRPZUtils::buildRhoPhiClusterLineSet
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
Definition: FWPFClusterRPZUtils.cc:4
reco::CaloCluster::z
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
FWViewEnergyScale::getPlotEt
bool getPlotEt() const
Definition: FWViewEnergyScale.h:47
ScalableLines
Definition: FWPFClusterRPZUtils.h:26
FWPFClusterRPZProxyBuilder::m_clusters
std::vector< ScalableLines > m_clusters
Definition: FWPFClusterRPZProxyBuilder.h:48
FWEventItem::defaultDisplayProperties
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:74
FWPFMaths::calculateEt
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:158
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWPFClusterRPZUtils::buildRhoZClusterLineSet
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
Definition: FWPFClusterRPZUtils.cc:38
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
FWPFClusterRPZProxyBuilder::m_clusterUtils
FWPFClusterRPZUtils * m_clusterUtils
Definition: FWPFClusterRPZProxyBuilder.h:49
amptDefault_cfi.proj
proj
Definition: amptDefault_cfi.py:13
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
value
Definition: value.py:1
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
FWDisplayProperties
Definition: FWDisplayProperties.h:28
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWViewEnergyScale::getScaleFactor3D
float getScaleFactor3D() const
Definition: FWViewEnergyScale.h:44
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition: Context.cc:183
relativeConstraints.value
value
Definition: relativeConstraints.py:53
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
FWViewContext::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: FWViewContext.cc:25
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
reco::CaloCluster::x
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172