130 std::vector<double> energyValues;
131 std::vector<double> energyErrorValues;
132 energyValues.reserve(egCollection->size());
133 energyErrorValues.reserve(egCollection->size());
152 for (reco::VertexCollection::const_iterator inV = inVertices.begin();
153 inV != inVertices.end(); ++inV) {
157 && inV->position().Rho() <= 2.0
158 && fabs(inV->z()) <= 24.0
170 rho = (*hRhoKt6PFJets);
173 for ( reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin();
174 egIter != egCandidates.end(); ++egIter) {
178 recHits = pEBRecHits.
product();
180 recHits = pEERecHits.
product();
194 energyValues.push_back(energy);
195 energyErrorValues.push_back(error);
199 energyFiller.
insert( egCollection, energyValues.begin(), energyValues.end() );
202 energyErrorFiller.
insert( egCollection, energyErrorValues.begin(), energyErrorValues.end() );
203 energyErrorFiller.
fill();
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ElectronEnergyRegressionEvaluate * regressionEvaluator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
uint32_t energyRegressionType_
void insert(const H &h, I begin, I end)
double calculateRegressionEnergy(const reco::GsfElectron *ele, SuperClusterHelper &mySCHelper, double rho, double nvertices, bool printDebug=false)
std::vector< Vertex > VertexCollection
collection of Vertex objects
bool isInitialized() const
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEEToken_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
#define DEFINE_FWK_MODULE(type)
ElectronRegressionEnergyProducer(const edm::ParameterSet &)
~ElectronRegressionEnergyProducer() override
bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::VertexCollection > hVertexToken_
const CaloGeometry * caloGeometry_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
std::string nameEnergyErrorReg_
std::string nameEnergyReg_
edm::EDGetTokenT< double > hRhoKt6PFJetsToken_
ElectronEnergyRegressionType
T const * product() const
std::string regressionInputFile_
double calculateRegressionEnergyUncertainty(const reco::GsfElectron *ele, SuperClusterHelper &mySCHelper, double rho, double nvertices, bool printDebug=false)
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
const CaloTopology * ecalTopology_