CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TtFullHadSignalSelMVAComputer Class Reference

#include <TtFullHadSignalSelMVAComputer.h>

Inheritance diagram for TtFullHadSignalSelMVAComputer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 TtFullHadSignalSelMVAComputer (const edm::ParameterSet &)
 ~TtFullHadSignalSelMVAComputer ()

Private Member Functions

virtual void beginJob ()
virtual void endJob ()
virtual void produce (edm::Event &evt, const edm::EventSetup &setup)

Private Attributes

double DiscSel
edm::InputTag jets_
PhysicsTools::MVAComputerCache mvaComputer

Detailed Description

Definition at line 17 of file TtFullHadSignalSelMVAComputer.h.


Constructor & Destructor Documentation

TtFullHadSignalSelMVAComputer::TtFullHadSignalSelMVAComputer ( const edm::ParameterSet cfg) [explicit]

Definition at line 15 of file TtFullHadSignalSelMVAComputer.cc.

                                                                                      :
  jets_    (cfg.getParameter<edm::InputTag>("jets"))
{
  produces< double >("DiscSel");
}
TtFullHadSignalSelMVAComputer::~TtFullHadSignalSelMVAComputer ( )

Definition at line 23 of file TtFullHadSignalSelMVAComputer.cc.

{
}

Member Function Documentation

void TtFullHadSignalSelMVAComputer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 61 of file TtFullHadSignalSelMVAComputer.cc.

{
}
void TtFullHadSignalSelMVAComputer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 66 of file TtFullHadSignalSelMVAComputer.cc.

{
}
void TtFullHadSignalSelMVAComputer::produce ( edm::Event evt,
const edm::EventSetup setup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 28 of file TtFullHadSignalSelMVAComputer.cc.

References DiscSel, evaluateTtFullHadSignalSel(), edm::Event::getByLabel(), fwrapper::jets, jets_, mvaComputer, edm::Event::put(), corrVsCorr::selection, HcalObjRepresent::setup(), and PhysicsTools::MVAComputerCache::update().

{
  std::auto_ptr< double > pOutDisc (new double);
 
  mvaComputer.update<TtFullHadSignalSelMVARcd>(setup, "ttFullHadSignalSelMVA");

  // read name of the last processor in the MVA calibration
  // (to be used as meta information)
  edm::ESHandle<PhysicsTools::Calibration::MVAComputerContainer> calibContainer;
  setup.get<TtFullHadSignalSelMVARcd>().get( calibContainer );
  std::vector<PhysicsTools::Calibration::VarProcessor*> processors
    = (calibContainer->find("ttFullHadSignalSelMVA")).getProcessors();

  edm::Handle< std::vector<pat::Jet> > jets;
  evt.getByLabel(jets_, jets);
  
  //calculation of InputVariables
  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
  //                             /src/TtFullHadSignalSel.cc
  //all objects, jets, which are needed for the calculation
  //of the input-variables have to be passed to this class
  TtFullHadSignalSel selection(*jets);

  double discrim = evaluateTtFullHadSignalSel(mvaComputer, selection);

  *pOutDisc = discrim;
  
  evt.put(pOutDisc, "DiscSel");
  
  DiscSel = discrim;
}

Member Data Documentation

Definition at line 34 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

Definition at line 30 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

Definition at line 32 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().