CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtFullHadSignalSelMVAComputer.cc
Go to the documentation of this file.
2 
5 
7 
12 
13 
15  jetsToken_ (consumes< std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets")))
16 {
17  produces< double >("DiscSel");
18 }
19 
20 
21 
23 {
24 }
25 
26 void
28 {
29  std::auto_ptr< double > pOutDisc (new double);
30 
31  mvaComputer.update<TtFullHadSignalSelMVARcd>(setup, "ttFullHadSignalSelMVA");
32 
33  // read name of the last processor in the MVA calibration
34  // (to be used as meta information)
36  setup.get<TtFullHadSignalSelMVARcd>().get( calibContainer );
37  std::vector<PhysicsTools::Calibration::VarProcessor*> processors
38  = (calibContainer->find("ttFullHadSignalSelMVA")).getProcessors();
39 
41  evt.getByToken(jetsToken_, jets);
42 
43  //calculation of InputVariables
44  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
45  // /src/TtFullHadSignalSel.cc
46  //all objects, jets, which are needed for the calculation
47  //of the input-variables have to be passed to this class
49 
50  double discrim = evaluateTtFullHadSignalSel(mvaComputer, selection);
51 
52  *pOutDisc = discrim;
53 
54  evt.put(pOutDisc, "DiscSel");
55 
56  DiscSel = discrim;
57 }
58 
59 void
61 {
62 }
63 
64 void
66 {
67 }
68 
69 // implement the plugins for the computer container
70 // -> register TtFullHadSignalSelMVARcd
71 // -> define TtFullHadSignalSelMVAFileSource
72 MVA_COMPUTER_CONTAINER_IMPLEMENT(TtFullHadSignalSelMVA);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
selection
main part
Definition: corrVsCorr.py:98
virtual void produce(edm::Event &evt, const edm::EventSetup &setup)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
vector< PseudoJet > jets
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool training=false, const bool isSignal=false)
TtFullHadSignalSelMVAComputer(const edm::ParameterSet &)
bool update(const Calibration::MVAComputer *computer)
PhysicsTools::MVAComputerCache mvaComputer
#define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)
Definition: HelperMacros.h:46
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_