CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
FWPFCandidatesLegoProxyBuilder Class Reference
Inheritance diagram for FWPFCandidatesLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::PFCandidate > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWPFCandidatesLegoProxyBuilder ()
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual ~FWPFCandidatesLegoProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCandidate >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- 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 ()
 

Private Member Functions

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

Additional Inherited Members

- 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 Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::PFCandidate >
virtual void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context)
 
virtual void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context)
 
virtual void buildViewType (const reco::PFCandidate &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const reco::PFCandidatemodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- 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::FWPFCandidatesLegoProxyBuilder ( )

Definition at line 55 of file FWPFCandidatesLegoProxyBuilder.cc.

55 {}
FWPFCandidatesLegoProxyBuilder::~FWPFCandidatesLegoProxyBuilder ( )
virtual

Definition at line 56 of file FWPFCandidatesLegoProxyBuilder.cc.

56 {}
FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder ( const FWPFCandidatesLegoProxyBuilder )
private

Member Function Documentation

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

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 63 of file FWPFCandidatesLegoProxyBuilder.cc.

References create_public_lumi_plots::color, 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().

64 {
65  FWLegoCandidate *candidate = new FWLegoCandidate( vc, context(), iData.energy(), iData.et(), iData.pt(),
66  iData.eta(), iData.phi() );
67  candidate->SetMarkerColor( item()->defaultDisplayProperties().color() );
68  fireworks::setTrackTypePF( iData, candidate );
69 
70  context().voteMaxEtAndEnergy( iData.et(), iData.et() );
71 
72  setupAddElement( candidate, &oItemHolder );
73 }
virtual double energy() const GCC11_FINAL
energy
const fireworks::Context & context() const
virtual double et() const GCC11_FINAL
transverse energy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:184
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
virtual float pt() const GCC11_FINAL
transverse momentum
virtual bool FWPFCandidatesLegoProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 33 of file FWPFCandidatesLegoProxyBuilder.cc.

33 { return true; }
void FWPFCandidatesLegoProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
virtual

Reimplemented from FWProxyBuilderBase.

Definition at line 92 of file FWPFCandidatesLegoProxyBuilder.cc.

References FWDisplayProperties::color(), reco::dp, FWModelId::index(), FWProxyBuilderBase::item(), FWEventItem::modelInfo(), and dbtoconf::parent.

94 {
95  // line set marker is not same color as line, have to fix it here
96  if ((parent)->HasChildren())
97  {
98  TEveElement* el = (parent)->FirstChild(); // we know there is only one child added in this proxy builder
99  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
100  const FWDisplayProperties& dp = item()->modelInfo(iId.index()).displayProperties();
101  candidate->SetMarkerColor( dp.color());
102  candidate->ElementChanged();
103  }
104 }
list parent
Definition: dbtoconf.py:74
const FWEventItem * item() const
Color_t color() const
int index() const
Definition: FWModelId.h:49
auto dp
Definition: deltaR.h:24
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
const FWPFCandidatesLegoProxyBuilder& FWPFCandidatesLegoProxyBuilder::operator= ( const FWPFCandidatesLegoProxyBuilder )
private
FWPFCandidatesLegoProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )
void FWPFCandidatesLegoProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
virtual

Reimplemented from FWProxyBuilderBase.

Definition at line 77 of file FWPFCandidatesLegoProxyBuilder.cc.

References FWProxyBuilderBase::context(), i, and FWLegoCandidate::updateScale().

78 {
79  for (TEveElement::List_i i = parent->BeginChildren(); i!= parent->EndChildren(); ++i)
80  {
81  if ((*i)->HasChildren())
82  {
83  TEveElement* el = (*i)->FirstChild(); // there is only one child added in this proxy builder
84  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
85  candidate->updateScale(vc, context());
86  }
87  }
88 }
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
list parent
Definition: dbtoconf.py:74
void updateScale(const FWViewContext *vc, const fireworks::Context &)