CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWPFCandidatesLegoProxyBuilder Class Reference

Inheritance diagram for FWPFCandidatesLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::PFCandidate > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

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 ()

Private Member Functions

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

Detailed Description

Definition at line 26 of file FWPFCandidatesLegoProxyBuilder.cc.


Constructor & Destructor Documentation

FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder ( )

Definition at line 54 of file FWPFCandidatesLegoProxyBuilder.cc.

{}
FWPFCandidatesLegoProxyBuilder::~FWPFCandidatesLegoProxyBuilder ( ) [virtual]

Definition at line 55 of file FWPFCandidatesLegoProxyBuilder.cc.

{}
FWPFCandidatesLegoProxyBuilder::FWPFCandidatesLegoProxyBuilder ( const FWPFCandidatesLegoProxyBuilder ) [private]

Member Function Documentation

void FWPFCandidatesLegoProxyBuilder::build ( const reco::PFCandidate 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< reco::PFCandidate >.

Definition at line 62 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().

{
   FWLegoCandidate *candidate = new FWLegoCandidate( vc, context(), iData.energy(), iData.et(), iData.pt(),
                                                         iData.eta(), iData.phi() );
   candidate->SetMarkerColor( item()->defaultDisplayProperties().color() );
   fireworks::setTrackTypePF( iData, candidate );

   context().voteMaxEtAndEnergy( iData.et(), iData.et() );

   setupAddElement( candidate, &oItemHolder );
}
virtual bool FWPFCandidatesLegoProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const [inline, virtual]

Reimplemented from FWProxyBuilderBase.

Definition at line 33 of file FWPFCandidatesLegoProxyBuilder.cc.

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

Reimplemented from FWProxyBuilderBase.

Definition at line 91 of file FWPFCandidatesLegoProxyBuilder.cc.

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

{
   // line set marker is not same color as line, have to fix it here
   if ((parent)->HasChildren())
   {
      TEveElement* el = (parent)->FirstChild();  // we know there is only one child added in this proxy builder
      FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
      const FWDisplayProperties& dp = item()->modelInfo(iId.index()).displayProperties();
      candidate->SetMarkerColor( dp.color());
      candidate->ElementChanged();
   }  
}
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 76 of file FWPFCandidatesLegoProxyBuilder.cc.

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

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