16 #include <unordered_set>
43 ptMin_(iConfig.getParameter<double>(
"correctedPtMin")) {
44 produces<reco::TrackRefVector>();
52 desc.
add<
double>(
"correctedPtMin", 0);
53 descriptions.
add(
"jetTracksAssociationToTrackRefs", desc);
69 auto ret = std::make_unique<reco::TrackRefVector>();
70 std::unordered_set<reco::TrackRefVector::key_type> alreadyAdded;
74 for (
size_t i = 0;
i < jets.
size(); ++
i) {
96 for (
const auto& trackRef : association[jetRef]) {
97 if (alreadyAdded.find(trackRef.key()) == alreadyAdded.end()) {
98 ret->push_back(trackRef);
99 alreadyAdded.insert(trackRef.key());
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
tuple ret
prodAgent to be discontinued
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Base class for all types of Jets.
bool refRequired() const
if correction needs the jet reference
double correction(const LorentzVector &fJet) const
get correction using Jet information only
JetTracksAssociationToTrackRefs(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< reco::JetCorrector > correctorToken_
const LorentzVector & p4() const final
four-momentum Lorentz vector
RefToBase< value_type > refAt(size_type i) const
ptMin_(conf.getParameter< double >("ptMin"))
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::JetTracksAssociation::Container > associationToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Association between jets and float value.
bool vectorialCorrection() const
if vectorial correction is provided
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::AssociationVector< reco::JetRefBaseProd, Values > Container