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::EDConsumerBase 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 &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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(), fwrapper::jets, jets_, mvaComputer, edm::Event::put(), corrVsCorr::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 }
selection
main part
Definition: corrVsCorr.py:98
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
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().