66 eventrhoToken_ = consumes<double>(
edm::InputTag(
"kt6PFJets",
"rho"));
67 reducedEBRecHitCollectionToken_ = consumes<EcalRecHitCollection>(iConfig.
getParameter<
edm::InputTag>(
"reducedEBRecHitCollection"));
68 reducedEERecHitCollectionToken_ = consumes<EcalRecHitCollection>(iConfig.
getParameter<
edm::InputTag>(
"reducedEERecHitCollection"));
70 std::vector<string> fpMvaWeightFiles = iConfig.
getParameter<std::vector<std::string> >(
"mvaWeightFile");
74 produces<edm::ValueMap<float> >(
"");
85 bool manualCat_ =
true;
87 string path_mvaWeightFileEleID;
90 mvaWeightFiles_.push_back(path_mvaWeightFileEleID);
93 mvaID_->initialize(method_, type_, manualCat_, mvaWeightFiles_);
121 const Vertex *pv = &dummy;
126 e(0, 0) = 0.0015 * 0.0015;
127 e(1, 1) = 0.0015 * 0.0015;
130 dummy =
Vertex(p, e, 0, 0, 0);
133 EcalClusterLazyTools lazyTools(iEvent, iSetup, reducedEBRecHitCollectionToken_, reducedEERecHitCollectionToken_);
140 iEvent.
getByToken(electronToken_,egCollection);
148 std::vector<float>
values;
149 values.reserve(egCollection->size());
151 for ( reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin(); egIter != egCandidates.end(); ++egIter) {
153 double mvaVal = -999999;
155 mvaVal = mvaID_->mvaValue( *egIter, *pv,thebuilder,lazyTools, verbose_);
158 mvaVal = mvaID_->mvaValue( *egIter, *pv, _Rho,lazyTools, verbose_);
161 values.push_back( mvaVal );
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
vector< string > mvaWeightFiles_
edm::EDGetTokenT< double > eventrhoToken_
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
virtual bool filter(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
ElectronIdMVAProducer(const edm::ParameterSet &)
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
std::string fullPath() const
EGammaMvaEleEstimator * mvaID_