128 std::vector<double> energyValues;
129 std::vector<double> energyErrorValues;
130 energyValues.reserve(egCollection->size());
131 energyErrorValues.reserve(egCollection->size());
150 for (reco::VertexCollection::const_iterator inV = inVertices.begin(); inV != inVertices.end(); ++inV) {
152 if (inV->ndof() >= 4 && inV->position().Rho() <= 2.0 && fabs(inV->z()) <= 24.0) {
163 rho = (*hRhoKt6PFJets);
165 for (reco::GsfElectronCollection::const_iterator egIter = egCandidates.begin(); egIter != egCandidates.end();
180 energyValues.push_back(
energy);
181 energyErrorValues.push_back(
error);
184 energyFiller.
insert(egCollection, energyValues.begin(), energyValues.end());
187 energyErrorFiller.
insert(egCollection, energyErrorValues.begin(), energyErrorValues.end());
188 energyErrorFiller.
fill();
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
ElectronEnergyRegressionEvaluate * regressionEvaluator
uint32_t energyRegressionType_
T const * product() const
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
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEEToken_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< CaloTopology, CaloTopologyRecord > ecalTopoToken_
ElectronRegressionEnergyProducer(const edm::ParameterSet &)
~ElectronRegressionEnergyProducer() override
bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::VertexCollection > hVertexToken_
void initialize(std::string weightsFile, ElectronEnergyRegressionEvaluate::ElectronEnergyRegressionType type)
#define DEFINE_FWK_MODULE(type)
const CaloGeometry * caloGeometry_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
std::string nameEnergyErrorReg_
std::string nameEnergyReg_
bool isInitialized() const
edm::EDGetTokenT< double > hRhoKt6PFJetsToken_
ElectronEnergyRegressionType
std::string regressionInputFile_
double calculateRegressionEnergyUncertainty(const reco::GsfElectron *ele, SuperClusterHelper &mySCHelper, double rho, double nvertices, bool printDebug=false)
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
const CaloTopology * ecalTopology_