CMS 3D CMS Logo

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 >, kMaxWeightsgbr
 

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 GoodSeedProducer::chikfred, GoodSeedProducer::chiRatio, GoodSeedProducer::chired, GoodSeedProducer::dpt, GoodSeedProducer::eP, GoodSeedProducer::eta, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), j, GoodSeedProducer::method_, GoodSeedProducer::nhit, GoodSeedProducer::pt, matplotRender::reader, AlCaHLTBitMon_QueryRunRegistry::string, GoodSeedProducer::trk_ecalDeta, GoodSeedProducer::trk_ecalDphi, and create_public_lumi_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  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.

float goodseedhelpers::HeavyObjectCache::chiRatio
private

Definition at line 63 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::chired
private

Definition at line 63 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::dpt
private

Definition at line 63 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::eP
private

Definition at line 63 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::eta
private

Definition at line 63 of file GoodSeedProducer.h.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

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

Definition at line 60 of file GoodSeedProducer.h.

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.

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

Definition at line 64 of file GoodSeedProducer.h.

float goodseedhelpers::HeavyObjectCache::trk_ecalDphi
private

Definition at line 64 of file GoodSeedProducer.h.