2 #include "Math/GenVector/VectorUtil.h"
15 using namespace l1extra;
19 tauTrigger(consumes<trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
InputTag>(
"L1TauTrigger"))),
20 mEt_Min(iConfig.getParameter<double>(
"EtMin")) {
21 produces<PFTauCollection>();
29 using namespace trigger;
30 using namespace l1extra;
45 vector<l1extra::L1JetParticleRef> tauCandRefVec;
46 vector<l1extra::L1JetParticleRef> jetCandRefVec;
52 for (
unsigned int iL1Tau = 0; iL1Tau < tauCandRefVec.size(); iL1Tau++) {
53 for (
unsigned int iJet = 0; iJet < tauJets->size(); iJet++) {
55 const PFTau& myJet = (*tauJets)[iJet];
62 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
65 tauL2jets->push_back(myPFTau);
72 for (
unsigned int iL1Tau = 0; iL1Tau < jetCandRefVec.size(); iL1Tau++) {
73 for (
unsigned int iJet = 0; iJet < tauJets->size(); iJet++) {
74 const PFTau& myJet = (*tauJets)[iJet];
83 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
86 tauL2jets->push_back(myPFTau);
102 ->setComment(
"Name of trigger filter");
104 ->setComment(
"Input collection of PFTaus");
105 desc.
add<
double>(
"EtMin", 0.0)->
setComment(
"Minimal pT of PFTau to match");
107 "This module produces collection of PFTaus matched to L1ExtraTaus/Jets passing a HLT filter (Only p4 and vertex "
108 "of returned PFTaus are set).");
109 descriptions.
add(
"L1HLTJetsMatching", desc);
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< PFTau > PFTauCollection
collection of PFTau objects
~L1HLTTauMatching() override
double pt() const final
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
L1HLTTauMatching(const edm::ParameterSet &)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tauTrigger
const edm::EDGetTokenT< reco::PFTauCollection > jetSrc
const CandidatePtr & leadChargedHadrCand() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNonnull() const
Checks for non-null.
void setComment(std::string const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
XYZPointD XYZPoint
point in space with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override