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 
8 
13 
14 
16  jets_ (cfg.getParameter<edm::InputTag>("jets"))
17 {
18  produces< double >("DiscSel");
19 }
20 
21 
22 
24 {
25 }
26 
27 void
29 {
30  std::auto_ptr< double > pOutDisc (new double);
31 
32  mvaComputer.update<TtFullHadSignalSelMVARcd>(setup, "ttFullHadSignalSelMVA");
33 
34  // read name of the last processor in the MVA calibration
35  // (to be used as meta information)
37  setup.get<TtFullHadSignalSelMVARcd>().get( calibContainer );
38  std::vector<PhysicsTools::Calibration::VarProcessor*> processors
39  = (calibContainer->find("ttFullHadSignalSelMVA")).getProcessors();
40 
42  evt.getByLabel(jets_, jets);
43 
44  //calculation of InputVariables
45  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
46  // /src/TtFullHadSignalSel.cc
47  //all objects, jets, which are needed for the calculation
48  //of the input-variables have to be passed to this class
50 
51  double discrim = evaluateTtFullHadSignalSel(mvaComputer, selection);
52 
53  *pOutDisc = discrim;
54 
55  evt.put(pOutDisc, "DiscSel");
56 
57  DiscSel = discrim;
58 }
59 
60 void
62 {
63 }
64 
65 void
67 {
68 }
69 
70 // implement the plugins for the computer container
71 // -> register TtFullHadSignalSelMVARcd
72 // -> define TtFullHadSignalSelMVAFileSource
73 MVA_COMPUTER_CONTAINER_IMPLEMENT(TtFullHadSignalSelMVA);
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:94
vector< PseudoJet > jets
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool training=false, const bool isSignal=false)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
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="")