2 #include "Math/GenVector/VectorUtil.h"
12 : tauSrc_(consumes<trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<edm::
InputTag>(
"TauSrc"))),
14 matchingR2_(iConfig.getParameter<double>(
"Min_dR") * iConfig.getParameter<double>(
"Min_dR")) {
15 produces<reco::PFJetCollection>();
31 if (PFJets->size() > 1) {
32 for (
unsigned int iJet = 0; iJet < PFJets->size(); iJet++) {
35 for (
unsigned int iTau = 0; iTau < taus.size(); iTau++) {
41 if (isMatched ==
false)
42 cleanedPFJets->push_back(myPFJet);
52 ->setComment(
"Input collection of PFTaus that have passed ID and isolation requirements");
53 desc.
add<
double>(
"Min_dR", 0.5)->
setComment(
"Minimum dR outside of which PFJets will be saved");
55 "This module produces a collection of PFJets that are cross-cleaned with respect to PFTaus passing a HLT "
57 descriptions.
add(
"PFJetsTauOverlapRemoval", desc);
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PFJetsTauOverlapRemoval(const edm::ParameterSet &)
Jets made from PFObjects.
const LorentzVector & p4() const final
four-momentum Lorentz vector
const edm::EDGetTokenT< reco::PFJetCollection > pfJetSrc_
~PFJetsTauOverlapRemoval() override
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
bool isMatched(TrackingRecHit const &hit)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tauSrc_
std::vector< reco::PFTauRef > VRpftau
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)