CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWPFTauProxyBuilder Class Reference
Inheritance diagram for FWPFTauProxyBuilder:
FWTauProxyBuilderBase FWProxyBuilderBase

Public Member Functions

 FWPFTauProxyBuilder ()
 
 FWPFTauProxyBuilder (const FWPFTauProxyBuilder &)=delete
 
const FWPFTauProxyBuilderoperator= (const FWPFTauProxyBuilder &)=delete
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWPFTauProxyBuilder () override
 
- Public Member Functions inherited from FWTauProxyBuilderBase
void cleanLocal () override
 
 FWTauProxyBuilderBase ()
 
 FWTauProxyBuilderBase (const FWTauProxyBuilderBase &)=delete
 
bool havePerViewProduct (FWViewType::EType) const override
 
bool haveSingleProduct () const override
 
const FWTauProxyBuilderBaseoperator= (const FWTauProxyBuilderBase &)=delete
 
void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
 
void setItem (const FWEventItem *iItem) override
 
 ~FWTauProxyBuilderBase () 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
 
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 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 buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType type, const FWViewContext *) override
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWTauProxyBuilderBase
void buildBaseTau (const reco::BaseTau &iTau, const reco::Jet *iJet, TEveElement *comp, FWViewType::EType type, const FWViewContext *vc)
 
void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void clean ()
 
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 &)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 
- Protected Attributes inherited from FWTauProxyBuilderBase
float m_maxTheta
 
float m_minTheta
 
std::vector< double > m_phis
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 30 of file FWPFTauProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWPFTauProxyBuilder() [1/2]

FWPFTauProxyBuilder::FWPFTauProxyBuilder ( )
inline

Definition at line 32 of file FWPFTauProxyBuilder.cc.

32 {}

◆ ~FWPFTauProxyBuilder()

FWPFTauProxyBuilder::~FWPFTauProxyBuilder ( )
inlineoverride

Definition at line 33 of file FWPFTauProxyBuilder.cc.

33 {}

◆ FWPFTauProxyBuilder() [2/2]

FWPFTauProxyBuilder::FWPFTauProxyBuilder ( const FWPFTauProxyBuilder )
delete

Member Function Documentation

◆ buildViewType()

void FWPFTauProxyBuilder::buildViewType ( const FWEventItem iItem,
TEveElementList *  product,
FWViewType::EType  type,
const FWViewContext vc 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 48 of file FWPFTauProxyBuilder.cc.

References fireworks::addCircle(), FWTauProxyBuilderBase::buildBaseTau(), HLT_2024v14_cff::candidates, AlCaHLTBitMon_QueryRunRegistry::comp, FWProxyBuilderBase::createCompound(), MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, fwLog, FWEventItem::get(), edm::RefToBase< T >::get(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, metsig::jet, fwlog::kInfo, FWViewType::kLego, FWTauProxyBuilderBase::m_maxTheta, FWTauProxyBuilderBase::m_minTheta, FWTauProxyBuilderBase::m_phis, reco::PFTauTagInfo::pfjetRef(), pfTaus_cff::pfTaus, and FWProxyBuilderBase::setupAddElement().

51  {
52  reco::PFTauCollection const* pfTaus = nullptr;
53  iItem->get(pfTaus);
54  if (pfTaus == nullptr)
55  return;
56 
57  for (reco::PFTauCollection::const_iterator it = pfTaus->begin(), itEnd = pfTaus->end(); it != itEnd; ++it) {
58  TEveCompound* comp = createCompound();
59  if (viewType == FWViewType::kLego) {
60  fireworks::addCircle((*it).eta(), (*it).phi(), 0.5, 20, comp, this);
61  } else {
62  // prepare phi-list and theta range
63  try {
64  const reco::PFTauTagInfo* tauTagInfo = dynamic_cast<const reco::PFTauTagInfo*>((*it).pfTauTagInfoRef().get());
65  const reco::Jet* jet = tauTagInfo->pfjetRef().get();
66  m_minTheta = 100;
67  m_maxTheta = -100;
68  std::vector<double> phis;
69  std::vector<const reco::Candidate*> candidates = jet->getJetConstituentsQuick();
70  for (std::vector<const reco::Candidate*>::const_iterator candidate = candidates.begin(),
71  candidateEnd = candidates.end();
72  candidate != candidateEnd;
73  ++candidate) {
74  double itheta = (*candidate)->theta();
75  if (itheta > m_maxTheta)
76  m_maxTheta = itheta;
77  if (itheta < m_minTheta)
78  m_minTheta = itheta;
79 
80  m_phis.push_back((*candidate)->phi());
81  }
82  if (m_minTheta > m_maxTheta) {
83  m_minTheta = 0;
84  m_maxTheta = 0;
85  }
86 
87  buildBaseTau(*it, jet, comp, viewType, vc);
88  m_phis.clear();
89  } catch (std::exception& e) {
90  fwLog(fwlog::kInfo) << "FWPFTauProxyBuilder missing PFTauTagInfo. Skip drawing of jets.\n";
91  buildBaseTau(*it, nullptr, comp, viewType, vc);
92  }
93  }
94  setupAddElement(comp, product);
95  }
96 }
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Base class for all types of Jets.
Definition: Jet.h:20
void get(const T *&oData) const
Definition: FWEventItem.h:78
const JetBaseRef & pfjetRef() const
Definition: PFTauTagInfo.cc:30
void buildBaseTau(const reco::BaseTau &iTau, const reco::Jet *iJet, TEveElement *comp, FWViewType::EType type, const FWViewContext *vc)
void addCircle(double eta, double phi, double radius, const unsigned int nLineSegments, TEveElement *comp, FWProxyBuilderBase *pb)
#define fwLog(_level_)
Definition: fwLog.h:45
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::vector< double > m_phis
value_type const * get() const
Definition: RefToBase.h:216

◆ classPurpose()

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

Definition at line 101 of file FWPFTauProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 101 of file FWPFTauProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 101 of file FWPFTauProxyBuilder.cc.

◆ classView()

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

Definition at line 101 of file FWPFTauProxyBuilder.cc.

◆ operator=()

const FWPFTauProxyBuilder& FWPFTauProxyBuilder::operator= ( const FWPFTauProxyBuilder )
delete

◆ purpose()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

40 :
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)

◆ typeName()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

40 :
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)

◆ view()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

40 :
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)