Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:01

0001 #ifndef RecoEgamma_EgammaTools_EgammaRegressionContainer_h
0002 #define RecoEgamma_EgammaTools_EgammaRegressionContainer_h
0003 
0004 //author: Sam Harper (RAL)
0005 //description:
0006 //  egamma energy regressions are binned in barrel/endcap and pt
0007 //  this simply contains the regression for each of (currently) 4 bins
0008 //  as well as the parameters to convert the raw BDT output back to
0009 //  the physical real value
0010 //  currently e/gamma also can optionally force saturated electrons
0011 //  to always be in the high et training
0012 
0013 #include "CondFormats/DataRecord/interface/GBRDWrapperRcd.h"
0014 #include "CondFormats/GBRForest/interface/GBRForestD.h"
0015 #include "RecoEgamma/EgammaTools/interface/EgammaBDTOutputTransformer.h"
0016 #include "FWCore/Utilities/interface/ESGetToken.h"
0017 
0018 #include <string>
0019 
0020 namespace edm {
0021   class ParameterSet;
0022   class ParameterSetDescription;
0023   class EventSetup;
0024   class ConsumesCollector;
0025 }  // namespace edm
0026 
0027 class EgammaRegressionContainer {
0028 public:
0029   EgammaRegressionContainer(const edm::ParameterSet& iConfig, edm::ConsumesCollector& cc);
0030   ~EgammaRegressionContainer() {}
0031 
0032   static edm::ParameterSetDescription makePSetDescription();
0033 
0034   void setEventContent(const edm::EventSetup& iSetup);
0035 
0036   float operator()(const float et, const bool isEB, const bool isSaturated, const float* data) const;
0037 
0038   bool useLowEtBin(const float et, const bool isSaturated) const;
0039 
0040 private:
0041   const EgammaBDTOutputTransformer outputTransformerLowEt_;
0042   const EgammaBDTOutputTransformer outputTransformerHighEt_;
0043 
0044   bool forceHighEnergyTrainingIfSaturated_;
0045   const float lowEtHighEtBoundary_;
0046 
0047   const edm::ESGetToken<GBRForestD, GBRDWrapperRcd> ebLowEtForestToken_;
0048   const edm::ESGetToken<GBRForestD, GBRDWrapperRcd> ebHighEtForestToken_;
0049   const edm::ESGetToken<GBRForestD, GBRDWrapperRcd> eeLowEtForestToken_;
0050   const edm::ESGetToken<GBRForestD, GBRDWrapperRcd> eeHighEtForestToken_;
0051 
0052   const GBRForestD* ebLowEtForest_ = nullptr;   //not owned
0053   const GBRForestD* ebHighEtForest_ = nullptr;  //not owned
0054   const GBRForestD* eeLowEtForest_ = nullptr;   //not owned
0055   const GBRForestD* eeHighEtForest_ = nullptr;  //not owned
0056 };
0057 
0058 #endif