CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
reco::tau::RecoTauBuilderPlugin Class Referenceabstract

#include <RecoTauBuilderPlugins.h>

Inheritance diagram for reco::tau::RecoTauBuilderPlugin:
reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin reco::tau::RecoTauBuilderCombinatoricPlugin reco::tau::RecoTauBuilderConePlugin

Public Types

typedef boost::ptr_vector< reco::PFTauoutput_type
 
typedef std::auto_ptr< output_typereturn_type
 

Public Member Functions

void beginEvent () override
 
const edm::Handle< PFCandidateCollection > & getPFCands () const
 Hack to be able to convert Ptrs to Refs. More...
 
virtual return_type operator() (const reco::PFJetRef &, const std::vector< reco::PFRecoTauChargedHadron > &, const std::vector< reco::RecoTauPiZero > &, const std::vector< PFCandidatePtr > &) const =0
 
reco::VertexRef primaryVertex (const reco::PFJetRef &jet) const
 Get primary vertex associated to this jet. More...
 
reco::VertexRef primaryVertex (const reco::PFTau &tau, bool useJet=false) const
 Get primary vertex associated to this tau. More...
 
 RecoTauBuilderPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauBuilderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauEventHolderPlugin
const edm::Eventevt () const
 
edm::Eventevt ()
 
const edm::EventSetupevtSetup () const
 
 RecoTauEventHolderPlugin (const edm::ParameterSet &pset)
 
void setup (edm::Event &, const edm::EventSetup &)
 
 ~RecoTauEventHolderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Private Attributes

edm::EDGetTokenT< PFCandidateCollectionpfCand_token
 
edm::Handle< PFCandidateCollectionpfCands_
 
edm::InputTag pfCandSrc_
 
reco::tau::RecoTauVertexAssociator vertexAssociator_
 

Detailed Description

Definition at line 55 of file RecoTauBuilderPlugins.h.

Member Typedef Documentation

Definition at line 58 of file RecoTauBuilderPlugins.h.

Definition at line 59 of file RecoTauBuilderPlugins.h.

Constructor & Destructor Documentation

reco::tau::RecoTauBuilderPlugin::RecoTauBuilderPlugin ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 61 of file RecoTauBuilderPlugins.h.

References edm::ParameterSet::getParameter(), pfCand_token, and pfCandSrc_.

63  // The vertex association configuration is specified with the quality cuts.
65  {
66  pfCandSrc_ = pset.getParameter<edm::InputTag>("pfCandSrc");
68  };
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
RecoTauEventHolderPlugin(const edm::ParameterSet &pset)
edm::EDGetTokenT< PFCandidateCollection > pfCand_token
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
reco::tau::RecoTauVertexAssociator vertexAssociator_
def move(src, dest)
Definition: eostools.py:510
reco::tau::RecoTauBuilderPlugin::~RecoTauBuilderPlugin ( )
inlineoverride

Definition at line 70 of file RecoTauBuilderPlugins.h.

References operator()().

70 {}

Member Function Documentation

void reco::tau::RecoTauBuilderPlugin::beginEvent ( )
overridevirtual

Reimplemented from reco::tau::RecoTauEventHolderPlugin.

Definition at line 9 of file RecoTauBuilderPlugins.cc.

References EDM_REGISTER_PLUGINFACTORY, reco::tau::RecoTauEventHolderPlugin::evt(), edm::Event::getByToken(), pfCand_token, pfCands_, reco::tau::RecoTauVertexAssociator::setEvent(), and vertexAssociator_.

Referenced by primaryVertex().

9  {
12 }
edm::Handle< PFCandidateCollection > pfCands_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
void setEvent(const edm::Event &evt)
Load the vertices from the event.
edm::EDGetTokenT< PFCandidateCollection > pfCand_token
reco::tau::RecoTauVertexAssociator vertexAssociator_
const edm::Handle<PFCandidateCollection>& reco::tau::RecoTauBuilderPlugin::getPFCands ( ) const
inline

Hack to be able to convert Ptrs to Refs.

Definition at line 82 of file RecoTauBuilderPlugins.h.

References pfCands_.

Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().

82 { return pfCands_; };
edm::Handle< PFCandidateCollection > pfCands_
virtual return_type reco::tau::RecoTauBuilderPlugin::operator() ( const reco::PFJetRef ,
const std::vector< reco::PFRecoTauChargedHadron > &  ,
const std::vector< reco::RecoTauPiZero > &  ,
const std::vector< PFCandidatePtr > &   
) const
pure virtual

Construct one or more PFTaus from the a PFJet and its asscociated reconstructed PiZeros and regional extras i.e. objects in a 0.8 cone about the jet

Implemented in reco::tau::RecoTauBuilderConePlugin, and reco::tau::RecoTauBuilderCombinatoricPlugin.

Referenced by ~RecoTauBuilderPlugin(), reco::tau::RecoTauCleanerPlugin::~RecoTauCleanerPlugin(), and reco::tau::RecoTauModifierPlugin::~RecoTauModifierPlugin().

reco::VertexRef reco::tau::RecoTauBuilderPlugin::primaryVertex ( const reco::PFJetRef jet) const
inline

Get primary vertex associated to this jet.

Definition at line 85 of file RecoTauBuilderPlugins.h.

References reco::tau::RecoTauVertexAssociator::associatedVertex(), and vertexAssociator_.

Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().

85 { return vertexAssociator_.associatedVertex(*jet); }
reco::VertexRef associatedVertex(const PFJet &jet) const
reco::tau::RecoTauVertexAssociator vertexAssociator_
reco::VertexRef reco::tau::RecoTauBuilderPlugin::primaryVertex ( const reco::PFTau tau,
bool  useJet = false 
) const
inline

Get primary vertex associated to this tau.

Definition at line 87 of file RecoTauBuilderPlugins.h.

References reco::tau::RecoTauVertexAssociator::associatedVertex(), beginEvent(), and vertexAssociator_.

87 { return vertexAssociator_.associatedVertex(tau, useJet); }
reco::VertexRef associatedVertex(const PFJet &jet) const
reco::tau::RecoTauVertexAssociator vertexAssociator_

Member Data Documentation

edm::EDGetTokenT<PFCandidateCollection> reco::tau::RecoTauBuilderPlugin::pfCand_token
private

Definition at line 98 of file RecoTauBuilderPlugins.h.

Referenced by beginEvent(), and RecoTauBuilderPlugin().

edm::Handle<PFCandidateCollection> reco::tau::RecoTauBuilderPlugin::pfCands_
private

Definition at line 96 of file RecoTauBuilderPlugins.h.

Referenced by beginEvent(), and getPFCands().

edm::InputTag reco::tau::RecoTauBuilderPlugin::pfCandSrc_
private

Definition at line 94 of file RecoTauBuilderPlugins.h.

Referenced by RecoTauBuilderPlugin().

reco::tau::RecoTauVertexAssociator reco::tau::RecoTauBuilderPlugin::vertexAssociator_
private

Definition at line 97 of file RecoTauBuilderPlugins.h.

Referenced by beginEvent(), and primaryVertex().