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 Member Functions | Private Attributes
convbremhelpers::HeavyObjectCache Class Reference

#include <ConvBremHeavyObjectCache.h>

Public Member Functions

 HeavyObjectCache (const edm::ParameterSet &)
 

Public Attributes

std::unique_ptr< const GBRForestgbrBarrelHighPt_
 
std::unique_ptr< const GBRForestgbrBarrelLowPt_
 
std::unique_ptr< const GBRForestgbrEndcapsHighPt_
 
std::unique_ptr< const GBRForestgbrEndcapsLowPt_
 
std::unique_ptr< const
PFEnergyCalibration
pfcalib_
 

Private Member Functions

std::unique_ptr< const GBRForestsetupMVA (const std::string &)
 

Private Attributes

float detaBremKF
 
float Epout
 
float nHITS1
 
float ptRatioGsfKF
 
float secR
 
float sTIP
 

Detailed Description

Definition at line 10 of file ConvBremHeavyObjectCache.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file ConvBremHeavyObjectCache.cc.

References contentValuesFiles::fullPath, gbrBarrelHighPt_, gbrBarrelLowPt_, gbrEndcapsHighPt_, gbrEndcapsLowPt_, edm::ParameterSet::getParameter(), pfcalib_, setupMVA(), and AlCaHLTBitMon_QueryRunRegistry::string.

7  {
8 
9  pfcalib_.reset( new PFEnergyCalibration() );
10 
11  const bool useConvBremFinder_ = conf.getParameter<bool>("useConvBremFinder");
12 
13  if(useConvBremFinder_) {
14  const std::string& mvaWeightFileConvBremBarrelLowPt =
15  conf.getParameter<std::string>("pf_convBremFinderID_mvaWeightFileBarrelLowPt");
16  const std::string mvaWeightFileConvBremBarrelHighPt =
17  conf.getParameter<std::string>("pf_convBremFinderID_mvaWeightFileBarrelHighPt");
18  const std::string mvaWeightFileConvBremEndcapsLowPt =
19  conf.getParameter<std::string>("pf_convBremFinderID_mvaWeightFileEndcapsLowPt");
20  const std::string mvaWeightFileConvBremEndcapsHighPt =
21  conf.getParameter<std::string>("pf_convBremFinderID_mvaWeightFileEndcapsHighPt");
22 
23  const std::string path_mvaWeightFileConvBremBarrelLowPt =
24  edm::FileInPath( mvaWeightFileConvBremBarrelLowPt.c_str() ).fullPath();
25  const std::string path_mvaWeightFileConvBremBarrelHighPt =
26  edm::FileInPath( mvaWeightFileConvBremBarrelHighPt.c_str() ).fullPath();
27  const std::string path_mvaWeightFileConvBremEndcapsLowPt =
28  edm::FileInPath( mvaWeightFileConvBremEndcapsLowPt.c_str() ).fullPath();
29  const std::string path_mvaWeightFileConvBremEndcapsHighPt =
30  edm::FileInPath( mvaWeightFileConvBremEndcapsHighPt.c_str() ).fullPath();
31 
32  gbrBarrelLowPt_ = setupMVA(path_mvaWeightFileConvBremBarrelLowPt);
33  gbrBarrelHighPt_ = setupMVA(path_mvaWeightFileConvBremBarrelHighPt);
34  gbrEndcapsLowPt_ = setupMVA(path_mvaWeightFileConvBremEndcapsLowPt);
35  gbrEndcapsHighPt_ = setupMVA(path_mvaWeightFileConvBremEndcapsHighPt);
36 
37  }
38  }
T getParameter(std::string const &) const
std::unique_ptr< const GBRForest > setupMVA(const std::string &)
std::unique_ptr< const GBRForest > gbrEndcapsHighPt_
std::unique_ptr< const GBRForest > gbrEndcapsLowPt_
std::unique_ptr< const GBRForest > gbrBarrelLowPt_
std::unique_ptr< const PFEnergyCalibration > pfcalib_
std::unique_ptr< const GBRForest > gbrBarrelHighPt_

Member Function Documentation

std::unique_ptr< const GBRForest > convbremhelpers::HeavyObjectCache::setupMVA ( const std::string &  weights)
private

Definition at line 40 of file ConvBremHeavyObjectCache.cc.

References detaBremKF, Epout, nHITS1, ptRatioGsfKF, matplotRender::reader, secR, sTIP, and groupFilesInBlocks::temp.

Referenced by HeavyObjectCache().

40  {
41  TMVA::Reader reader("!Color:Silent");
42  reader.AddVariable("kftrack_secR",&secR);
43  reader.AddVariable("kftrack_sTIP",&sTIP);
44  reader.AddVariable("kftrack_nHITS1",&nHITS1);
45  reader.AddVariable("kftrack_Epout",&Epout);
46  reader.AddVariable("kftrack_detaBremKF",&detaBremKF);
47  reader.AddVariable("kftrack_ptRatioGsfKF",&ptRatioGsfKF);
48  std::unique_ptr<TMVA::IMethod> temp( reader.BookMVA("BDT", weights.c_str()) );
49  return std::unique_ptr<const GBRForest>( new GBRForest( dynamic_cast<TMVA::MethodBDT*>( reader.FindMVA("BDT") ) ) );
50  }

Member Data Documentation

float convbremhelpers::HeavyObjectCache::detaBremKF
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().

float convbremhelpers::HeavyObjectCache::Epout
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().

std::unique_ptr<const GBRForest> convbremhelpers::HeavyObjectCache::gbrBarrelHighPt_
std::unique_ptr<const GBRForest> convbremhelpers::HeavyObjectCache::gbrBarrelLowPt_
std::unique_ptr<const GBRForest> convbremhelpers::HeavyObjectCache::gbrEndcapsHighPt_
std::unique_ptr<const GBRForest> convbremhelpers::HeavyObjectCache::gbrEndcapsLowPt_
float convbremhelpers::HeavyObjectCache::nHITS1
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().

std::unique_ptr<const PFEnergyCalibration> convbremhelpers::HeavyObjectCache::pfcalib_
float convbremhelpers::HeavyObjectCache::ptRatioGsfKF
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().

float convbremhelpers::HeavyObjectCache::secR
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().

float convbremhelpers::HeavyObjectCache::sTIP
private

Definition at line 21 of file ConvBremHeavyObjectCache.h.

Referenced by setupMVA().