20 #include <fastjet/internal/base.hh>
22 FASTJET_BEGIN_NAMESPACE
26 Jet::Jet(Jet &jet) : LorentzVector(0,0,0,0){
28 m_index = jet.index();
29 m_constituents = jet.m_constituents;
36 m_constituents = j->m_constituents;
41 void Jet::addJet(Jet& j){
43 m_constituents.insert(m_constituents.end(), j.firstConstituent(), j.lastConstituent() );
46 void Jet::addJet(Jet* j){
48 m_constituents.insert(m_constituents.end(), j->firstConstituent(), j->lastConstituent() );
52 void Jet::addConstituent(constit_vect_t::iterator first, constit_vect_t::iterator last){
53 m_constituents.insert(m_constituents.end(), first, last);
54 for(; first!=last;++first) this->add( **first);
59 Jet* jet_from_overlap(Jet* j1, Jet* j2){
61 Jet::constit_vect_t::iterator it1 = j1->firstConstituent();
62 Jet::constit_vect_t::iterator it1E = j1->lastConstituent();
63 for(;it1!= it1E; ++it1){
64 Jet::constit_vect_t::iterator it2 = j2->firstConstituent();
65 Jet::constit_vect_t::iterator it2E = j2->lastConstituent();
66 for(;it2!= it2E; ++it2){
67 if( *it1 == *it2) j->addConstituent(*it1);