2 #include "Math/GenVector/VectorUtil.h"
15 using namespace l1extra;
20 tauTrigger = consumes<trigger::TriggerFilterObjectWithRefs>(iConfig.
getParameter<
InputTag>(
"L1TauTrigger") );
23 produces<PFTauCollection>();
33 using namespace trigger;
34 using namespace l1extra;
39 double matchingR = 0.5;
50 tauCandRefVec.clear();
51 jetCandRefVec.clear();
58 for(
unsigned int iL1Tau=0; iL1Tau <tauCandRefVec.size();iL1Tau++)
60 for(
unsigned int iJet=0;iJet<tauJets->size();iJet++)
63 const PFTau & myJet = (*tauJets)[iJet];
64 deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.
p4().Vect(), (tauCandRefVec[iL1Tau]->p4()).Vect());
70 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
71 if(myJet.
pt() > mEt_Min) {
73 tauL2jets->push_back(myPFTau);
80 for(
unsigned int iL1Tau=0; iL1Tau <jetCandRefVec.size();iL1Tau++)
82 for(
unsigned int iJet=0;iJet<tauJets->size();iJet++)
84 const PFTau & myJet = (*tauJets)[iJet];
86 deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.
p4().Vect(), (jetCandRefVec[iL1Tau]->p4()).Vect());
93 PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(), myJet.
p4(),
a);
94 if(myJet.
pt() > mEt_Min) {
96 tauL2jets->push_back(myPFTau);
106 iEvent.
put(tauL2jets);
T getParameter(std::string const &) const
std::vector< PFTau > PFTauCollection
collection of PFTau objects
const PFCandidatePtr & leadPFChargedHadrCand() const
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double deltaR(const T1 &t1, const T2 &t2)
L1HLTTauMatching(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual void produce(edm::Event &, const edm::EventSetup &) override
virtual const LorentzVector & p4() const
four-momentum Lorentz vector