CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

RecoTauDecayModeCutMultiplexer Class Reference

Inheritance diagram for RecoTauDecayModeCutMultiplexer:
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 &)
 RecoTauDecayModeCutMultiplexer (const edm::ParameterSet &pset)
 ~RecoTauDecayModeCutMultiplexer ()

Private Types

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

Private Attributes

DecayModeCutMap decayModeCuts_
edm::Handle
< reco::PFTauDiscriminator
handle_
edm::InputTag toMultiplex_

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

References decayModeCuts_, edm::ParameterSet::getParameter(), and toMultiplex_.

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

Definition at line 9 of file RecoTauDecayModeCutMultiplexer.cc.

{}

Member Function Documentation

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

Definition at line 48 of file RecoTauDecayModeCutMultiplexer.cc.

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

                                                                    {
  double disc_result = (*handle_)[tau];
  DecayModeCutMap::const_iterator cutIter =
      decayModeCuts_.find(std::make_pair(tau->signalPFChargedHadrCands().size(),
                                         tau->signalPiZeroCandidates().size()));

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

Member Data Documentation

Definition at line 19 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent().

Definition at line 18 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent(), and RecoTauDecayModeCutMultiplexer().