CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
30  double discrim = evaluateTtFullHadSignalSel(mvaComputer, selection);
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);
tuple cfg
Definition: looper.py:296
selection
main part
Definition: corrVsCorr.py:100
bool getData(T &iHolder) const
Definition: EventSetup.h:122
vector< PseudoJet > jets
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
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
constexpr char Jet[]
Definition: modules.cc:9
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool isSignal=false)
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void produce(edm::Event &evt, const edm::EventSetup &setup) override
#define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)
Definition: HelperMacros.h:53