File indexing completed on 2024-04-06 12:31:15
0001 #include "PhysicsTools/JetMCUtils/interface/combination.h"
0002
0003 #include "TopQuarkAnalysis/TopEventSelection/plugins/TtFullHadSignalSelMVAComputer.h"
0004 #include "TopQuarkAnalysis/TopEventSelection/interface/TtFullHadSignalSelEval.h"
0005
0006 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0007
0008 #include "DataFormats/Common/interface/TriggerResults.h"
0009 #include "FWCore/Framework/interface/TriggerNamesService.h"
0010 #include "FWCore/ServiceRegistry/interface/Service.h"
0011 #include "DataFormats/PatCandidates/interface/Flags.h"
0012
0013 TtFullHadSignalSelMVAComputer::TtFullHadSignalSelMVAComputer(const edm::ParameterSet& cfg)
0014 : mvaToken_(esConsumes()),
0015 jetsToken_(consumes<std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets"))),
0016 putToken_(produces("DiscSel")) {}
0017
0018 void TtFullHadSignalSelMVAComputer::produce(edm::Event& evt, const edm::EventSetup& setup) {
0019 mvaComputer.update(&setup.getData(mvaToken_), "ttFullHadSignalSelMVA");
0020
0021 const auto& jets = evt.get(jetsToken_);
0022
0023
0024
0025
0026
0027
0028 TtFullHadSignalSel selection(jets);
0029
0030 double discrim = evaluateTtFullHadSignalSel(mvaComputer, selection);
0031
0032 evt.emplace(putToken_, discrim);
0033 }
0034
0035
0036
0037
0038 MVA_COMPUTER_CONTAINER_IMPLEMENT(TtFullHadSignalSelMVA);