40 typedef std::vector<ComputerAndCut>
CutList;
43 double discriminate(
const PFTauRef& thePFTau)
const override;
69 std::vector<edm::ParameterSet> decayModeMap = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"computers");
73 for(std::vector<edm::ParameterSet>::const_iterator iComputer = decayModeMap.begin();
74 iComputer != decayModeMap.end();
79 toInsert.
userCut = iComputer->getParameter<
double>(
"cut");
83 std::vector<int> associatedDecayModes = iComputer->getParameter<std::vector<int> >(
"decayModeIndices");
84 for(std::vector<int>::const_iterator iDecayMode = associatedDecayModes.begin();
85 iDecayMode != associatedDecayModes.end();
89 std::pair<DecayModeToCutMap::iterator, bool> insertResult =
computerMap_.insert(std::make_pair(*iDecayMode, computerJustAdded));
92 if(insertResult.second ==
false) {
93 throw cms::Exception(
"PFTauDecayModeCutMultiplexer::ctor") <<
"A tau decay mode: " << *iDecayMode <<
" has been mapped to two different MVA implementations, "
94 << insertResult.first->second->computerName <<
" and " << toInsert.
computerName
95 <<
". Please check the appropriate cfi file." << std::endl;
116 float valueToMultiplex = (*targetDiscriminant)[pfTau];
123 if (valueToMultiplex > iterToComputer->second->userCut)
T getParameter(std::string const &) const
std::vector< ComputerAndCut > CutList
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::map< int, CutList::iterator > DecayModeToCutMap
double discriminate(const PFTauRef &thePFTau) const override
DecayModeToCutMap computerMap_
edm::InputTag pfTauDecayModeIndexSrc_
edm::InputTag discriminantToMultiplex_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
~PFTauDecayModeCutMultiplexer()
edm::EDGetTokenT< PFTauDiscriminator > discriminant_token
edm::EDGetTokenT< PFTauDiscriminator > pfTauDecayModeIndex_token
edm::Handle< PFTauDiscriminator > pfTauDecayModeIndices
PFTauDecayModeCutMultiplexer(const edm::ParameterSet &)
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override
edm::Handle< PFTauDiscriminator > targetDiscriminant