16 #include <unordered_set>
43 ptMin_(iConfig.getParameter<double>(
"correctedPtMin"))
45 produces<reco::TrackRefVector> ();
53 desc.
add<
double>(
"correctedPtMin", 0);
54 descriptions.
add(
"jetTracksAssociationToTrackRefs", desc);
70 auto ret = std::make_unique<reco::TrackRefVector>();
71 std::unordered_set<reco::TrackRefVector::key_type> alreadyAdded;
75 for(
size_t i=0;
i<jets.
size(); ++
i) {
99 for(
const auto& trackRef: association[jetRef]) {
100 if(alreadyAdded.find(trackRef.key()) == alreadyAdded.end()) {
101 ret->push_back(trackRef);
102 alreadyAdded.insert(trackRef.key());
107 iEvent.
put(std::move(
ret));
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
virtual void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
EcalChannelStatus Container
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_
RefToBase< value_type > refAt(size_type i) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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)
virtual const LorentzVector & p4() const
four-momentum Lorentz vector