CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
reco::tau::RecoTauObjectEmbedder< T > Class Template Reference
Inheritance diagram for reco::tau::RecoTauObjectEmbedder< T >:
reco::tau::RecoTauModifierPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

virtual void beginEvent () override
 
virtual void operator() (PFTau &) const override
 
 RecoTauObjectEmbedder (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauObjectEmbedder ()
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void endEvent ()
 
 RecoTauModifierPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauModifierPlugin ()
 
- 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 &)
 
virtual ~RecoTauEventHolderPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Private Attributes

edm::Handle< edm::Association
< T > > 
jetMatch_
 
edm::InputTag jetMatchSrc_
 

Detailed Description

template<typename T>
class reco::tau::RecoTauObjectEmbedder< T >

Definition at line 56 of file RecoTauObjectEmbedderPlugin.cc.

Constructor & Destructor Documentation

template<typename T >
reco::tau::RecoTauObjectEmbedder< T >::RecoTauObjectEmbedder ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 58 of file RecoTauObjectEmbedderPlugin.cc.

60  jetMatchSrc_(pset.getParameter<edm::InputTag>("jetTruthMatch")) {}
T getParameter(std::string const &) const
def move
Definition: eostools.py:508
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
template<typename T >
virtual reco::tau::RecoTauObjectEmbedder< T >::~RecoTauObjectEmbedder ( )
inlinevirtual

Definition at line 61 of file RecoTauObjectEmbedderPlugin.cc.

61 {}

Member Function Documentation

template<typename T >
void reco::tau::RecoTauObjectEmbedder< T >::beginEvent ( )
overridevirtual

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 71 of file RecoTauObjectEmbedderPlugin.cc.

71  {
73 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
edm::Handle< edm::Association< T > > jetMatch_
template<typename T >
void reco::tau::RecoTauObjectEmbedder< T >::operator() ( PFTau tau) const
overridevirtual

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 76 of file RecoTauObjectEmbedderPlugin.cc.

References edm::Ref< C, T, F >::isNonnull(), reco::PFTau::jetRef(), reco::tau::helpers::nCharged(), reco::tau::helpers::nGammas(), reco::BaseTau::setalternatLorentzVect(), reco::PFTau::setbremsRecoveryEOverPLead(), and reco::tau::translateDecayMode().

76  {
77  // Get the matched object that is matched to the same jet as the current tau,
78  // if it exists
79  edm::Ref<T> matchedObject = (*jetMatch_)[tau.jetRef()];
80  if (matchedObject.isNonnull()) {
81  // Store our matched object information
82  tau.setalternatLorentzVect(matchedObject->p4());
83  // Store our generator decay mode
84  tau.setbremsRecoveryEOverPLead(
86  helpers::nCharged(*matchedObject),
87  helpers::nGammas(*matchedObject)/2)
88  );
89  } else {
90  tau.setbremsRecoveryEOverPLead(-10);
91  }
92 }
unsigned int nGammas(const GenJet &jet)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
unsigned int nCharged(const GenJet &jet)

Member Data Documentation

template<typename T >
edm::Handle<edm::Association<T> > reco::tau::RecoTauObjectEmbedder< T >::jetMatch_
private

Definition at line 66 of file RecoTauObjectEmbedderPlugin.cc.

template<typename T >
edm::InputTag reco::tau::RecoTauObjectEmbedder< T >::jetMatchSrc_
private

Definition at line 65 of file RecoTauObjectEmbedderPlugin.cc.