2 #include "Math/GenVector/VectorUtil.h" 21 tauTrigger(consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
InputTag>(
"L1TauTrigger"))),
22 mEt_Min(iConfig.getParameter<double>(
"EtMin")) {
23 produces<PFTauCollection>();
44 vector<l1extra::L1JetParticleRef> tauCandRefVec;
45 vector<l1extra::L1JetParticleRef> jetCandRefVec;
51 for (
unsigned int iL1Tau = 0; iL1Tau < tauCandRefVec.size(); iL1Tau++) {
52 for (
unsigned int iJet = 0; iJet < tauJets->size(); iJet++) {
54 const PFTau& myJet = (*tauJets)[iJet];
55 double deltaR2 = ROOT::Math::VectorUtil::DeltaR2(myJet.
p4().Vect(), (tauCandRefVec[iL1Tau]->p4()).Vect());
61 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
64 tauL2jets->push_back(myPFTau);
71 for (
unsigned int iL1Tau = 0; iL1Tau < jetCandRefVec.size(); iL1Tau++) {
72 for (
unsigned int iJet = 0; iJet < tauJets->size(); iJet++) {
73 const PFTau& myJet = (*tauJets)[iJet];
75 double deltaR2 = ROOT::Math::VectorUtil::DeltaR2(myJet.
p4().Vect(), (jetCandRefVec[iL1Tau]->p4()).Vect());
82 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
85 tauL2jets->push_back(myPFTau);
99 ->setComment(
"Name of trigger filter");
101 ->setComment(
"Input collection of PFTaus");
102 desc.add<
double>(
"EtMin", 0.0)->setComment(
"Minimal pT of PFTau to match");
104 "This module produces collection of PFTaus matched to L1ExtraTaus/Jets passing a HLT filter (Only p4 and vertex " 105 "of returned PFTaus are set).");
106 descriptions.
add(
"L1HLTJetsMatching",
desc);
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< PFTau > PFTauCollection
collection of PFTau objects
double pt() const final
transverse momentum
const CandidatePtr & leadChargedHadrCand() const
const LorentzVector & p4() const final
four-momentum Lorentz vector
L1HLTTauMatching(const edm::ParameterSet &)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tauTrigger
const edm::EDGetTokenT< reco::PFTauCollection > jetSrc
bool isNonnull() const
Checks for non-null.
virtual const Point & vertex() const =0
vertex position
#define DEFINE_FWK_MODULE(type)
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