fastjet 2.4.5
|
00001 // file taken from SpartyJet v2.20.0 00002 00003 #include "Jet.hh" 00004 #include <iostream> 00005 00006 #include <fastjet/internal/base.hh> 00007 00008 FASTJET_BEGIN_NAMESPACE 00009 00010 namespace atlas { 00011 00012 Jet::Jet(Jet &jet) : LorentzVector(0,0,0,0){ 00013 add(jet); 00014 m_index = jet.index(); 00015 m_constituents = jet.m_constituents; 00016 // m_area = jet.area(); 00017 // m_area_error = jet.area_error(); 00018 } 00019 Jet::Jet(Jet* j){ 00020 add(*j); 00021 m_index = j->index(); 00022 m_constituents = j->m_constituents; 00023 // m_area = j->area(); 00024 // m_area_error = j->area_error(); 00025 } 00026 00027 void Jet::addJet(Jet& j){ 00028 add(j); 00029 m_constituents.insert(m_constituents.end(), j.firstConstituent(), j.lastConstituent() ); 00030 } 00031 00032 void Jet::addJet(Jet* j){ 00033 add(*j) ; 00034 m_constituents.insert(m_constituents.end(), j->firstConstituent(), j->lastConstituent() ); 00035 } 00036 00037 00038 void Jet::addConstituent(constit_vect_t::iterator first, constit_vect_t::iterator last){ 00039 m_constituents.insert(m_constituents.end(), first, last); 00040 for(; first!=last;++first) this->add( **first); 00041 } 00042 00043 00044 00045 Jet* jet_from_overlap(Jet* j1, Jet* j2){ 00046 Jet *j = new Jet(); 00047 Jet::constit_vect_t::iterator it1 = j1->firstConstituent(); 00048 Jet::constit_vect_t::iterator it1E = j1->lastConstituent(); 00049 for(;it1!= it1E; ++it1){ 00050 Jet::constit_vect_t::iterator it2 = j2->firstConstituent(); 00051 Jet::constit_vect_t::iterator it2E = j2->lastConstituent(); 00052 for(;it2!= it2E; ++it2){ 00053 if( *it1 == *it2) j->addConstituent(*it1); 00054 } 00055 00056 } 00057 return j; 00058 } 00059 } // namespace atlas 00060 00061 FASTJET_END_NAMESPACE 00062