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 ];
const edm::ParameterSet _conf
edm::Handle< edm::ValueMap< float > > _full5x5E2x5MaxMap
T getParameter(std::string const &) const
edm::Handle< edm::ValueMap< float > > _phoWorstChargedIsolationMap
edm::Handle< edm::ValueMap< float > > _phoChargedIsolationMap
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E1x3MapToken
edm::Handle< edm::ValueMap< float > > _full5x5E5x5Map
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::Handle< edm::ValueMap< float > > _esEffSigmaRRMap
float mvaValue(const edm::Ptr< reco::Candidate > &particle)
edm::Handle< edm::ValueMap< float > > _full5x5E2x2Map
edm::EDGetTokenT< edm::ValueMap< float > > _phoWorstChargedIsolationToken
edm::EDGetTokenT< double > _rhoToken
edm::EDGetTokenT< edm::ValueMap< float > > _esEffSigmaRRMapToken
edm::Handle< edm::ValueMap< float > > _full5x5SigmaIEtaIPhiMap
edm::Handle< double > _rho
bool isEndcapCategory(int category)
void constrainMVAVariables()
PhotonMVAEstimatorRun2Spring15NonTrig(const edm::ParameterSet &conf)
void fillMVAVariables(const edm::Ptr< reco::Candidate > &particle)
bool isNull() const
Checks for null.
Abs< T >::type abs(const T &t)
void setConsumes(edm::ConsumesCollector &&) override
void getEventContent(const edm::Event &iEvent) override
edm::Handle< edm::ValueMap< float > > _full5x5E1x3Map
bool isEndcap(GeomDetEnumerators::SubDetector m)
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E2x5MaxMapToken
TMVA::Reader * createSingleReader(const int iCategory, const edm::FileInPath &weightFile)
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5SigmaIEtaIEtaMapToken
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5SigmaIEtaIPhiMapToken
edm::Handle< edm::ValueMap< float > > _full5x5SigmaIEtaIEtaMap
edm::EDGetTokenT< edm::ValueMap< float > > _phoChargedIsolationToken
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E5x5MapToken
~PhotonMVAEstimatorRun2Spring15NonTrig()
std::string fullPath() const
int findCategory(const edm::Ptr< reco::Candidate > &particle)
std::vector< std::unique_ptr< TMVA::Reader > > _tmvaReaders
edm::EDGetTokenT< edm::ValueMap< float > > _full5x5E2x2MapToken
edm::EDGetTokenT< edm::ValueMap< float > > _phoPhotonIsolationToken
edm::Handle< edm::ValueMap< float > > _phoPhotonIsolationMap