1 #ifndef __PFClusterTimeAssigner__
2 #define __PFClusterTimeAssigner__
26 timesTok_ = consumes<edm::ValueMap<float> >(times);
31 produces<reco::PFClusterCollection>();
46 auto clusters_out = std::make_unique<reco::PFClusterCollection>();
55 auto const& times = *timesH;
56 auto const& timeResos = *timeResosH;
58 clusters_out->reserve(
clusters.size());
62 auto&
out = *clusters_out;
63 for (
unsigned i = 0;
i <
out.size(); ++
i) {
65 const float time = times[clusterRef];
66 const float timeReso = timeResos[clusterRef];
67 out[
i].setTime(time, timeReso);
78 descriptions.
add(
"particleFlowClusterTimeAssignerDefault", desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PFClusterTimeAssigner(const edm::ParameterSet &conf)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< edm::ValueMap< float > > timesTok_
void produce(edm::Event &e, const edm::EventSetup &es) override
edm::EDGetTokenT< edm::ValueMap< float > > timeResosTok_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::PFClusterCollection > clustersTok_