CMS 3D CMS Logo

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

void beginEvent () override
 
void operator() (PFTau &) const override
 
 RecoTauObjectEmbedder (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauObjectEmbedder () override
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void endEvent ()
 
 RecoTauModifierPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauModifierPlugin () 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::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
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
def move(src, dest)
Definition: eostools.py:510
template<typename T >
reco::tau::RecoTauObjectEmbedder< T >::~RecoTauObjectEmbedder ( )
inlineoverride

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:464
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 DEFINE_EDM_PLUGIN, 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:253
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.