CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TtFullHadSignalSelMVAComputer Class Reference

#include <TtFullHadSignalSelMVAComputer.h>

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

Public Member Functions

 TtFullHadSignalSelMVAComputer (const edm::ParameterSet &)
 
 ~TtFullHadSignalSelMVAComputer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

15  :
16  jets_ (cfg.getParameter<edm::InputTag>("jets"))
17 {
18  produces< double >("DiscSel");
19 }
T getParameter(std::string const &) const
TtFullHadSignalSelMVAComputer::~TtFullHadSignalSelMVAComputer ( )

Definition at line 23 of file TtFullHadSignalSelMVAComputer.cc.

24 {
25 }

Member Function Documentation

void TtFullHadSignalSelMVAComputer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 61 of file TtFullHadSignalSelMVAComputer.cc.

62 {
63 }
void TtFullHadSignalSelMVAComputer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 66 of file TtFullHadSignalSelMVAComputer.cc.

67 {
68 }
void TtFullHadSignalSelMVAComputer::produce ( edm::Event evt,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 28 of file TtFullHadSignalSelMVAComputer.cc.

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

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 
52 
53  *pOutDisc = discrim;
54 
55  evt.put(pOutDisc, "DiscSel");
56 
57  DiscSel = discrim;
58 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
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:355
bool update(const Calibration::MVAComputer *computer)
PhysicsTools::MVAComputerCache mvaComputer
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")

Member Data Documentation

double TtFullHadSignalSelMVAComputer::DiscSel
private

Definition at line 34 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

edm::InputTag TtFullHadSignalSelMVAComputer::jets_
private

Definition at line 30 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

PhysicsTools::MVAComputerCache TtFullHadSignalSelMVAComputer::mvaComputer
private

Definition at line 32 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().