91 if (energyRegressionType_ == 1)
93 else if (energyRegressionType_ == 2)
95 else if (energyRegressionType_ == 3)
97 else if (energyRegressionType_ == 4)
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();
169 recHits = pEBRecHits.
product();
171 recHits = pEERecHits.
product();
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 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_
#define DEFINE_FWK_MODULE(type)
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
bool getData(T &iHolder) 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_
const CaloGeometry * caloGeometry_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
std::string nameEnergyErrorReg_
std::string nameEnergyReg_
edm::EDGetTokenT< double > hRhoKt6PFJetsToken_
ElectronEnergyRegressionType
T const * product() const
T getParameter(std::string const &) const
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_