CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWPFCandidatesLegoProxyBuilder Class Reference
Inheritance diagram for FWPFCandidatesLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::PFCandidate > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWPFCandidatesLegoProxyBuilder ()
 
bool havePerViewProduct (FWViewType::EType) const override
 
void localModelChanges (const FWModelId &iId, TEveElement *iCompound, 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
 
 ~FWPFCandidatesLegoProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCandidate >
 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...
 

Private Member Functions

void build (const reco::PFCandidate &, unsigned int, TEveElement &, const FWViewContext *) override
 
 FWPFCandidatesLegoProxyBuilder (const FWPFCandidatesLegoProxyBuilder &)=delete
 
const FWPFCandidatesLegoProxyBuilderoperator= (const FWPFCandidatesLegoProxyBuilder &)=delete
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCandidate >
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::PFCandidate &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::PFCandidatemodelData (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 &)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 26 of file FWPFCandidatesLegoProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWPFCandidatesLegoProxyBuilder() [1/2]

FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder ( )

Definition at line 55 of file FWPFCandidatesLegoProxyBuilder.cc.

55 {}

◆ ~FWPFCandidatesLegoProxyBuilder()

FWPFCandidatesLegoProxyBuilder::~FWPFCandidatesLegoProxyBuilder ( )
override

Definition at line 56 of file FWPFCandidatesLegoProxyBuilder.cc.

56 {}

◆ FWPFCandidatesLegoProxyBuilder() [2/2]

FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder ( const FWPFCandidatesLegoProxyBuilder )
privatedelete

Member Function Documentation

◆ build()

void FWPFCandidatesLegoProxyBuilder::build ( const reco::PFCandidate iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overrideprivatevirtual

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::PFCandidate >.

Definition at line 62 of file FWPFCandidatesLegoProxyBuilder.cc.

65  {
66  FWLegoCandidate* candidate =
67  new FWLegoCandidate(vc, context(), iData.energy(), iData.et(), iData.pt(), iData.eta(), iData.phi());
68  candidate->SetMarkerColor(item()->defaultDisplayProperties().color());
69  fireworks::setTrackTypePF(iData, candidate);
70 
71  context().voteMaxEtAndEnergy(iData.et(), iData.et());
72 
73  setupAddElement(candidate, &oItemHolder);
74 }

References FWProxyBuilderBase::context(), reco::LeafCandidate::energy(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), FWProxyBuilderBase::item(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().

◆ classPurpose()

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

Definition at line 107 of file FWPFCandidatesLegoProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 107 of file FWPFCandidatesLegoProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 107 of file FWPFCandidatesLegoProxyBuilder.cc.

◆ classView()

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

Definition at line 107 of file FWPFCandidatesLegoProxyBuilder.cc.

◆ havePerViewProduct()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 32 of file FWPFCandidatesLegoProxyBuilder.cc.

32 { return true; }

◆ localModelChanges()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 90 of file FWPFCandidatesLegoProxyBuilder.cc.

93  {
94  // line set marker is not same color as line, have to fix it here
95  if ((parent)->HasChildren()) {
96  TEveElement* el = (parent)->FirstChild(); // we know there is only one child added in this proxy builder
97  FWLegoCandidate* candidate = dynamic_cast<FWLegoCandidate*>(el);
98  candidate->SetMarkerColor(item()->modelInfo(iId.index()).displayProperties().color());
99  candidate->ElementChanged();
100  }
101 }

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

◆ operator=()

const FWPFCandidatesLegoProxyBuilder& FWPFCandidatesLegoProxyBuilder::operator= ( const FWPFCandidatesLegoProxyBuilder )
privatedelete

◆ purpose()

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

Definition at line 39 of file FWPFCandidatesLegoProxyBuilder.cc.

41 :
42  FWPFCandidatesLegoProxyBuilder(const FWPFCandidatesLegoProxyBuilder&) = delete; // stop default

◆ scaleProduct()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 77 of file FWPFCandidatesLegoProxyBuilder.cc.

79  {
80  for (TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i) {
81  if ((*i)->HasChildren()) {
82  TEveElement* el = (*i)->FirstChild(); // there is only one child added in this proxy builder
83  FWLegoCandidate* candidate = dynamic_cast<FWLegoCandidate*>(el);
84  candidate->updateScale(vc, context());
85  }
86  }
87 }

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

◆ typeName()

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

Definition at line 39 of file FWPFCandidatesLegoProxyBuilder.cc.

41 :
42  FWPFCandidatesLegoProxyBuilder(const FWPFCandidatesLegoProxyBuilder&) = delete; // stop default

◆ view()

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

Definition at line 39 of file FWPFCandidatesLegoProxyBuilder.cc.

41 :
42  FWPFCandidatesLegoProxyBuilder(const FWPFCandidatesLegoProxyBuilder&) = delete; // stop default
mps_fire.i
i
Definition: mps_fire.py:428
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
fireworks::setTrackTypePF
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
Definition: setTrackTypePF.cc:16
FWLegoCandidate
Definition: FWLegoCandidate.h:28
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWModelId::index
int index() const
Definition: FWModelId.h:41
FWPFCandidatesLegoProxyBuilder
Definition: FWPFCandidatesLegoProxyBuilder.cc:26
FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder
FWPFCandidatesLegoProxyBuilder()
Definition: FWPFCandidatesLegoProxyBuilder.cc:55
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
reco::LeafCandidate::et
double et() const final
transverse energy
Definition: LeafCandidate.h:127
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
FWLegoCandidate::updateScale
void updateScale(const FWViewContext *vc, const fireworks::Context &)
Definition: FWLegoCandidate.cc:41
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
class-composition.parent
parent
Definition: class-composition.py:88