12 const std::vector <std::string> weightFileNames
13 = conf.
getParameter<std::vector<std::string> >(
"weightFileNames");
17 <<
"wrong number of weightfiles" << std::endl;
116 <<
"Failed to retrieve event content needed for this MVA"
118 <<
"Check python MVA configuration file and make sure all needed"
120 <<
"producers are running upstream" << std::endl;
133 const bool debug =
false;
135 printf(
"Printout of the photon variable inputs for MVA:\n");
168 <<
" given particle is expected to be reco::Photon or pat::Photon," << std::endl
169 <<
" but appears to be neither" << std::endl;
171 float eta = phoRecoPtr->superCluster()->eta();
177 const float ebeeSplit = 1.479;
207 TMVA::Reader *tmpTMVAReader =
new TMVA::Reader(
"!Color:Silent:Error" );
249 return tmpTMVAReader;
260 <<
" given particle is expected to be reco::Photon or pat::Photon," << std::endl
261 <<
" but appears to be neither" << std::endl;
264 auto superCluster = phoRecoPtr->superCluster();
267 float e1x3 = (*_full5x5E1x3Map )[ phoRecoPtr ];
268 float e2x2 = (*_full5x5E2x2Map )[ phoRecoPtr ];
269 float e2x5 = (*_full5x5E2x5MaxMap)[ phoRecoPtr ];
270 float e5x5 = (*_full5x5E5x5Map )[ phoRecoPtr ];
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E5x5MapToken
const edm::ParameterSet _conf
T getParameter(std::string const &) const
edm::Handle< edm::ValueMap< float > > _phoChargedIsolationMap
edm::EDGetTokenT< double > _rhoToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::Handle< edm::ValueMap< float > > _esEffSigmaRRMap
float mvaValue(const edm::Ptr< reco::Candidate > &particle)
void fillMVAVariables(const edm::Ptr< reco::Candidate > &particle)
int findCategory(const edm::Ptr< reco::Candidate > &particle)
edm::Handle< edm::ValueMap< float > > _full5x5E5x5Map
edm::EDGetTokenT< edm::ValueMap< float > > _phoChargedIsolationToken
edm::EDGetTokenT< edm::ValueMap< float > > _phoWorstChargedIsolationToken
TMVA::Reader * createSingleReader(const int iCategory, const edm::FileInPath &weightFile)
edm::EDGetTokenT< edm::ValueMap< float > > _esEffSigmaRRMapToken
void getEventContent(const edm::Event &iEvent) override
bool isNull() const
Checks for null.
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5SigmaIEtaIPhiMapToken
Abs< T >::type abs(const T &t)
edm::Handle< edm::ValueMap< float > > _full5x5SigmaIEtaIPhiMap
void constrainMVAVariables()
edm::Handle< edm::ValueMap< float > > _phoPhotonIsolationMap
bool isEndcap(GeomDetEnumerators::SubDetector m)
edm::Handle< edm::ValueMap< float > > _full5x5E2x2Map
edm::Handle< edm::ValueMap< float > > _phoWorstChargedIsolationMap
edm::Handle< edm::ValueMap< float > > _full5x5SigmaIEtaIEtaMap
PhotonMVAEstimatorRun2Phys14NonTrig(const edm::ParameterSet &conf)
edm::Handle< edm::ValueMap< float > > _full5x5E1x3Map
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5SigmaIEtaIEtaMapToken
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E2x5MaxMapToken
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E1x3MapToken
edm::Handle< edm::ValueMap< float > > _full5x5E2x5MaxMap
std::vector< std::unique_ptr< TMVA::Reader > > _tmvaReaders
~PhotonMVAEstimatorRun2Phys14NonTrig()
bool isEndcapCategory(int category)
void setConsumes(edm::ConsumesCollector &&) override
std::string fullPath() const
edm::EDGetTokenT< edm::ValueMap< float > > _phoPhotonIsolationToken
edm::Handle< double > _rho
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E2x2MapToken