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
 
virtual ~FWPFTauProxyBuilder ()
 
- Public Member Functions inherited from FWTauProxyBuilderBase
virtual void cleanLocal ()
 
 FWTauProxyBuilderBase ()
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual void setItem (const FWEventItem *iItem)
 
virtual ~FWTauProxyBuilderBase ()
 
- 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

virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType type, const FWViewContext *)
 
 FWPFTauProxyBuilder (const FWPFTauProxyBuilder &)
 
const FWPFTauProxyBuilderoperator= (const FWPFTauProxyBuilder &)
 

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)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
- 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 31 of file FWPFTauProxyBuilder.cc.

Constructor & Destructor Documentation

FWPFTauProxyBuilder::FWPFTauProxyBuilder ( )
inline

Definition at line 34 of file FWPFTauProxyBuilder.cc.

34 {}
virtual FWPFTauProxyBuilder::~FWPFTauProxyBuilder ( )
inlinevirtual

Definition at line 35 of file FWPFTauProxyBuilder.cc.

35 {}
FWPFTauProxyBuilder::FWPFTauProxyBuilder ( const FWPFTauProxyBuilder )
private

Member Function Documentation

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

Reimplemented from FWProxyBuilderBase.

Definition at line 48 of file FWPFTauProxyBuilder.cc.

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

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

Definition at line 98 of file FWPFTauProxyBuilder.cc.

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

Definition at line 98 of file FWPFTauProxyBuilder.cc.

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

Definition at line 98 of file FWPFTauProxyBuilder.cc.

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

Definition at line 98 of file FWPFTauProxyBuilder.cc.

const FWPFTauProxyBuilder& FWPFTauProxyBuilder::operator= ( const FWPFTauProxyBuilder )
private
const std::string& FWPFTauProxyBuilder::purpose ( ) const
inline

Definition at line 37 of file FWPFTauProxyBuilder.cc.

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

Definition at line 37 of file FWPFTauProxyBuilder.cc.

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

Definition at line 37 of file FWPFTauProxyBuilder.cc.