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 ()
 
ModuleDescription const & moduleDescription () const
 
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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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::EDGetTokenT< std::vector
< pat::Jet > > 
jetsToken_
 
PhysicsTools::MVAComputerCache mvaComputer
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- 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::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 18 of file TtFullHadSignalSelMVAComputer.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file TtFullHadSignalSelMVAComputer.cc.

14  :
15  jetsToken_ (consumes< std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets")))
16 {
17  produces< double >("DiscSel");
18 }
T getParameter(std::string const &) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
TtFullHadSignalSelMVAComputer::~TtFullHadSignalSelMVAComputer ( )

Definition at line 22 of file TtFullHadSignalSelMVAComputer.cc.

23 {
24 }

Member Function Documentation

void TtFullHadSignalSelMVAComputer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 60 of file TtFullHadSignalSelMVAComputer.cc.

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

Reimplemented from edm::EDProducer.

Definition at line 65 of file TtFullHadSignalSelMVAComputer.cc.

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

Implements edm::EDProducer.

Definition at line 27 of file TtFullHadSignalSelMVAComputer.cc.

References DiscSel, evaluateTtFullHadSignalSel(), edm::eventsetup::EventSetupRecord::get(), edm::Event::getByToken(), fwrapper::jets, jetsToken_, mvaComputer, edm::Event::put(), corrVsCorr::selection, HcalObjRepresent::setup(), and PhysicsTools::MVAComputerCache::update().

28 {
29  std::auto_ptr< double > pOutDisc (new double);
30 
31  mvaComputer.update<TtFullHadSignalSelMVARcd>(setup, "ttFullHadSignalSelMVA");
32 
33  // read name of the last processor in the MVA calibration
34  // (to be used as meta information)
36  setup.get<TtFullHadSignalSelMVARcd>().get( calibContainer );
37  std::vector<PhysicsTools::Calibration::VarProcessor*> processors
38  = (calibContainer->find("ttFullHadSignalSelMVA")).getProcessors();
39 
41  evt.getByToken(jetsToken_, jets);
42 
43  //calculation of InputVariables
44  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
45  // /src/TtFullHadSignalSel.cc
46  //all objects, jets, which are needed for the calculation
47  //of the input-variables have to be passed to this class
49 
51 
52  *pOutDisc = discrim;
53 
54  evt.put(pOutDisc, "DiscSel");
55 
56  DiscSel = discrim;
57 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
selection
main part
Definition: corrVsCorr.py:98
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
vector< PseudoJet > jets
void get(HolderT &iHolder) const
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool training=false, const bool isSignal=false)
bool update(const Calibration::MVAComputer *computer)
PhysicsTools::MVAComputerCache mvaComputer
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_

Member Data Documentation

double TtFullHadSignalSelMVAComputer::DiscSel
private

Definition at line 35 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

edm::EDGetTokenT< std::vector<pat::Jet> > TtFullHadSignalSelMVAComputer::jetsToken_
private

Definition at line 31 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

PhysicsTools::MVAComputerCache TtFullHadSignalSelMVAComputer::mvaComputer
private

Definition at line 33 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().