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 ()
 
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 ()
 
bool havePerViewProduct (FWViewType::EType) const override
 
bool haveSingleProduct () const override
 
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
 
 FWPFTauProxyBuilder (const FWPFTauProxyBuilder &)=delete
 
const FWPFTauProxyBuilderoperator= (const FWPFTauProxyBuilder &)=delete
 

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

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.

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 }

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

◆ 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 )
privatedelete

◆ purpose()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

37 :
38  FWPFTauProxyBuilder(const FWPFTauProxyBuilder&) = delete; // stop default

◆ typeName()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

37 :
38  FWPFTauProxyBuilder(const FWPFTauProxyBuilder&) = delete; // stop default

◆ view()

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

Definition at line 35 of file FWPFTauProxyBuilder.cc.

37 :
38  FWPFTauProxyBuilder(const FWPFTauProxyBuilder&) = delete; // stop default
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
FWTauProxyBuilderBase::buildBaseTau
void buildBaseTau(const reco::BaseTau &iTau, const reco::Jet *iJet, TEveElement *comp, FWViewType::EType type, const FWViewContext *vc)
Definition: FWTauProxyBuilderBase.cc:51
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
FWTauProxyBuilderBase::m_maxTheta
float m_maxTheta
Definition: FWTauProxyBuilderBase.h:53
FWProxyBuilderBase::createCompound
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
Definition: FWProxyBuilderBase.cc:374
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
FWViewType::kLego
Definition: FWViewType.h:36
reco::PFTauCollection
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
edm::RefToBase::get
value_type const * get() const
Definition: RefToBase.h:209
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
fireworks::addCircle
void addCircle(double eta, double phi, double radius, const unsigned int nLineSegments, TEveElement *comp, FWProxyBuilderBase *pb)
Definition: BuilderUtils.cc:161
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
reco::PFTauTagInfo::pfjetRef
const JetBaseRef & pfjetRef() const
Definition: PFTauTagInfo.cc:30
FWTauProxyBuilderBase::m_phis
std::vector< double > m_phis
Definition: FWTauProxyBuilderBase.h:54
FWPFTauProxyBuilder::FWPFTauProxyBuilder
FWPFTauProxyBuilder()
Definition: FWPFTauProxyBuilder.cc:32
fwlog::kInfo
Definition: fwLog.h:35
FWPFTauProxyBuilder
Definition: FWPFTauProxyBuilder.cc:30
metsig::jet
Definition: SignAlgoResolutions.h:47
HLT_FULL_cff.candidates
candidates
Definition: HLT_FULL_cff.py:54992
FWTauProxyBuilderBase::m_minTheta
float m_minTheta
Definition: FWTauProxyBuilderBase.h:52
reco::PFTauTagInfo
Definition: PFTauTagInfo.h:19
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37