CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
FWPFClusterLegoProxyBuilder Class Reference

#include <FWPFClusterLegoProxyBuilder.h>

Inheritance diagram for FWPFClusterLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::PFCluster > FWSimpleProxyBuilder FWProxyBuilderBase FWPFEcalClusterLegoProxyBuilder FWPFHcalClusterLegoProxyBuilder

Public Member Functions

 FWPFClusterLegoProxyBuilder ()
 
bool havePerViewProduct (FWViewType::EType) const override
 
void localModelChanges (const FWModelId &iId, TEveElement *el, FWViewType::EType viewType, const FWViewContext *vc) 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
 
 ~FWPFClusterLegoProxyBuilder () 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 std::string typeOfBuilder ()
 
- 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

float calculateEt (const reco::PFCluster &cluster, float E)
 
void sharedBuild (const reco::PFCluster &, TEveElement &, const FWViewContext *)
 
- 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 build (const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
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
virtual void cleanLocal ()
 
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 modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 

Private Member Functions

 FWPFClusterLegoProxyBuilder (const FWPFClusterLegoProxyBuilder &)
 
const FWPFClusterLegoProxyBuilderoperator= (const FWPFClusterLegoProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 31 of file FWPFClusterLegoProxyBuilder.h.

Constructor & Destructor Documentation

◆ FWPFClusterLegoProxyBuilder() [1/2]

FWPFClusterLegoProxyBuilder::FWPFClusterLegoProxyBuilder ( )
inline

Definition at line 36 of file FWPFClusterLegoProxyBuilder.h.

36 {}

◆ ~FWPFClusterLegoProxyBuilder()

FWPFClusterLegoProxyBuilder::~FWPFClusterLegoProxyBuilder ( )
inlineoverride

Definition at line 37 of file FWPFClusterLegoProxyBuilder.h.

37 {}

◆ FWPFClusterLegoProxyBuilder() [2/2]

FWPFClusterLegoProxyBuilder::FWPFClusterLegoProxyBuilder ( const FWPFClusterLegoProxyBuilder )
private

Member Function Documentation

◆ calculateEt()

float FWPFClusterLegoProxyBuilder::calculateEt ( const reco::PFCluster cluster,
float  E 
)
protected

◆ classPurpose()

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

◆ classRegisterTypeName()

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

◆ classTypeName()

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

◆ classView()

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

◆ havePerViewProduct()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 43 of file FWPFClusterLegoProxyBuilder.h.

43 { return true; }

◆ localModelChanges()

void FWPFClusterLegoProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  el,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 5 of file FWPFClusterLegoProxyBuilder.cc.

References FWModelId::index(), FWProxyBuilderBase::item(), dqmiolumiharvest::j, and class-composition::parent.

8  {
9  // Line set marker is not the same colour as line, fixed here
10  if ((parent)->HasChildren()) {
11  for (TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); j++) {
12  FWLegoCandidate *cluster = dynamic_cast<FWLegoCandidate *>(*j);
13  cluster->SetMarkerColor(FWProxyBuilderBase::item()->modelInfo(iId.index()).displayProperties().color());
14  cluster->ElementChanged();
15  }
16  }
17 }
int index() const
Definition: FWModelId.h:41
const FWEventItem * item() const

◆ operator=()

const FWPFClusterLegoProxyBuilder& FWPFClusterLegoProxyBuilder::operator= ( const FWPFClusterLegoProxyBuilder )
private

◆ purpose()

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

Definition at line 50 of file FWPFClusterLegoProxyBuilder.h.

52 :
53  // --------------------- Member Functions --------------------------

◆ scaleProduct()

void FWPFClusterLegoProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 20 of file FWPFClusterLegoProxyBuilder.cc.

References FWProxyBuilderBase::context(), mps_fire::i, class-composition::parent, and FWLegoCandidate::updateScale().

22  {
23  for (TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i) {
24  if ((*i)->HasChildren()) {
25  TEveElement *el = (*i)->FirstChild(); // there is only one child added in this proxy builder
26  FWLegoCandidate *cluster = dynamic_cast<FWLegoCandidate *>(el);
27  cluster->updateScale(vc, context());
28  }
29  }
30 }
const fireworks::Context & context() const
void updateScale(const FWViewContext *vc, const fireworks::Context &)

◆ sharedBuild()

void FWPFClusterLegoProxyBuilder::sharedBuild ( const reco::PFCluster iData,
TEveElement &  oItemHolder,
const FWViewContext vc 
)
protected

Definition at line 33 of file FWPFClusterLegoProxyBuilder.cc.

References FWPFMaths::calculateEt(), FWProxyBuilderBase::context(), hcalRecHitTable_cff::energy, reco::PFCluster::energy(), l1tnanotables_cff::et, PVValHelper::eta, reco::CaloCluster::eta(), FWProxyBuilderBase::item(), phi, reco::CaloCluster::phi(), DiDispStaMuonMonitor_cfi::pt, FWProxyBuilderBase::setupAddElement(), fireworks::Context::voteMaxEtAndEnergy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

Referenced by FWPFEcalClusterLegoProxyBuilder::build(), and FWPFHcalClusterLegoProxyBuilder::build().

35  {
36  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
37  float energy = iData.energy();
38  float et = FWPFMaths::calculateEt(centre, energy);
39  float pt = et;
40  float eta = iData.eta();
41  float phi = iData.phi();
42 
44 
46  cluster->SetMarkerColor(FWProxyBuilderBase::item()->defaultDisplayProperties().color());
47  setupAddElement(cluster, &oItemHolder);
48 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:171
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:183
const fireworks::Context & context() const
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:169
double energy() const
cluster energy
Definition: PFCluster.h:74
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:177
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:174
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:180
const FWEventItem * item() const

◆ typeName()

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

Definition at line 50 of file FWPFClusterLegoProxyBuilder.h.

52 :
53  // --------------------- Member Functions --------------------------

◆ typeOfBuilder()

static std::string FWPFClusterLegoProxyBuilder::typeOfBuilder ( )
inlinestatic

Definition at line 33 of file FWPFClusterLegoProxyBuilder.h.

33 { return "simple#"; }

◆ view()

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

Definition at line 50 of file FWPFClusterLegoProxyBuilder.h.

52 :
53  // --------------------- Member Functions --------------------------