test
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 480 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.

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