CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

RecoTauDiscriminantCutMultiplexer Class Reference

Inheritance diagram for RecoTauDiscriminantCutMultiplexer:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
double discriminate (const reco::PFTauRef &)
 RecoTauDiscriminantCutMultiplexer (const edm::ParameterSet &pset)
 ~RecoTauDiscriminantCutMultiplexer ()

Private Types

typedef std::map< int, double > DiscriminantCutMap

Private Attributes

DiscriminantCutMap cuts_
edm::InputTag key_
edm::Handle
< reco::PFTauDiscriminator
keyHandle_
edm::InputTag toMultiplex_
edm::Handle
< reco::PFTauDiscriminator
toMultiplexHandle_

Detailed Description

Definition at line 23 of file RecoTauDiscriminantCutMultiplexer.cc.


Member Typedef Documentation

typedef std::map<int, double> RecoTauDiscriminantCutMultiplexer::DiscriminantCutMap [private]

Definition at line 32 of file RecoTauDiscriminantCutMultiplexer.cc.


Constructor & Destructor Documentation

RecoTauDiscriminantCutMultiplexer::RecoTauDiscriminantCutMultiplexer ( const edm::ParameterSet pset) [explicit]

Definition at line 41 of file RecoTauDiscriminantCutMultiplexer.cc.

References cuts_, edm::ParameterSet::getParameter(), key_, and toMultiplex_.

                                :PFTauDiscriminationProducerBase(pset) {
  toMultiplex_ = pset.getParameter<edm::InputTag>("toMultiplex");
  key_ = pset.getParameter<edm::InputTag>("key");
  /*code*/
  typedef std::vector<edm::ParameterSet> VPSet;
  VPSet mapping = pset.getParameter<VPSet>("mapping");
  // Setup our cut map
  BOOST_FOREACH(const edm::ParameterSet &dm, mapping) {
    // Get the mass window for each decay mode
    cuts_.insert(std::make_pair(
          // The category as a key
          dm.getParameter<uint32_t>("category"),
          // The selection
          dm.getParameter<double>("cut")
          ));
  }
}
RecoTauDiscriminantCutMultiplexer::~RecoTauDiscriminantCutMultiplexer ( ) [inline]

Definition at line 27 of file RecoTauDiscriminantCutMultiplexer.cc.

{}

Member Function Documentation

void RecoTauDiscriminantCutMultiplexer::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]
double RecoTauDiscriminantCutMultiplexer::discriminate ( const reco::PFTauRef tau)

Definition at line 67 of file RecoTauDiscriminantCutMultiplexer.cc.

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

                                                                       {
  double disc_result = (*toMultiplexHandle_)[tau];
  double key_result = (*keyHandle_)[tau];
  DiscriminantCutMap::const_iterator cutIter = cuts_.find(TMath::Nint(key_result));

  // Return null if it doesn't exist
  if (cutIter == cuts_.end()) {
    return prediscriminantFailValue_;
  }
  // See if the discriminator passes our cuts
  return disc_result > cutIter->second;
}

Member Data Documentation

Definition at line 38 of file RecoTauDiscriminantCutMultiplexer.cc.

Referenced by beginEvent().

Definition at line 37 of file RecoTauDiscriminantCutMultiplexer.cc.

Referenced by beginEvent().