93 template<
typename HandleType,
typename ValType>
97 auto valMap = std::make_unique<edm::ValueMap<ValType> >();
99 filler.insert(objHandle,vals.begin(),vals.end());
138 desc.
add<
double>(
"minEtToCalibrate",5.0);
139 desc.
add<
bool>(
"produceCalibratedObjs",
true);
140 desc.
add<
bool>(
"semiDeterministic",
true);
141 desc.
add<
bool>(
"useSmearCorrEcalEnergyErrInComb",
false);
142 std::vector<std::string> valMapsProduced;
144 desc.
add<std::vector<std::string> >(
"valueMapsStored",valMapsProduced)->setComment(
"provides to python configs the list of valuemaps stored, can not be overriden in the python config");
164 std::unique_ptr<std::vector<T>>
out = std::make_unique<std::vector<T>>();
166 size_t nrObj = inHandle->size();
168 for(
auto&
res : results)
res.reserve(nrObj);
174 for (
const auto& ele : *inHandle) {
183 results[
index].push_back(uncertainties[
index]);
187 auto fillAndStore = [&](
auto handle){
196 fillAndStore(inHandle);
204 if(obj.superCluster().isNonnull()){
T getParameter(std::string const &) const
std::string defaultModuleLabel()
CalibratedElectronProducerT(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~CalibratedElectronProducerT() override
void setUseSmearCorrEcalEnergyErrInComb(bool val)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static const std::string & name(size_t index)
#define DEFINE_FWK_MODULE(type)
ElectronEnergyCalibrator energyCorrector_
void initPrivateRng(TRandom *rnd)
bool produceCalibratedObjs_
void calibrate(SimpleElectron &electron, edm::StreamID const &)
EpCombinationTool epCombinationTool_
edm::EDGetTokenT< edm::View< T > > electronToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr size_t kNrSysErrs
uint32_t getRandomSeedFromObj(const edm::Event &iEvent, const T &obj, size_t nrObjs, size_t objNr)
void produce(edm::Event &, const edm::EventSetup &) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setSemiDetRandomSeed(const edm::Event &iEvent, const T &obj, size_t nrObjs, size_t objNr)
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< TRandom > semiDeterministicRng_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEEToken_
uint32_t getRandomSeedFromSC(const edm::Event &iEvent, const reco::SuperClusterRef scRef)
static const std::vector< int > valMapsToStore_
StreamID streamID() const