Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:15

0001 #ifndef TtSemiLepSignalSelMVAComputer_h
0002 #define TtSemiLepSignalSelMVAComputer_h
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/stream/EDProducer.h"
0006 
0007 #include "PhysicsTools/MVAComputer/interface/HelperMacros.h"
0008 #include "PhysicsTools/MVAComputer/interface/MVAComputerCache.h"
0009 
0010 #include "DataFormats/Math/interface/LorentzVector.h"
0011 #include "DataFormats/PatCandidates/interface/Jet.h"
0012 #include "DataFormats/PatCandidates/interface/MET.h"
0013 #include "DataFormats/PatCandidates/interface/Muon.h"
0014 #include "DataFormats/PatCandidates/interface/Electron.h"
0015 
0016 #ifndef TtSemiLepSignalSelMVARcd_defined  // to avoid conflicts with the TopSemiLepLepSignalSelMVATrainer
0017 #define TtSemiLepSignalSelMVARcd_defined
0018 MVA_COMPUTER_CONTAINER_DEFINE(TtSemiLepSignalSelMVA);  // defines TopSemiLepLepSignalSelMVARcd
0019 #endif
0020 
0021 class TtSemiLepSignalSelMVAComputer : public edm::stream::EDProducer<> {
0022 public:
0023   explicit TtSemiLepSignalSelMVAComputer(const edm::ParameterSet&);
0024   ~TtSemiLepSignalSelMVAComputer() override;
0025 
0026 private:
0027   void produce(edm::Event& evt, const edm::EventSetup& setup) override;
0028 
0029   double DeltaPhi(const math::XYZTLorentzVector& v1, const math::XYZTLorentzVector& v2);
0030   double DeltaR(const math::XYZTLorentzVector& v1, const math::XYZTLorentzVector& v2);
0031 
0032   edm::ESGetToken<PhysicsTools::Calibration::MVAComputerContainer, TtSemiLepSignalSelMVARcd> mvaToken_;
0033   edm::EDGetTokenT<edm::View<pat::Muon> > muonsToken_;
0034   edm::EDGetTokenT<std::vector<pat::Jet> > jetsToken_;
0035   edm::EDGetTokenT<edm::View<pat::MET> > METsToken_;
0036   edm::EDGetTokenT<edm::View<pat::Electron> > electronsToken_;
0037   edm::EDPutTokenT<double> putToken_;
0038 
0039   PhysicsTools::MVAComputerCache mvaComputer;
0040 };
0041 
0042 #endif