00001
00002
00003 #include "Rivet/Rivet.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/D0ILConeJets.hh"
00006 #include "Rivet/Cmp.hh"
00007 #include "Rivet/RivetCLHEP.hh"
00008
00009 #include "Rivet/Tools/D0RunIIcone/inline_maths.h"
00010 #include "Rivet/Tools/D0RunIIcone/HepEntity.h"
00011
00012 namespace Rivet {
00013
00014
00015
00016 int D0ILConeJets::compare(const Projection& p) const {
00017 const D0ILConeJets& other = dynamic_cast<const D0ILConeJets&>(p);
00018 return
00019 pcmp(*_fsproj, *other._fsproj) ||
00020 cmp(_cone_radius, other._cone_radius) ||
00021 cmp(_min_jet_Et, other._min_jet_Et) ||
00022 cmp(_split_ratio, other._split_ratio) ||
00023 cmp(_far_ratio, other._far_ratio) ||
00024 cmp(_et_min_ratio, other._et_min_ratio) ||
00025 cmp(_kill_duplicate, other._kill_duplicate) ||
00026 cmp(_duplicate_dR, other._duplicate_dR) ||
00027 cmp(_duplicate_dPT, other._duplicate_dPT) ||
00028 cmp(_search_factor, other._search_factor) ||
00029 cmp(_pT_min_leading_protojet, other._pT_min_leading_protojet) ||
00030 cmp(_pT_min_second_protojet, other._pT_min_second_protojet) ||
00031 cmp(_merge_max, other._merge_max) ||
00032 cmp(_pT_min_nomerge, other._pT_min_nomerge);
00033
00034 }
00035
00036
00037 void D0ILConeJets::project(const Event& e) {
00038
00039
00040 const FinalState& fs = e.applyProjection(*_fsproj);
00041
00042
00043 for (ParticleVector::const_iterator p = fs.particles().begin(); p != fs.particles().end(); ++p) {
00044 HepMC::FourVector fv = p->getMomentum();
00045 const HepEntity listelement(fv.e(), fv.px(), fv.py(), fv.pz());
00046 _particlelist.push_back(listelement);
00047 _particlepointerlist.push_back(&_particlelist.back());
00048 }
00049
00050
00051
00052 float item_ET_Threshold = 0.0;
00053
00054 clearJets();
00055 _algo.makeClusters(getJets(), _particlepointerlist, item_ET_Threshold);
00056 _particlelist.clear();
00057 _particlepointerlist.clear();
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 _lorentzvecjets.clear();
00068 for (list<HepEntity>::const_iterator jt = _jets.begin(); jt != _jets.end(); ++jt) {
00069 LorentzVector jet(jt->px, jt->py, jt->pz, jt->E);
00070 _lorentzvecjets.push_back(jet);
00071 }
00072
00073 }
00074
00075
00076
00077
00078 list<LorentzVector>& D0ILConeJets::getLorentzJets() {
00079
00080 //LorentzVector jet;
00081 for (list<HepEntity>::const_iterator jt = _jets.begin(); jt != _jets.end(); ++jt) {
00082 //jet.setPx(jt->px);
00083 //jet.setPy(jt->py);
00084 //jet.setPz(jt->pz);
00085 //jet.setE(jt->E);
00086 LorentzVector jet(jt->px, jt->py, jt->pz, jt->E);
00087 _lorentzvecjets.push_back(jet);
00088 }
00089
00090 return _lorentzvecjets;
00091 }
00092 */
00093
00094 }