47 std::vector<std::string> mvaWeightFileEleID =
48 config.
getParameter<std::vector<std::string> >(
"HZZmvaWeightFile");
50 cfg.vweightsfiles = mvaWeightFileEleID;
53 std::unique_ptr<const ElectronMVAEstimator>
mvaID_;
63 static std::unique_ptr<gsfidhelper::HeavyObjectCache>
65 return std::make_unique<gsfidhelper::HeavyObjectCache>(conf);
102 thresholdIsoBarrel = iConfig.
getParameter<
double>(
"thresholdIsoDR03Barrel");
103 thresholdIsoEndcap = iConfig.
getParameter<
double>(
"thresholdIsoDR03Endcap");
105 produces<reco::GsfElectronCollection>();
127 auto mvaElectrons = std::make_unique<reco::GsfElectronCollection>();
130 iEvent.
getByToken(vertexToken, vertexCollection);
131 int nVtx = vertexCollection->size();
134 iEvent.
getByToken(electronToken,egCollection);
136 for ( reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin(); egIter != egCandidates.end(); ++egIter) {
137 double mvaVal = globalCache()->mvaID_->mva( *egIter, nVtx );
138 double isoDr03 = egIter->dr03TkSumPt() + egIter->dr03EcalRecHitSumEt() + egIter->dr03HcalTowerSumEt();
139 double eleEta = fabs(egIter->eta());
140 if (eleEta <= etaEBEE && mvaVal >
thresholdBarrel && isoDr03 < thresholdIsoBarrel) {
146 else if (eleEta > etaEBEE && mvaVal >
thresholdEndcap && isoDr03 < thresholdIsoEndcap) {
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static std::unique_ptr< gsfidhelper::HeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
std::vector< string > mvaWeightFileEleID
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static void globalEndJob(gsfidhelper::HeavyObjectCache const *)
string path_mvaWeightFileEleID
std::unique_ptr< const ElectronMVAEstimator > mvaID_
edm::EDGetTokenT< reco::VertexCollection > vertexToken
ElectronIdMVABased(const edm::ParameterSet &, const gsfidhelper::HeavyObjectCache *)
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken
T const * product() const
HeavyObjectCache(const edm::ParameterSet &config)
~ElectronIdMVABased() override
double thresholdIsoEndcap
double thresholdIsoBarrel