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 54 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 56 of file RecoTauObjectEmbedderPlugin.cc.

58  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:511
template<typename T >
reco::tau::RecoTauObjectEmbedder< T >::~RecoTauObjectEmbedder ( )
inlineoverride

Definition at line 59 of file RecoTauObjectEmbedderPlugin.cc.

59 {}

Member Function Documentation

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

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 69 of file RecoTauObjectEmbedderPlugin.cc.

69  {
71 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
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 74 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().

74  {
75  // Get the matched object that is matched to the same jet as the current tau,
76  // if it exists
77  edm::Ref<T> matchedObject = (*jetMatch_)[tau.jetRef()];
78  if (matchedObject.isNonnull()) {
79  // Store our matched object information
80  tau.setalternatLorentzVect(matchedObject->p4());
81  // Store our generator decay mode
82  tau.setbremsRecoveryEOverPLead(
84  helpers::nCharged(*matchedObject),
85  helpers::nGammas(*matchedObject)/2)
86  );
87  } else {
88  tau.setbremsRecoveryEOverPLead(-10);
89  }
90 }
unsigned int nGammas(const GenJet &jet)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
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 64 of file RecoTauObjectEmbedderPlugin.cc.

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

Definition at line 63 of file RecoTauObjectEmbedderPlugin.cc.