16 #include "TLorentzVector.h"
25 inputJetTag_ (iConfig.getParameter<edm::InputTag>(
"inputJetTag")),
26 wideJetDeltaR_ (iConfig.getParameter<double>(
"wideJetDeltaR"))
30 produces<std::vector<math::PtEtaPhiMLorentzVector> >(
"widejets");
50 std::auto_ptr<std::vector<math::PtEtaPhiMLorentzVector> > widejets(
new std::vector<math::PtEtaPhiMLorentzVector>);
59 if( calojets_handle->size() >=2 )
61 TLorentzVector wj1_tmp;
62 TLorentzVector wj2_tmp;
65 TLorentzVector wdijet;
74 TLorentzVector jet1, jet2;
76 reco::CaloJetCollection::const_iterator j1 = calojets_handle->begin();
77 reco::CaloJetCollection::const_iterator j2 = j1; ++j2;
79 jet1.SetPtEtaPhiM(j1->pt(),j1->eta(),j1->phi(),j1->mass());
80 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)
88 TLorentzVector currentJet;
89 currentJet.SetPtEtaPhiM(it->pt(),it->eta(),it->phi(),it->mass());
91 double DeltaR1 = currentJet.DeltaR(jet1);
92 double DeltaR2 = currentJet.DeltaR(jet2);
95 wj1_tmp += currentJet;
97 wj2_tmp += currentJet;
102 if( wj1_tmp.Pt() > wj2_tmp.Pt() )
130 widejets->push_back( wj1math );
131 widejets->push_back( wj2math );
143 iEvent.
put(widejets,
"widejets");
#define DEFINE_FWK_MODULE(type)
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag inputJetTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
DiJetVarProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)