fastjet 2.4.5
|
#include <JetConeFinderTool.hh>
Public Types | |
typedef Jet::jet_list_t | jetcollection_t |
Public Member Functions | |
JetConeFinderTool () | |
virtual | ~JetConeFinderTool () |
virtual int | execute (jetcollection_t &theJets) |
void | reconstruct () |
Jet * | calc_cone (double, double) |
Public Attributes | |
std::string | m_protoJetContainerLoc |
std::string | m_jetContainerLoc |
double | m_coneR |
double | m_ptcut |
double | m_eps |
double | m_seedPt |
double | m_etaMax |
jetcollection_t * | m_pjetV |
jetcollection_t * | m_jetOV |
int | m_cone_in_tower |
std::vector< double > * | m_veta |
std::vector< double > * | m_vphi |
int | m_ctr |
int | m_dctr |
Definition at line 50 of file JetConeFinderTool.hh.
Definition at line 53 of file JetConeFinderTool.hh.
fastjet::atlas::JetConeFinderTool::JetConeFinderTool | ( | ) |
fastjet::atlas::JetConeFinderTool::~JetConeFinderTool | ( | ) | [virtual] |
Definition at line 42 of file JetConeFinderTool.cc.
{}
Jet * fastjet::atlas::JetConeFinderTool::calc_cone | ( | double | eta, |
double | phi | ||
) |
Definition at line 181 of file JetConeFinderTool.cc.
References fastjet::atlas::Jet::addJet(), fastjet::atlas::JetDistances::deltaR(), m_coneR, m_ctr, and m_pjetV.
Referenced by reconstruct().
{ // Create a new Jet Jet* j = new Jet(); m_ctr +=1; // Add all ProtoJet within m_coneR to this Jet jetcollection_t::iterator itr = m_pjetV->begin(); jetcollection_t::iterator itrE = m_pjetV->end(); for ( ; itr!=itrE; ++itr ) { double dR = JetDistances::deltaR(eta,phi,(*itr)->eta(),(*itr)->phi()); if ( dR < m_coneR ) { j->addJet( (*itr) ); } } return j; }
int fastjet::atlas::JetConeFinderTool::execute | ( | jetcollection_t & | theJets | ) | [virtual] |
Definition at line 48 of file JetConeFinderTool.cc.
References fastjet::atlas::clear_list(), m_ctr, m_dctr, m_jetOV, m_pjetV, and reconstruct().
Referenced by fastjet::ATLASConePlugin::run_clustering().
{ sort_jet_list<JetSorter_Et>(theJets); m_pjetV = &theJets; if(theJets.size()==0) return 0; // Initiale ctr/dctr counter for object counting. m_ctr = 0; m_dctr = 0; // Reconstruct Jets // this->reconstruct(); // ReFill JetCollection // clear_list(theJets); jetcollection_t::iterator it = m_jetOV->begin(); jetcollection_t::iterator itE = m_jetOV->end(); for(; it!=itE; ++it){ theJets.push_back(*it); } delete m_jetOV; return 1; }
void fastjet::atlas::JetConeFinderTool::reconstruct | ( | ) |
Definition at line 85 of file JetConeFinderTool.cc.
References calc_cone(), fastjet::atlas::JetDistances::deltaPhi(), fastjet::atlas::LorentzVector::eta(), m_dctr, m_eps, m_etaMax, m_jetOV, m_pjetV, m_seedPt, and fastjet::atlas::LorentzVector::phi().
Referenced by execute().
{ m_jetOV = new jetcollection_t(); jetcollection_t::iterator tItr; jetcollection_t::iterator tItr_begin = m_pjetV->begin(); jetcollection_t::iterator tItr_end = m_pjetV->end(); // order towers in pt for ( tItr=tItr_begin; tItr!=tItr_end; ++tItr ) { // Seed Cut double tEt = (*tItr)->et(); if ( tEt < m_seedPt ) break; // Tower eta, phi double etaT = (*tItr)->eta(); double phiT = (*tItr)->phi(); // Iteration logic bool stable = false; bool inGeom = true; Jet* preJet; int count = 1; do { // Iteration Loop // Make cone preJet = calc_cone(etaT,phiT); double etaC = preJet->eta(); double phiC = preJet->phi(); double deta = fabs(etaT - etaC); double dphi = fabs(JetDistances::deltaPhi(phiT,phiC)); // Is Stable ? if ( deta < m_eps && dphi < m_eps ) stable = true; // In Geometry ? if ( fabs(etaC) > m_etaMax ) inGeom = false; etaT = etaC; phiT = phiC; if ( !stable && inGeom ) { delete preJet; m_dctr +=1; } ++count; }while ( !stable && inGeom && count < 10 ); if ( count > 9 && (!stable && inGeom) ) continue; // FIXME 9 ? // If iteration was succesfull -- check if this is a new jet and // add it to OV. if ( stable && inGeom ) { jetcollection_t::iterator pItr = m_jetOV->begin(); jetcollection_t::iterator pItrE = m_jetOV->end(); bool newJet = true; double etaT = preJet->eta(); double phiT = preJet->phi(); for ( ; pItr != pItrE ; ++pItr ) { double etaC = (*pItr)->eta(); double phiC = (*pItr)->phi(); double deta = fabs(etaT - etaC); double dphi = fabs(JetDistances::deltaPhi(phiT,phiC)); if ( deta < 0.05 && dphi < 0.05 ) { newJet = false; break; } } if ( newJet ) { m_jetOV->push_back( preJet ); } else { delete preJet; m_dctr +=1; } } else { delete preJet; m_dctr +=1; } } }
Definition at line 82 of file JetConeFinderTool.hh.
Definition at line 71 of file JetConeFinderTool.hh.
Referenced by calc_cone(), and fastjet::ATLASConePlugin::run_clustering().
Definition at line 87 of file JetConeFinderTool.hh.
Referenced by calc_cone(), and execute().
Definition at line 88 of file JetConeFinderTool.hh.
Referenced by execute(), and reconstruct().
Definition at line 73 of file JetConeFinderTool.hh.
Referenced by reconstruct().
Definition at line 75 of file JetConeFinderTool.hh.
Referenced by reconstruct().
Definition at line 69 of file JetConeFinderTool.hh.
Definition at line 80 of file JetConeFinderTool.hh.
Referenced by execute(), and reconstruct().
Definition at line 79 of file JetConeFinderTool.hh.
Referenced by calc_cone(), execute(), and reconstruct().
Definition at line 68 of file JetConeFinderTool.hh.
Definition at line 72 of file JetConeFinderTool.hh.
Definition at line 74 of file JetConeFinderTool.hh.
Referenced by reconstruct(), and fastjet::ATLASConePlugin::run_clustering().
std::vector<double>* fastjet::atlas::JetConeFinderTool::m_veta |
Definition at line 84 of file JetConeFinderTool.hh.
std::vector<double>* fastjet::atlas::JetConeFinderTool::m_vphi |
Definition at line 85 of file JetConeFinderTool.hh.