2 #include "Math/GenVector/VectorUtil.h"
13 using namespace l1extra;
23 produces<CaloJetCollection>();
34 using namespace trigger;
35 using namespace l1extra;
43 myL2L1JetsMap.clear();
45 for( vtag::const_iterator
s =
jetSrc.begin();
s !=
jetSrc.end(); ++
s ) {
48 CaloJetCollection::const_iterator iTau = tauJets->begin();
49 if(iTau != tauJets->end()){
51 myL2L1JetsMap.insert(std::pair<int, const CaloJet>(iL1Jet, *(iTau)));
60 double matchingR = 0.01;
77 for(
unsigned int i=0;
i<myL1Tau.size();
i++)
79 myL1Obj.push_back(myL1Tau[
i]);
81 for(
unsigned int j=0;
j<myL1Jet.size();
j++)
83 myL1Obj.push_back(myL1Jet[
j]);
88 if(iEvent.
getByLabel(tauTrigger,l1TriggeredTaus)){
91 tauCandRefVec.
clear();
92 jetCandRefVec.clear();
97 for(
unsigned int iL1Tau=0; iL1Tau <tauCandRefVec.size();iL1Tau++)
99 for(
unsigned int iJet=0;iJet<myL1Obj.size();iJet++)
102 std::map<int, const reco::CaloJet>::const_iterator myL2itr = myL2L1JetsMap.find(iJet);
103 if(myL2itr!=myL2L1JetsMap.end()){
105 if(&tauCandRefVec[iL1Tau])
106 deltaR = ROOT::Math::VectorUtil::DeltaR(myL1Obj[iJet].
p4().Vect(), (tauCandRefVec[iL1Tau]->
p4()).Vect());
109 const CaloJet myL2TauJet = myL2itr->second;
110 if(myL2TauJet.
pt() > mEt_Min) tauL2jets->push_back(myL2TauJet);
111 myL2L1JetsMap.erase(myL2itr->first);
120 for(
unsigned int iL1Tau=0; iL1Tau <jetCandRefVec.size();iL1Tau++)
122 for(
unsigned int iJet=0;iJet<myL1Obj.size();iJet++)
125 std::map<int, const reco::CaloJet>::const_iterator myL2itr = myL2L1JetsMap.find(iJet);
126 if(myL2itr!=myL2L1JetsMap.end()){
128 if(&jetCandRefVec[iL1Tau])
129 deltaR = ROOT::Math::VectorUtil::DeltaR(myL1Obj[iJet].
p4().Vect(), (jetCandRefVec[iL1Tau]->
p4()).Vect());
132 const CaloJet myL2TauJet = myL2itr->second;
134 if(myL2TauJet.
pt() > mEt_Min) tauL2jets->push_back(myL2TauJet);
135 myL2L1JetsMap.erase(myL2itr->first);
147 iEvent.
put(tauL2jets);
T getParameter(std::string const &) const
Jets made from CaloTowers.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
L2TauJetsProvider(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &) override
virtual float pt() const GCC11_FINAL
transverse momentum
std::vector< edm::InputTag > vtag
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects