CMS 3D CMS Logo

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

Public Member Functions

void buildViewType (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
virtual void cleanLocal ()
 
void cleanLocal () override
 
 FWElectronProxyBuilder ()
 
virtual bool haveSingleProduct () const
 
bool haveSingleProduct () const override
 
const std::string & purpose () const
 
void setItem (const FWEventItem *iItem) override
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWElectronProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::GsfElectron >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 ~FWSimpleProxyBuilder () override
 
- 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 havePerViewProduct (FWViewType::EType) 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 &)
 
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

 FWElectronProxyBuilder (const FWElectronProxyBuilder &)=delete
 
const FWElectronProxyBuilderoperator= (const FWElectronProxyBuilder &)=delete
 
TEveElementList * requestCommon ()
 

Private Attributes

TEveElementList * m_common
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::GsfElectron >
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void build (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
const reco::GsfElectronmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- Protected Member Functions inherited from FWProxyBuilderBase
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 localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 35 of file FWElectronProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWElectronProxyBuilder() [1/2]

FWElectronProxyBuilder::FWElectronProxyBuilder ( )

Definition at line 65 of file FWElectronProxyBuilder.cc.

65  : m_common(nullptr) {
66  m_common = new TEveElementList("common electron scene");
67  m_common->IncDenyDestroy();
68 }

References m_common.

◆ ~FWElectronProxyBuilder()

FWElectronProxyBuilder::~FWElectronProxyBuilder ( )
override

Definition at line 70 of file FWElectronProxyBuilder.cc.

70 { m_common->DecDenyDestroy(); }

References m_common.

◆ FWElectronProxyBuilder() [2/2]

FWElectronProxyBuilder::FWElectronProxyBuilder ( const FWElectronProxyBuilder )
privatedelete

Member Function Documentation

◆ buildViewType()

void FWElectronProxyBuilder::buildViewType ( const reco::GsfElectron iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  type,
const FWViewContext  
)
overridevirtual

Reimplemented from FWSimpleProxyBuilderTemplate< reco::GsfElectron >.

Definition at line 102 of file FWElectronProxyBuilder.cc.

106  {
107  TEveElementList* tracks = requestCommon();
108  TEveElement::List_i trkIt = tracks->BeginChildren();
109  std::advance(trkIt, iIndex);
110  setupAddElement(*trkIt, &oItemHolder);
111 
113  fireworks::makeRhoPhiSuperCluster(this, electron.superCluster(), electron.phi(), oItemHolder);
114  else if (type == FWViewType::kRhoZ)
115  fireworks::makeRhoZSuperCluster(this, electron.superCluster(), electron.phi(), oItemHolder);
116 }

References HPSPFTauProducerPuppi_cfi::electron, FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), requestCommon(), FWProxyBuilderBase::setupAddElement(), and tracks.

◆ classPurpose()

const std::string & FWElectronProxyBuilder::classPurpose ( )
static

◆ classRegisterTypeName()

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

◆ classTypeName()

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

◆ classView()

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

◆ cleanLocal() [1/2]

void FWProxyBuilderBase::cleanLocal

Definition at line 324 of file FWProxyBuilderBase.cc.

324  {
325  // Cleans local common element list.
326 }

◆ cleanLocal() [2/2]

void FWElectronProxyBuilder::cleanLocal ( )
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 100 of file FWElectronProxyBuilder.cc.

100 { m_common->DestroyElements(); }

References m_common.

◆ haveSingleProduct() [1/2]

virtual bool FWProxyBuilderBase::haveSingleProduct
inline

Definition at line 88 of file FWProxyBuilderBase.h.

88 { return true; }

◆ haveSingleProduct() [2/2]

bool FWElectronProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 41 of file FWElectronProxyBuilder.cc.

41 { return false; }

◆ operator=()

const FWElectronProxyBuilder& FWElectronProxyBuilder::operator= ( const FWElectronProxyBuilder )
privatedelete

◆ purpose()

const std::string& FWElectronProxyBuilder::purpose ( ) const
inline

Definition at line 54 of file FWElectronProxyBuilder.cc.

56 :
57  FWElectronProxyBuilder(const FWElectronProxyBuilder&) = delete; // stop default

◆ requestCommon()

TEveElementList * FWElectronProxyBuilder::requestCommon ( )
private

Definition at line 80 of file FWElectronProxyBuilder.cc.

80  {
81  if (m_common->HasChildren() == false) {
82  int width = item()->getConfig()->value<long>("LineWidth");
83  for (int i = 0; i < static_cast<int>(item()->size()); ++i) {
85 
86  TEveTrack* track(nullptr);
87  if (electron.gsfTrack().isAvailable())
89  else
90  track = fireworks::prepareCandidate(electron, context().getTrackPropagator());
91  track->MakeTrack();
92  track->SetLineWidth(width);
94  m_common->AddElement(track);
95  }
96  }
97  return m_common;
98 }

References FWProxyBuilderBase::context(), HPSPFTauProducerPuppi_cfi::electron, FWEventItem::getConfig(), fireworks::Context::getTrackPropagator(), mps_fire::i, FWProxyBuilderBase::item(), m_common, FWSimpleProxyBuilderTemplate< reco::GsfElectron >::modelData(), fireworks::prepareCandidate(), fireworks::prepareTrack(), FWProxyBuilderBase::setupElement(), findQualityFiles::size, HLT_FULL_cff::track, FWProxyBuilderConfiguration::value(), and ApeEstimator_cff::width.

Referenced by buildViewType().

◆ setItem()

void FWElectronProxyBuilder::setItem ( const FWEventItem iItem)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 72 of file FWElectronProxyBuilder.cc.

72  {
74 
75  if (iItem) {
76  iItem->getConfig()->assertParam("LineWidth", long(1), long(1), long(4));
77  }
78 }

References FWProxyBuilderConfiguration::assertParam(), FWEventItem::getConfig(), and FWProxyBuilderBase::setItem().

◆ typeName()

const std::string& FWElectronProxyBuilder::typeName ( ) const
inline

Definition at line 54 of file FWElectronProxyBuilder.cc.

56 :
57  FWElectronProxyBuilder(const FWElectronProxyBuilder&) = delete; // stop default

◆ view()

const std::string& FWElectronProxyBuilder::view ( ) const
inline

Definition at line 54 of file FWElectronProxyBuilder.cc.

56 :
57  FWElectronProxyBuilder(const FWElectronProxyBuilder&) = delete; // stop default

Member Data Documentation

◆ m_common

TEveElementList* FWElectronProxyBuilder::m_common
private
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
FWEventItem::getConfig
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:150
FWProxyBuilderBase::setupElement
void setupElement(TEveElement *el, bool color=true) const
Definition: FWProxyBuilderBase.cc:358
FWElectronProxyBuilder::requestCommon
TEveElementList * requestCommon()
Definition: FWElectronProxyBuilder.cc:80
FWViewType::kRhoZ
Definition: FWViewType.h:33
FWSimpleProxyBuilderTemplate< reco::GsfElectron >::modelData
const reco::GsfElectron & modelData(int index)
Definition: FWSimpleProxyBuilderTemplate.h:43
FWElectronProxyBuilder::FWElectronProxyBuilder
FWElectronProxyBuilder()
Definition: FWElectronProxyBuilder.cc:65
reco::GsfElectron
Definition: GsfElectron.h:35
FWProxyBuilderConfiguration::assertParam
FWGenericParameter< T > * assertParam(const std::string &name, T def)
Definition: FWProxyBuilderConfiguration.cc:83
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
fireworks::makeRhoZSuperCluster
bool makeRhoZSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
Definition: makeSuperCluster.cc:69
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
fireworks::prepareTrack
TEveTrack * prepareTrack(const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
Definition: TrackUtils.cc:62
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
HPSPFTauProducerPuppi_cfi.electron
electron
Definition: HPSPFTauProducerPuppi_cfi.py:13
fireworks::makeRhoPhiSuperCluster
bool makeRhoPhiSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
Definition: makeSuperCluster.cc:29
FWElectronProxyBuilder
Definition: FWElectronProxyBuilder.cc:35
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWProxyBuilderConfiguration::value
T value(const std::string &name)
Definition: FWProxyBuilderConfiguration.cc:123
fireworks::prepareCandidate
TEveTrack * prepareCandidate(const reco::Candidate &track, TEveTrackPropagator *propagator)
Definition: CandidateUtils.cc:9
fireworks::Context::getTrackPropagator
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:62
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
FWSimpleProxyBuilderTemplate< reco::GsfElectron >
FWViewType::kRhoPhiPF
Definition: FWViewType.h:42
FWProxyBuilderBase::setItem
virtual void setItem(const FWEventItem *iItem)
Definition: FWProxyBuilderBase.cc:83
FWElectronProxyBuilder::m_common
TEveElementList * m_common
Definition: FWElectronProxyBuilder.cc:62
FWViewType::kRhoPhi
Definition: FWViewType.h:32
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443