15 #include "TLorentzVector.h"
25 : inputJetTag_(iConfig.getParameter<edm::
InputTag>(
"inputJetTag")),
26 wideJetDeltaR_(iConfig.getParameter<double>(
"wideJetDeltaR")) {
29 produces<std::vector<math::PtEtaPhiMLorentzVector>>(
"widejets");
49 std::unique_ptr<std::vector<math::PtEtaPhiMLorentzVector>> widejets(
new std::vector<math::PtEtaPhiMLorentzVector>);
58 if (calojets_handle->size() >= 2) {
59 TLorentzVector wj1_tmp;
60 TLorentzVector wj2_tmp;
63 TLorentzVector wdijet;
74 TLorentzVector jet1, jet2;
76 reco::CaloJetCollection::const_iterator j1 = calojets_handle->begin();
77 reco::CaloJetCollection::const_iterator j2 = j1;
80 jet1.SetPtEtaPhiM(j1->pt(), j1->eta(), j1->phi(), j1->mass());
81 jet2.SetPtEtaPhiM(j2->pt(), j2->eta(), j2->phi(), j2->mass());
88 for (reco::CaloJetCollection::const_iterator it = calojets_handle->begin(); it != calojets_handle->end(); ++it) {
89 TLorentzVector currentJet;
90 currentJet.SetPtEtaPhiM(it->pt(), it->eta(), it->phi(), it->mass());
92 double DeltaR1 = currentJet.DeltaR(jet1);
93 double DeltaR2 = currentJet.DeltaR(jet2);
96 wj1_tmp += currentJet;
98 wj2_tmp += currentJet;
103 if (wj1_tmp.Pt() > wj2_tmp.Pt()) {
130 widejets->push_back(wj1math);
131 widejets->push_back(wj2math);
~DiJetVarProducer() override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::CaloJetCollection > inputJetTagToken_
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
edm::InputTag inputJetTag_
void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
DiJetVarProducer(const edm::ParameterSet &)