16 #include "TLorentzVector.h"
25 inputJetTag_ (iConfig.getParameter<edm::InputTag>(
"inputJetTag")),
26 wideJetDeltaR_ (iConfig.getParameter<double>(
"wideJetDeltaR"))
30 produces<std::vector<math::PtEtaPhiMLorentzVector> >(
"widejets");
53 std::auto_ptr<std::vector<math::PtEtaPhiMLorentzVector> > widejets(
new std::vector<math::PtEtaPhiMLorentzVector>);
62 if( calojets_handle->size() >=2 )
64 TLorentzVector wj1_tmp;
65 TLorentzVector wj2_tmp;
68 TLorentzVector wdijet;
77 TLorentzVector jet1, jet2;
79 reco::CaloJetCollection::const_iterator j1 = calojets_handle->begin();
80 reco::CaloJetCollection::const_iterator j2 = j1; ++j2;
82 jet1.SetPtEtaPhiM(j1->pt(),j1->eta(),j1->phi(),j1->mass());
83 jet2.SetPtEtaPhiM(j2->pt(),j2->eta(),j2->phi(),j2->mass());
89 for(reco::CaloJetCollection::const_iterator it = calojets_handle->begin(); it != calojets_handle->end(); ++it)
91 TLorentzVector currentJet;
92 currentJet.SetPtEtaPhiM(it->pt(),it->eta(),it->phi(),it->mass());
94 double DeltaR1 = currentJet.DeltaR(jet1);
95 double DeltaR2 = currentJet.DeltaR(jet2);
98 wj1_tmp += currentJet;
100 wj2_tmp += currentJet;
105 if( wj1_tmp.Pt() > wj2_tmp.Pt() )
133 widejets->push_back( wj1math );
134 widejets->push_back( wj2math );
146 iEvent.
put(widejets,
"widejets");
T getParameter(std::string const &) const
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.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag inputJetTag_
DiJetVarProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)