CMS 3D CMS Logo

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

#include <GoodSeedProducer.h>

Public Member Functions

 HeavyObjectCache (const edm::ParameterSet &conf)
 

Public Attributes

std::array< std::unique_ptr
< const GBRForest >
, kMaxWeights
gbr
 

Private Attributes

float chikfred
 
float chiRatio
 
float chired
 
float dpt
 
float eP
 
float eta
 
float nhit
 
float pt
 
float trk_ecalDeta
 
float trk_ecalDphi
 

Static Private Attributes

static unsigned int kMaxWeights = 9
 

Detailed Description

Definition at line 56 of file GoodSeedProducer.h.

Constructor & Destructor Documentation

goodseedhelpers::HeavyObjectCache::HeavyObjectCache ( const edm::ParameterSet conf)

Definition at line 488 of file GoodSeedProducer.cc.

References chikfred, chiRatio, chired, dpt, eP, eta, gbr, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), j, nhit, pt, matplotRender::reader, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, trk_ecalDeta, trk_ecalDphi, and create_public_pileup_plots::weights.

488  {
489  // mvas
490  const bool useTmva = conf.getUntrackedParameter<bool>("UseTMVA",false);
491 
492  if( useTmva ) {
493  const std::string method_ = conf.getParameter<string>("TMVAMethod");
494  std::array<edm::FileInPath,kMaxWeights> weights = {{ edm::FileInPath(conf.getParameter<string>("Weights1")),
495  edm::FileInPath(conf.getParameter<string>("Weights2")),
496  edm::FileInPath(conf.getParameter<string>("Weights3")),
497  edm::FileInPath(conf.getParameter<string>("Weights4")),
498  edm::FileInPath(conf.getParameter<string>("Weights5")),
499  edm::FileInPath(conf.getParameter<string>("Weights6")),
500  edm::FileInPath(conf.getParameter<string>("Weights7")),
501  edm::FileInPath(conf.getParameter<string>("Weights8")),
502  edm::FileInPath(conf.getParameter<string>("Weights9")) }};
503 
504  for(UInt_t j = 0; j < gbr.size(); ++j){
505  TMVA::Reader reader("!Color:Silent");
506 
507  reader.AddVariable("NHits", &nhit);
508  reader.AddVariable("NormChi", &chikfred);
509  reader.AddVariable("dPtGSF", &dpt);
510  reader.AddVariable("EoP", &eP);
511  reader.AddVariable("ChiRatio", &chiRatio);
512  reader.AddVariable("RedChi", &chired);
513  reader.AddVariable("EcalDEta", &trk_ecalDeta);
514  reader.AddVariable("EcalDPhi", &trk_ecalDphi);
515  reader.AddVariable("pt", &pt);
516  reader.AddVariable("eta", &eta);
517 
518  std::unique_ptr<TMVA::IMethod> temp( reader.BookMVA(method_, weights[j].fullPath().c_str()) );
519 
520  gbr[j].reset( new GBRForest( dynamic_cast<TMVA::MethodBDT*>( reader.FindMVA(method_) ) ) );
521  }
522  }
523  }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::array< std::unique_ptr< const GBRForest >, kMaxWeights > gbr
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

float goodseedhelpers::HeavyObjectCache::chikfred
private

Definition at line 64 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::chiRatio
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::chired
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::dpt
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::eP
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::eta
private
std::array<std::unique_ptr<const GBRForest>,kMaxWeights> goodseedhelpers::HeavyObjectCache::gbr

Definition at line 60 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

unsigned int goodseedhelpers::HeavyObjectCache::kMaxWeights = 9
staticprivate

Definition at line 57 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::nhit
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::pt
private
float goodseedhelpers::HeavyObjectCache::trk_ecalDeta
private

Definition at line 64 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().

float goodseedhelpers::HeavyObjectCache::trk_ecalDphi
private

Definition at line 64 of file GoodSeedProducer.h.

Referenced by HeavyObjectCache().