CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RecoTauDiscriminationByGenMatch Class Reference
Inheritance diagram for RecoTauDiscriminationByGenMatch:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::stream::EDProducer<>

Public Member Functions

void beginEvent (const edm::Event &evt, const edm::EventSetup &es) override
 
double discriminate (const reco::PFTauRef &pfTau) const override
 
 RecoTauDiscriminationByGenMatch (const edm::ParameterSet &pset)
 
 ~RecoTauDiscriminationByGenMatch () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau) const =0
 
virtual void endEvent (edm::Event &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
 ~TauDiscriminationProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

edm::Handle< edm::Association< reco::GenJetCollection > > matching_
 
edm::InputTag matchingSrc_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd< TauCollectionTauRefProd
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
static void fillProducerDescriptions (edm::ParameterSetDescription &desc)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
size_t tauIndex_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 13 of file RecoTauDiscriminationByGenMatch.cc.

Constructor & Destructor Documentation

RecoTauDiscriminationByGenMatch::RecoTauDiscriminationByGenMatch ( const edm::ParameterSet pset)
inlineexplicit

Definition at line 15 of file RecoTauDiscriminationByGenMatch.cc.

References edm::ParameterSet::getParameter(), and matchingSrc_.

17  matchingSrc_ = pset.getParameter<edm::InputTag>("match");
18  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
RecoTauDiscriminationByGenMatch::~RecoTauDiscriminationByGenMatch ( )
inlineoverride

Definition at line 19 of file RecoTauDiscriminationByGenMatch.cc.

References beginEvent(), and discriminate().

19 {}

Member Function Documentation

void RecoTauDiscriminationByGenMatch::beginEvent ( const edm::Event evt,
const edm::EventSetup es 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 28 of file RecoTauDiscriminationByGenMatch.cc.

References edm::Event::getByLabel(), matching_, and matchingSrc_.

Referenced by ~RecoTauDiscriminationByGenMatch().

29  {
31 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
edm::Handle< edm::Association< reco::GenJetCollection > > matching_
double RecoTauDiscriminationByGenMatch::discriminate ( const reco::PFTauRef pfTau) const
override

Definition at line 34 of file RecoTauDiscriminationByGenMatch.cc.

References DEFINE_FWK_MODULE, edm::Ref< C, T, F >::isNonnull(), and metsig::tau.

Referenced by ~RecoTauDiscriminationByGenMatch().

34  {
35  reco::GenJetRef genJet = (*matching_)[tau];
36  return genJet.isNonnull() ? 1.0 : 0;
37 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251

Member Data Documentation

edm::Handle<edm::Association<reco::GenJetCollection> > RecoTauDiscriminationByGenMatch::matching_
private

Definition at line 25 of file RecoTauDiscriminationByGenMatch.cc.

Referenced by beginEvent().

edm::InputTag RecoTauDiscriminationByGenMatch::matchingSrc_
private