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
FWPFPatJetLegoProxyBuilder< T > Class Template Reference

#include <FWPFPatJetLegoProxyBuilder.h>

Inheritance diagram for FWPFPatJetLegoProxyBuilder< T >:
FWSimpleProxyBuilderTemplate< T > FWSimpleProxyBuilder FWProxyBuilderBase

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 ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< T >
 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 T &, unsigned int, TEveElement &, const FWViewContext *)
 
 FWPFPatJetLegoProxyBuilder (const FWPFPatJetLegoProxyBuilder &)
 
const FWPFPatJetLegoProxyBuilderoperator= (FWPFPatJetLegoProxyBuilder &)
 

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< T >
const TmodelData (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

template<class T>
class FWPFPatJetLegoProxyBuilder< T >

Definition at line 28 of file FWPFPatJetLegoProxyBuilder.h.

Constructor & Destructor Documentation

Definition at line 5 of file FWPFPatJetLegoProxyBuilder.cc.

5 {}
template<class T >
FWPFPatJetLegoProxyBuilder< T >::~FWPFPatJetLegoProxyBuilder ( )
virtual

Definition at line 6 of file FWPFPatJetLegoProxyBuilder.cc.

6 {}

Member Function Documentation

template<class T>
void FWPFPatJetLegoProxyBuilder< T >::build ( const T 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< T >.

Definition at line 10 of file FWPFPatJetLegoProxyBuilder.cc.

References create_public_lumi_plots::color, FWProxyBuilderBase::context(), FWProxyBuilderBase::item(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().

11 {
12  std::vector<reco::PFCandidatePtr > consts = iData.getPFConstituents();
13 
14  typedef std::vector<reco::PFCandidatePtr >::const_iterator IC;
15 
16  for( IC ic = consts.begin(); ic != consts.end(); ++ic )
17  {
18  const reco::PFCandidatePtr pfCandPtr = *ic;
19 
20  FWLegoCandidate *candidate = new FWLegoCandidate( vc, FWProxyBuilderBase::context(), pfCandPtr->energy(), pfCandPtr->et(),
21  pfCandPtr->pt(), pfCandPtr->eta(), pfCandPtr->phi() );
22  candidate->SetMarkerColor( FWProxyBuilderBase::item()->defaultDisplayProperties().color() );
23  fireworks::setTrackTypePF( (*pfCandPtr), candidate );
24  FWProxyBuilderBase::setupAddElement( candidate, &oItemHolder );
25 
26  FWProxyBuilderBase::context().voteMaxEtAndEnergy( pfCandPtr->et(), pfCandPtr->energy() );
27  }
28 }
const fireworks::Context & context() const
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
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
template<class T>
virtual bool FWPFPatJetLegoProxyBuilder< T >::havePerViewProduct ( FWViewType::EType  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 36 of file FWPFPatJetLegoProxyBuilder.h.

36 { return true; }
template<class T >
void FWPFPatJetLegoProxyBuilder< T >::localModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
virtual

Reimplemented from FWProxyBuilderBase.

Definition at line 51 of file FWPFPatJetLegoProxyBuilder.cc.

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

52 {
53  // line set marker is not same color as line, have to fix it here
54  if ( ( parent )->HasChildren() )
55  {
56  for( TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); ++j )
57  {
58  FWLegoCandidate *cand = dynamic_cast<FWLegoCandidate*> ( *j );
59  const FWDisplayProperties &dp = FWProxyBuilderBase::item()->modelInfo( iId.index() ).displayProperties();
60  cand->SetMarkerColor( dp.color() );
61  cand->ElementChanged();
62  }
63  }
64 }
list parent
Definition: dbtoconf.py:74
const FWEventItem * item() const
Color_t color() const
int index() const
Definition: FWModelId.h:49
int j
Definition: DBlmapReader.cc:9
auto dp
Definition: deltaR.h:24
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
template<class T>
const FWPFPatJetLegoProxyBuilder& FWPFPatJetLegoProxyBuilder< T >::operator= ( FWPFPatJetLegoProxyBuilder< T > &  )
private
template<class T >
void FWPFPatJetLegoProxyBuilder< T >::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
virtual

Reimplemented from FWProxyBuilderBase.

Definition at line 32 of file FWPFPatJetLegoProxyBuilder.cc.

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

33 {
34  // loop items in product
35  for( TEveElement::List_i i = parent->BeginChildren(); i!= parent->EndChildren(); ++i )
36  {
37  if ( ( *i )->HasChildren() )
38  {
39  // loop elements for the reco::PFJet item
40  for( TEveElement::List_i j = (*i)->BeginChildren(); j != (*i)->EndChildren(); ++j )
41  {
42  FWLegoCandidate *cand = dynamic_cast<FWLegoCandidate*> ( *j );
44  }
45  }
46  }
47 }
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
list parent
Definition: dbtoconf.py:74
int j
Definition: DBlmapReader.cc:9
void updateScale(const FWViewContext *vc, const fireworks::Context &)