46 const std::unique_ptr<const ElectronMVAEstimator>
mvaID_;
53 thresholdBarrel(iConfig.getParameter<double>(
"thresholdBarrel")),
54 thresholdEndcap(iConfig.getParameter<double>(
"thresholdEndcap")),
55 thresholdIsoBarrel(iConfig.getParameter<double>(
"thresholdIsoDR03Barrel")),
56 thresholdIsoEndcap(iConfig.getParameter<double>(
"thresholdIsoDR03Endcap")),
58 .vweightsfiles = iConfig.
getParameter<std::vector<std::string> >(
"HZZmvaWeightFile")})) {
59 produces<reco::GsfElectronCollection>();
64 constexpr
double etaEBEE = 1.485;
66 auto mvaElectrons = std::make_unique<reco::GsfElectronCollection>();
70 int nVtx = vertexCollection->size();
75 for (reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin(); egIter != egCandidates.end();
77 double mvaVal =
mvaID_->mva(*egIter, nVtx);
78 double isoDr03 = egIter->dr03TkSumPt() + egIter->dr03EcalRecHitSumEt() + egIter->dr03HcalTowerSumEt();
79 double eleEta = fabs(egIter->eta());
const std::string path_mvaWeightFileEleID
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const std::vector< std::string > mvaWeightFileEleID
const std::unique_ptr< const ElectronMVAEstimator > mvaID_
const double thresholdIsoBarrel
std::vector< Vertex > VertexCollection
const double thresholdIsoEndcap
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
const edm::EDGetTokenT< reco::VertexCollection > vertexToken
const double thresholdBarrel
const double thresholdEndcap
T const * product() const
const edm::EDGetTokenT< reco::GsfElectronCollection > electronToken
T getParameter(std::string const &) const
~ElectronIdMVABased() override
ElectronIdMVABased(const edm::ParameterSet &)