64 verbose_ =
iConfig.getUntrackedParameter<
bool>(
"verbose",
false);
65 vertexToken_ = consumes<reco::VertexCollection>(
iConfig.getParameter<
edm::InputTag>(
"vertexTag"));
66 electronToken_ = consumes<reco::GsfElectronCollection>(
iConfig.getParameter<
edm::InputTag>(
"electronTag"));
67 eventrhoToken_ = consumes<double>(
edm::InputTag(
"kt6PFJets",
"rho"));
68 reducedEBRecHitCollectionToken_ =
69 consumes<EcalRecHitCollection>(
iConfig.getParameter<
edm::InputTag>(
"reducedEBRecHitCollection"));
70 reducedEERecHitCollectionToken_ =
71 consumes<EcalRecHitCollection>(
iConfig.getParameter<
edm::InputTag>(
"reducedEERecHitCollection"));
73 std::vector<std::string> fpMvaWeightFiles =
iConfig.getParameter<std::vector<std::string> >(
"mvaWeightFile");
74 Trig_ =
iConfig.getParameter<
bool>(
"Trig");
75 NoIP_ =
iConfig.getParameter<
bool>(
"NoIP");
79 produces<edm::ValueMap<float> >(
"");
84 if (Trig_ && !NoIP_) {
96 bool manualCat_ =
true;
101 mvaWeightFiles_.push_back(path_mvaWeightFileEleID);
104 mvaID_->initialize(method_, type_, manualCat_, mvaWeightFiles_);
125 if (!vertexCollection->empty()) {
126 pv = &*vertexCollection->begin();
129 e(0, 0) = 0.0015 * 0.0015;
130 e(1, 1) = 0.0015 * 0.0015;
151 std::vector<float>
values;
152 values.reserve(egCollection->size());
154 for (reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin(); egIter != egCandidates.end();
156 double mvaVal = -999999;
158 mvaVal = mvaID_->mvaValue(*egIter, *pv, thebuilder, lazyTools,
verbose_);
161 mvaVal = mvaID_->mvaValue(*egIter, *pv,
_Rho, lazyTools,
verbose_);
164 values.push_back(mvaVal);
168 filler.
insert(egCollection, values.begin(), values.end());
edm::EDGetTokenT< double > eventrhoToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttrackbuilderToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< EcalRecHitCollection > reducedEBRecHitCollectionToken_
void insert(const H &h, I begin, I end)
math::Error< dimension >::type Error
covariance error matrix (3x3)
edm::EDGetTokenT< EcalRecHitCollection > reducedEERecHitCollectionToken_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
bool filter(edm::Event &, const edm::EventSetup &) override
bool getData(T &iHolder) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
math::XYZPoint Point
point in the space
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
std::vector< std::string > mvaWeightFiles_
ElectronIdMVAProducer(const edm::ParameterSet &)
T const * product() const
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
std::string fullPath() const
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
~ElectronIdMVAProducer() override
EGammaMvaEleEstimator * mvaID_