2 #include "Math/GenVector/VectorUtil.h" 19 tauTrigger( consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
InputTag>(
"L1TauTrigger") ) ),
20 mEt_Min( iConfig.getParameter<double>(
"EtMin") )
22 produces<PFTauCollection>();
38 double matchingR = 0.5;
48 vector<l1extra::L1JetParticleRef> tauCandRefVec;
49 vector<l1extra::L1JetParticleRef> jetCandRefVec;
55 for(
unsigned int iL1Tau=0; iL1Tau <tauCandRefVec.size();iL1Tau++)
57 for(
unsigned int iJet=0;iJet<tauJets->size();iJet++)
60 const PFTau & myJet = (*tauJets)[iJet];
62 if(deltaR < matchingR ) {
67 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
70 tauL2jets->push_back(myPFTau);
77 for(
unsigned int iL1Tau=0; iL1Tau <jetCandRefVec.size();iL1Tau++)
79 for(
unsigned int iJet=0;iJet<tauJets->size();iJet++)
81 const PFTau & myJet = (*tauJets)[iJet];
84 if(deltaR < matchingR ) {
90 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
93 tauL2jets->push_back(myPFTau);
112 desc.
add<
double>(
"EtMin",0.0)->
setComment(
"Minimal pT of PFTau to match");
113 descriptions.
setComment(
"This module produces collection of PFTaus matched to L1ExtraTaus/Jets passing a HLT filter (Only p4 and vertex of returned PFTaus are set).");
114 descriptions.
add(
"L1HLTJetsMatching",desc);
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< PFTau > PFTauCollection
collection of PFTau objects
~L1HLTTauMatching() override
const PFCandidatePtr & leadPFChargedHadrCand() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double pt() const final
transverse momentum
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
L1HLTTauMatching(const edm::ParameterSet &)
const Point & vertex() const override
vertex position (overwritten by PF...)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tauTrigger
const edm::EDGetTokenT< reco::PFTauCollection > jetSrc
const LorentzVector & p4() const final
four-momentum Lorentz vector
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNonnull() const
Checks for non-null.
double deltaR(double eta1, double eta2, double phi1, double phi2)
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)