32 #include "fastjet/ClusterSequence.hh" 
   33 #include "fastjet/ATLASConePlugin.hh" 
   36 #include "CommonUtils.hh" 
   37 #include "JetConeFinderTool.hh" 
   38 #include "JetSplitMergeTool.hh" 
   44 FASTJET_BEGIN_NAMESPACE      
 
   48 thread_safety_helpers::FirstTimeTrue ATLASConePlugin::_first_time;
 
   50 string ATLASConePlugin::description ()
 const {
 
   52   desc << 
"ATLASCone plugin with R = "<< _radius 
 
   53        << 
", seed threshold = " << _seedPt
 
   54        << 
", overlap threshold f = " << _f;
 
   68   atlas::JetConeFinderTool::jetcollection_t jets_ptr;
 
   69   vector<atlas::Jet*> particles_ptr;
 
   71   for (
unsigned int i=0 ; i<clust_seq.
jets().size() ; i++) {
 
   75     atlas::Jet *particle = 
new atlas::Jet(mom.px(), mom.py(), mom.pz(), mom.E(), i);
 
   76     particles_ptr.push_back(particle);
 
   79     atlas::Jet *jet = 
new atlas::Jet;
 
   80     jet->set_index(particle->index());
 
   81     jet->addConstituent(particle);
 
   84     jets_ptr.push_back(jet);
 
   91   atlas::JetConeFinderTool stable_cone_finder;
 
   94   stable_cone_finder.m_coneR  = _radius;
 
   95   stable_cone_finder.m_seedPt = _seedPt;
 
  100   stable_cone_finder.execute(jets_ptr);
 
  106   atlas::JetSplitMergeTool split_merge;
 
  109   split_merge.m_f = _f;
 
  113   split_merge.execute(&jets_ptr);
 
  119   for (atlas::Jet::jet_list_t::iterator jet_it = jets_ptr.begin() ;
 
  120          jet_it != jets_ptr.end(); jet_it++){
 
  123     atlas::Jet::constit_vect_t::iterator constit_it = (*jet_it)->firstConstituent();
 
  125     int jet_k = (*constit_it)->index();
 
  129     while (constit_it != (*jet_it)->lastConstituent()){
 
  133       int jet_j = (*constit_it)->index();
 
  149     double d_iB = clust_seq.
jets()[jet_k].perp2();
 
  154   clear_list(particles_ptr);
 
  155   clear_list(jets_ptr);
 
  159 void ATLASConePlugin::_print_banner(ostream *ostr)
 const{
 
  160   if (! _first_time()) 
return;
 
  165   (*ostr) << 
"#-------------------------------------------------------------------------" << endl;
 
  166   (*ostr) << 
"# You are running the ATLAS Cone plugin for FastJet                       " << endl;
 
  167   (*ostr) << 
"# Original code from SpartyJet; interface by the FastJet authors          " << endl;
 
  168   (*ostr) << 
"# If you use this plugin, please cite                                     " << endl;
 
  169   (*ostr) << 
"#   P.A. Delsart, K. Geerlings, J. Huston, B. Martin and C. Vermilion,    " << endl;
 
  170   (*ostr) << 
"#   SpartyJet, http://projects.hepforge.org/spartyjet                     " << endl;
 
  171   (*ostr) << 
"# in addition to the usual FastJet reference.                             " << endl;
 
  172   (*ostr) << 
"#-------------------------------------------------------------------------" << endl;
 
  179 FASTJET_END_NAMESPACE