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_ |
Definition at line 5 of file RecoTauDecayModeCutMultiplexer.cc.
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.
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.
{}
void RecoTauDecayModeCutMultiplexer::beginEvent | ( | const edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 42 of file RecoTauDecayModeCutMultiplexer.cc.
References edm::Event::getByLabel(), handle_, and toMultiplex_.
{ evt.getByLabel(toMultiplex_, handle_); }
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; }
Definition at line 17 of file RecoTauDecayModeCutMultiplexer.cc.
Referenced by discriminate(), and RecoTauDecayModeCutMultiplexer().
Definition at line 19 of file RecoTauDecayModeCutMultiplexer.cc.
Referenced by beginEvent().
Definition at line 18 of file RecoTauDecayModeCutMultiplexer.cc.
Referenced by beginEvent(), and RecoTauDecayModeCutMultiplexer().