#include <FWPFPatJetLegoProxyBuilder.h>
Public Member Functions | |
FWPFPatJetLegoProxyBuilder () | |
virtual bool | havePerViewProduct (FWViewType::EType) const |
virtual void | localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) |
virtual void | scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) |
virtual | ~FWPFPatJetLegoProxyBuilder () |
Private Member Functions | |
void | build (const T &, unsigned int, TEveElement &, const FWViewContext *) |
FWPFPatJetLegoProxyBuilder (const FWPFPatJetLegoProxyBuilder &) | |
const FWPFPatJetLegoProxyBuilder & | operator= (FWPFPatJetLegoProxyBuilder &) |
Definition at line 30 of file FWPFPatJetLegoProxyBuilder.h.
FWPFPatJetLegoProxyBuilder< T >::FWPFPatJetLegoProxyBuilder | ( | ) |
Definition at line 4 of file FWPFPatJetLegoProxyBuilder.cc.
{}
FWPFPatJetLegoProxyBuilder< T >::~FWPFPatJetLegoProxyBuilder | ( | ) | [virtual] |
Definition at line 5 of file FWPFPatJetLegoProxyBuilder.cc.
{}
FWPFPatJetLegoProxyBuilder< T >::FWPFPatJetLegoProxyBuilder | ( | const FWPFPatJetLegoProxyBuilder< T > & | ) | [private] |
void FWPFPatJetLegoProxyBuilder< T >::build | ( | const T & | iData, |
unsigned int | iIndex, | ||
TEveElement & | oItemHolder, | ||
const FWViewContext * | |||
) | [private, virtual] |
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< T >.
Definition at line 9 of file FWPFPatJetLegoProxyBuilder.cc.
References FWProxyBuilderBase::context(), FWProxyBuilderBase::item(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().
{ std::vector<reco::PFCandidatePtr > consts = iData.getPFConstituents(); typedef std::vector<reco::PFCandidatePtr >::const_iterator IC; for( IC ic = consts.begin(); ic != consts.end(); ++ic ) { const reco::PFCandidatePtr pfCandPtr = *ic; FWPFLegoCandidate *candidate = new FWPFLegoCandidate( vc, FWProxyBuilderBase::context(), pfCandPtr->energy(), pfCandPtr->et(), pfCandPtr->pt(), pfCandPtr->eta(), pfCandPtr->phi() ); candidate->SetMarkerColor( FWProxyBuilderBase::item()->defaultDisplayProperties().color() ); fireworks::setTrackTypePF( (*pfCandPtr), candidate ); FWProxyBuilderBase::setupAddElement( candidate, &oItemHolder ); FWProxyBuilderBase::context().voteMaxEtAndEnergy( pfCandPtr->et(), pfCandPtr->energy() ); } }
virtual bool FWPFPatJetLegoProxyBuilder< T >::havePerViewProduct | ( | FWViewType::EType | ) | const [inline, virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 38 of file FWPFPatJetLegoProxyBuilder.h.
{ return true; }
void FWPFPatJetLegoProxyBuilder< T >::localModelChanges | ( | const FWModelId & | iId, |
TEveElement * | iCompound, | ||
FWViewType::EType | viewType, | ||
const FWViewContext * | vc | ||
) | [virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 50 of file FWPFPatJetLegoProxyBuilder.cc.
References FWDisplayProperties::color(), FWModelId::index(), FWProxyBuilderBase::item(), j, and FWEventItem::modelInfo().
{ // line set marker is not same color as line, have to fix it here if ( ( parent )->HasChildren() ) { for( TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); ++j ) { FWPFLegoCandidate *cand = dynamic_cast<FWPFLegoCandidate*> ( *j ); const FWDisplayProperties &dp = FWProxyBuilderBase::item()->modelInfo( iId.index() ).displayProperties(); cand->SetMarkerColor( dp.color() ); cand->ElementChanged(); } } }
const FWPFPatJetLegoProxyBuilder& FWPFPatJetLegoProxyBuilder< T >::operator= | ( | FWPFPatJetLegoProxyBuilder< T > & | ) | [private] |
void FWPFPatJetLegoProxyBuilder< T >::scaleProduct | ( | TEveElementList * | parent, |
FWViewType::EType | type, | ||
const FWViewContext * | vc | ||
) | [virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 31 of file FWPFPatJetLegoProxyBuilder.cc.
References FWProxyBuilderBase::context(), i, j, and FWPFLegoCandidate::updateScale().
{ // loop items in product for( TEveElement::List_i i = parent->BeginChildren(); i!= parent->EndChildren(); ++i ) { if ( ( *i )->HasChildren() ) { // loop elements for the reco::PFJet item for( TEveElement::List_i j = (*i)->BeginChildren(); j != (*i)->EndChildren(); ++j ) { FWPFLegoCandidate *cand = dynamic_cast<FWPFLegoCandidate*> ( *j ); cand->updateScale( vc, FWProxyBuilderBase::context()); } } } }