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_ |
Definition at line 23 of file RecoTauDiscriminantCutMultiplexer.cc.
typedef std::map<int, double> RecoTauDiscriminantCutMultiplexer::DiscriminantCutMap [private] |
Definition at line 32 of file RecoTauDiscriminantCutMultiplexer.cc.
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.
{}
void RecoTauDiscriminantCutMultiplexer::beginEvent | ( | const edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 60 of file RecoTauDiscriminantCutMultiplexer.cc.
References edm::Event::getByLabel(), key_, keyHandle_, toMultiplex_, and toMultiplexHandle_.
{ evt.getByLabel(toMultiplex_, toMultiplexHandle_); evt.getByLabel(key_, keyHandle_); }
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; }
Definition at line 34 of file RecoTauDiscriminantCutMultiplexer.cc.
Referenced by discriminate(), and RecoTauDiscriminantCutMultiplexer().
Definition at line 36 of file RecoTauDiscriminantCutMultiplexer.cc.
Referenced by beginEvent(), and RecoTauDiscriminantCutMultiplexer().
Definition at line 38 of file RecoTauDiscriminantCutMultiplexer.cc.
Referenced by beginEvent().
Definition at line 35 of file RecoTauDiscriminantCutMultiplexer.cc.
Referenced by beginEvent(), and RecoTauDiscriminantCutMultiplexer().
edm::Handle<reco::PFTauDiscriminator> RecoTauDiscriminantCutMultiplexer::toMultiplexHandle_ [private] |
Definition at line 37 of file RecoTauDiscriminantCutMultiplexer.cc.
Referenced by beginEvent().