CMS 3D CMS Logo

TtFullHadSignalSelMVAComputer.cc
Go to the documentation of this file.
2 
5 
7 
12 
14  : mvaToken_(esConsumes()),
15  jetsToken_(consumes<std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets"))),
16  putToken_(produces("DiscSel")) {}
17 
19  mvaComputer.update(&setup.getData(mvaToken_), "ttFullHadSignalSelMVA");
20 
21  const auto& jets = evt.get(jetsToken_);
22 
23  //calculation of InputVariables
24  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
25  // /src/TtFullHadSignalSel.cc
26  //all objects, jets, which are needed for the calculation
27  //of the input-variables have to be passed to this class
29 
31 
32  evt.emplace(putToken_, discrim);
33 }
34 
35 // implement the plugins for the computer container
36 // -> register TtFullHadSignalSelMVARcd
37 // -> define TtFullHadSignalSelMVAFileSource
38 MVA_COMPUTER_CONTAINER_IMPLEMENT(TtFullHadSignalSelMVA);
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
selection
main part
Definition: corrVsCorr.py:100
Definition: HeavyIon.h:7
Definition: Jet.py:1
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtFullHadSignalSelMVARcd > mvaToken_
TtFullHadSignalSelMVAComputer(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
bool update(const Calibration::MVAComputer *computer)
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&... args)
puts a new product
Definition: Event.h:433
PhysicsTools::MVAComputerCache mvaComputer
HLT enums.
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool isSignal=false)
void produce(edm::Event &evt, const edm::EventSetup &setup) override
#define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)
Definition: HelperMacros.h:53