CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/TopQuarkAnalysis/TopEventSelection/plugins/TtSemiLepSignalSelMVATrainer.h

Go to the documentation of this file.
00001 #ifndef TtSemiLepSignalSelMVATrainer_h
00002 #define TtSemiLepSignalSelMVATrainer_h
00003 
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/Framework/interface/EDAnalyzer.h"
00007 #include "FWCore/Framework/interface/Frameworkfwd.h"
00008 #include "FWCore/Framework/interface/MakerMacros.h"
00009 #include "FWCore/Framework/interface/ESHandle.h"
00010 #include "FWCore/Utilities/interface/InputTag.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 
00013 #include "PhysicsTools/MVAComputer/interface/HelperMacros.h"
00014 #include "PhysicsTools/MVAComputer/interface/MVAComputerCache.h"
00015 
00016 #include "DataFormats/PatCandidates/interface/Jet.h"
00017 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00018 
00019 #ifndef TtSemiLepSignalSelMVARcd_defined  // to avoid conflicts with the TtSemiSignalSelMVAComputer
00020 #define TtSemiLepSignalSelMVARcd_defined
00021 MVA_COMPUTER_CONTAINER_DEFINE(TtSemiLepSignalSelMVA);  // defines TtSemiLepSignalSelMVA
00022 #endif
00023 
00024 class TtSemiLepSignalSelMVATrainer : public edm::EDAnalyzer {
00025   
00026  public:
00027   
00028   explicit TtSemiLepSignalSelMVATrainer(const edm::ParameterSet&);
00029   ~TtSemiLepSignalSelMVATrainer();
00030   
00031  private:
00032   
00033   virtual void analyze(const edm::Event& evt, const edm::EventSetup& setup);
00034   virtual void beginJob();
00035 
00036   double DeltaPhi(math::XYZTLorentzVector v1, math::XYZTLorentzVector v2);
00037   double DeltaR(math::XYZTLorentzVector v1, math::XYZTLorentzVector v2);
00038 
00039   // pt sorting stuff
00040   struct JetwithHigherPt {
00041     bool operator() ( const pat::Jet& j1, const pat::Jet& j2) const {
00042       return j1.pt() > j2.pt();
00043     };
00044   };
00045 
00046   edm::InputTag muons_;
00047   edm::InputTag electrons_;
00048   edm::InputTag jets_;
00049   edm::InputTag METs_;
00050 
00051   int lepChannel_;
00052   int whatData_;
00053   int maxEv_;
00054   int selEv;
00055 
00056   PhysicsTools::MVAComputerCache mvaComputer;
00057 
00058 };
00059 
00060 #endif