2 #include "Math/GenVector/VectorUtil.h"
10 using namespace reco ;
13 using namespace trigger;
18 mEt_Min ( iConfig.getParameter<double> (
"EtMin" ) )
20 produces<PFTauCollection>();
30 double matchingR = 0.5;
44 for(
unsigned int iL1Tau = 0; iL1Tau < tauCandRefVec.size(); iL1Tau++){
45 for(
unsigned int iJet = 0; iJet < tauJets->size(); iJet++){
47 const PFTau & myJet = (*tauJets)[iJet];
49 if(deltaR < matchingR ) {
53 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
55 tauL2jets->push_back(myPFTau);
62 iEvent.
put(tauL2jets);
70 desc.
add<
double> (
"EtMin",0.0)->
setComment(
"Minimal pT of PFTau to match");
71 descriptions.
setComment(
"This module produces collection of PFTaus matched to L1 Taus / Jets passing a HLT filter (Only p4 and vertex of returned PFTaus are set).");
72 descriptions.
add (
"L1THLTTauMatching",desc);
const edm::EDGetTokenT< reco::PFTauCollection > jetSrc
L1THLTTauMatching(const edm::ParameterSet &)
void setComment(std::string const &value)
std::vector< PFTau > PFTauCollection
collection of PFTau objects
const PFCandidatePtr & leadPFChargedHadrCand() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tauTrigger
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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)
XYZPointD XYZPoint
point in space with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
std::vector< TauRef > TauVectorRef
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
virtual double pt() const final
transverse momentum