CMS 3D CMS Logo

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

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
double discriminate (const reco::PFTauRef &) const override
 
 RecoTauDecayModeCutMultiplexer (const edm::ParameterSet &pset)
 
 ~RecoTauDecayModeCutMultiplexer () 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 Types

typedef std::map< IntPair, double > DecayModeCutMap
 
typedef std::pair< unsigned int, unsigned int > IntPair
 

Private Attributes

DecayModeCutMap decayModeCuts_
 
edm::Handle< reco::PFTauDiscriminatorhandle_
 
edm::InputTag toMultiplex_
 
edm::EDGetTokenT< reco::PFTauDiscriminatortoMultiplex_token
 

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
 
- 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 5 of file RecoTauDecayModeCutMultiplexer.cc.

Member Typedef Documentation

typedef std::map<IntPair, double> RecoTauDecayModeCutMultiplexer::DecayModeCutMap
private

Definition at line 15 of file RecoTauDecayModeCutMultiplexer.cc.

typedef std::pair<unsigned int, unsigned int> RecoTauDecayModeCutMultiplexer::IntPair
private

Definition at line 14 of file RecoTauDecayModeCutMultiplexer.cc.

Constructor & Destructor Documentation

RecoTauDecayModeCutMultiplexer::RecoTauDecayModeCutMultiplexer ( const edm::ParameterSet pset)
explicit

Definition at line 23 of file RecoTauDecayModeCutMultiplexer.cc.

References decayModeCuts_, tauJetCorrFactors_cfi::decayModes, symbols::dm, edm::ParameterSet::getParameter(), toMultiplex_, toMultiplex_token, and HistogramManager_cfi::VPSet().

25  toMultiplex_ = pset.getParameter<edm::InputTag>("toMultiplex");
26  toMultiplex_token = consumes<reco::PFTauDiscriminator>(toMultiplex_);
27  typedef std::vector<edm::ParameterSet> VPSet;
28  const VPSet& decayModes = pset.getParameter<VPSet>("decayModes");
29  // Setup our cut map
30  BOOST_FOREACH(const edm::ParameterSet &dm, decayModes) {
31  // Get the mass window for each decay mode
32  decayModeCuts_.insert(std::make_pair(
33  // The decay mode as a key
34  std::make_pair(
35  dm.getParameter<uint32_t>("nCharged"),
36  dm.getParameter<uint32_t>("nPiZeros")),
37  // The selection
38  dm.getParameter<double>("cut")
39  ));
40  }
41 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFTauDiscriminator > toMultiplex_token
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
RecoTauDecayModeCutMultiplexer::~RecoTauDecayModeCutMultiplexer ( )
inlineoverride

Definition at line 9 of file RecoTauDecayModeCutMultiplexer.cc.

References beginEvent(), and discriminate().

9 {}

Member Function Documentation

void RecoTauDecayModeCutMultiplexer::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 44 of file RecoTauDecayModeCutMultiplexer.cc.

References edm::Event::getByToken(), handle_, and toMultiplex_token.

Referenced by ~RecoTauDecayModeCutMultiplexer().

45  {
46  evt.getByToken(toMultiplex_token, handle_);
47 }
edm::Handle< reco::PFTauDiscriminator > handle_
edm::EDGetTokenT< reco::PFTauDiscriminator > toMultiplex_token
double RecoTauDecayModeCutMultiplexer::discriminate ( const reco::PFTauRef tau) const
override

Definition at line 50 of file RecoTauDecayModeCutMultiplexer.cc.

References decayModeCuts_, DEFINE_FWK_MODULE, TauDiscriminationProducerBase< TauType, TauDiscriminator >::prediscriminantFailValue_, and metsig::tau.

Referenced by ~RecoTauDecayModeCutMultiplexer().

50  {
51  double disc_result = (*handle_)[tau];
52  DecayModeCutMap::const_iterator cutIter =
53  decayModeCuts_.find(std::make_pair(tau->signalPFChargedHadrCands().size(),
54  tau->signalPiZeroCandidates().size()));
55 
56  // Return null if it doesn't exist
57  if (cutIter == decayModeCuts_.end()) {
59  }
60  // See if the discriminator passes our cuts
61  return disc_result > cutIter->second;
62 }

Member Data Documentation

DecayModeCutMap RecoTauDecayModeCutMultiplexer::decayModeCuts_
private
edm::Handle<reco::PFTauDiscriminator> RecoTauDecayModeCutMultiplexer::handle_
private

Definition at line 19 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent().

edm::InputTag RecoTauDecayModeCutMultiplexer::toMultiplex_
private

Definition at line 18 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by RecoTauDecayModeCutMultiplexer().

edm::EDGetTokenT<reco::PFTauDiscriminator> RecoTauDecayModeCutMultiplexer::toMultiplex_token
private

Definition at line 20 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent(), and RecoTauDecayModeCutMultiplexer().