CMS 3D CMS Logo

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

Public Member Functions

 FWCandidateHGCalLegoProxyBuilder ()
 
virtual bool havePerViewProduct (FWViewType::EType) const override
 
virtual void localModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *) override
 
const std::string & purpose () const
 
virtual void scaleProduct (TEveElementList *, FWViewType::EType, const FWViewContext *) override
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWCandidateHGCalLegoProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::HGCalMultiCluster >
 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 ()
 

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::HGCalMultiCluster &, unsigned int, TEveElement &, const FWViewContext *) override
 
 FWCandidateHGCalLegoProxyBuilder (const FWCandidateHGCalLegoProxyBuilder &)
 
const FWCandidateHGCalLegoProxyBuilderoperator= (const FWCandidateHGCalLegoProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::HGCalMultiCluster >
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::HGCalMultiCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const reco::HGCalMultiClustermodelData (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 24 of file FWCandidateHGCalLegoProxyBuilder.cc.

Constructor & Destructor Documentation

FWCandidateHGCalLegoProxyBuilder::FWCandidateHGCalLegoProxyBuilder ( )
inline

Definition at line 28 of file FWCandidateHGCalLegoProxyBuilder.cc.

28 {}
virtual FWCandidateHGCalLegoProxyBuilder::~FWCandidateHGCalLegoProxyBuilder ( )
inlinevirtual

Definition at line 29 of file FWCandidateHGCalLegoProxyBuilder.cc.

29 {}
FWCandidateHGCalLegoProxyBuilder::FWCandidateHGCalLegoProxyBuilder ( const FWCandidateHGCalLegoProxyBuilder )
private

Member Function Documentation

void FWCandidateHGCalLegoProxyBuilder::build ( const reco::HGCalMultiCluster 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::HGCalMultiCluster >.

Definition at line 86 of file FWCandidateHGCalLegoProxyBuilder.cc.

References EnergyCorrector::c, fastPrimaryVertexProducer_cfi::clusters, reco::HGCalMultiCluster::clusters(), create_public_lumi_plots::color, FWProxyBuilderBase::context(), FWProxyBuilderBase::item(), EnergyCorrector::pt, REGISTER_FWPROXYBUILDER, FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().

88 {
89  const auto & clusters = iData.clusters();
90 
91  for (const auto & c : clusters)
92  {
93  auto pt = c->energy()/std::cosh(c->eta());
94  FWLegoCandidate *candidate = new FWLegoCandidate( vc, context(), c->energy(),
95  pt, pt,
96  c->eta(), c->phi() );
97 
98  candidate->SetMarkerColor( item()->defaultDisplayProperties().color() );
99  context().voteMaxEtAndEnergy( pt, c->energy() );
100  setupAddElement( candidate, &oItemHolder );
101  }
102 }
const fireworks::Context & context() const
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:183
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
const edm::PtrVector< reco::BasicCluster > & clusters() const
const std::string & FWCandidateHGCalLegoProxyBuilder::classPurpose ( )
static

Definition at line 106 of file FWCandidateHGCalLegoProxyBuilder.cc.

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

Definition at line 106 of file FWCandidateHGCalLegoProxyBuilder.cc.

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

Definition at line 106 of file FWCandidateHGCalLegoProxyBuilder.cc.

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

Definition at line 106 of file FWCandidateHGCalLegoProxyBuilder.cc.

virtual bool FWCandidateHGCalLegoProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 32 of file FWCandidateHGCalLegoProxyBuilder.cc.

References localModelChanges(), and scaleProduct().

32 { return true; }
void FWCandidateHGCalLegoProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 70 of file FWCandidateHGCalLegoProxyBuilder.cc.

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

Referenced by havePerViewProduct().

72 {
73  // Line set marker is nto the same color as line, have to fix it here
74  if( (parent)->HasChildren() )
75  {
76  TEveElement *el = (parent)->FirstChild(); // There is only one child
77  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
78  const FWDisplayProperties &dp = item()->modelInfo( iId.index() ).displayProperties();
79  candidate->SetMarkerColor( dp.color() );
80  candidate->ElementChanged();
81  }
82 }
const FWEventItem * item() const
Color_t color() const
int index() const
Definition: FWModelId.h:49
auto dp
Definition: deltaR.h:22
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:537
const FWCandidateHGCalLegoProxyBuilder& FWCandidateHGCalLegoProxyBuilder::operator= ( const FWCandidateHGCalLegoProxyBuilder )
private
const std::string& FWCandidateHGCalLegoProxyBuilder::purpose ( ) const
inline

Definition at line 37 of file FWCandidateHGCalLegoProxyBuilder.cc.

39 :
40  // ----------------------- Data Members ----------------------------
void FWCandidateHGCalLegoProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 54 of file FWCandidateHGCalLegoProxyBuilder.cc.

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

Referenced by havePerViewProduct().

56 {
57  for( TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i )
58  {
59  if( (*i)->HasChildren() )
60  {
61  TEveElement *el = (*i)->FirstChild(); // There is only one child
62  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
63  candidate->updateScale( vc, context() );
64  }
65  }
66 }
const fireworks::Context & context() const
void updateScale(const FWViewContext *vc, const fireworks::Context &)
const std::string& FWCandidateHGCalLegoProxyBuilder::typeName ( ) const
inline

Definition at line 37 of file FWCandidateHGCalLegoProxyBuilder.cc.

39 :
40  // ----------------------- Data Members ----------------------------
const std::string& FWCandidateHGCalLegoProxyBuilder::view ( ) const
inline

Definition at line 37 of file FWCandidateHGCalLegoProxyBuilder.cc.

39 :
40  // ----------------------- Data Members ----------------------------