15 #include "TLorentzVector.h" 25 : inputJetTag_(iConfig.getParameter<
edm::
InputTag>(
"inputJetTag")),
26 wideJetDeltaR_(iConfig.getParameter<double>(
"wideJetDeltaR")) {
29 produces<std::vector<math::PtEtaPhiMLorentzVector>>(
"widejets");
47 std::unique_ptr<std::vector<math::PtEtaPhiMLorentzVector>> widejets(
new std::vector<math::PtEtaPhiMLorentzVector>);
56 if (calojets_handle->size() >= 2) {
57 TLorentzVector wj1_tmp;
58 TLorentzVector wj2_tmp;
61 TLorentzVector wdijet;
72 TLorentzVector jet1, jet2;
74 reco::CaloJetCollection::const_iterator j1 = calojets_handle->begin();
75 reco::CaloJetCollection::const_iterator j2 = j1;
78 jet1.SetPtEtaPhiM(j1->pt(), j1->eta(), j1->phi(), j1->mass());
79 jet2.SetPtEtaPhiM(j2->pt(), j2->eta(), j2->phi(), j2->mass());
86 for (reco::CaloJetCollection::const_iterator
it = calojets_handle->begin();
it != calojets_handle->end(); ++
it) {
87 TLorentzVector currentJet;
88 currentJet.SetPtEtaPhiM(
it->pt(),
it->eta(),
it->phi(),
it->mass());
90 double DeltaR1 = currentJet.DeltaR(jet1);
91 double DeltaR2 = currentJet.DeltaR(jet2);
94 wj1_tmp += currentJet;
96 wj2_tmp += currentJet;
101 if (wj1_tmp.Pt() > wj2_tmp.Pt()) {
128 widejets->push_back(wj1math);
129 widejets->push_back(wj2math);
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::CaloJetCollection > inputJetTagToken_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
edm::InputTag inputJetTag_
#define DEFINE_FWK_MODULE(type)
DiJetVarProducer(const edm::ParameterSet &)