31#include "fastjet/D0RunIIConePlugin.hh" 
   32#include "fastjet/ClusterSequence.hh" 
   33#include "fastjet/Error.hh" 
   38#include "ILConeAlgorithm.hpp" 
   41FASTJET_BEGIN_NAMESPACE      
 
   46const double D0RunIIConePlugin::_DEFAULT_split_ratio              = 0.5  ; 
 
   47const double D0RunIIConePlugin::_DEFAULT_far_ratio                = 0.5  ;
 
   48const double D0RunIIConePlugin::_DEFAULT_Et_min_ratio             = 0.5  ;
 
   49const bool   D0RunIIConePlugin::_DEFAULT_kill_duplicate           = true ;
 
   50const double D0RunIIConePlugin::_DEFAULT_duplicate_dR             = 0.005; 
 
   51const double D0RunIIConePlugin::_DEFAULT_duplicate_dPT            = 0.01 ; 
 
   52const double D0RunIIConePlugin::_DEFAULT_search_factor            = 1.0  ; 
 
   53const double D0RunIIConePlugin::_DEFAULT_pT_min_leading_protojet  = 0.   ; 
 
   54const double D0RunIIConePlugin::_DEFAULT_pT_min_second_protojet   = 0.   ;
 
   55const int    D0RunIIConePlugin::_DEFAULT_merge_max                = 10000; 
 
   56const double D0RunIIConePlugin::_DEFAULT_pT_min_nomerge           = 0.   ;
 
   58thread_safety_helpers::FirstTimeTrue D0RunIIConePlugin::_first_time;
 
   60string D0RunIIConePlugin::description ()
 const {
 
   63  desc << 
"D0 Run II Improved Legacy (midpoint) cone jet algorithm, with ";
 
   64  desc << 
"cone_radius = "        << cone_radius        () << 
", " 
   65       << 
"min_jet_Et = "         << min_jet_Et         () << 
", "  
   66       << 
"split_ratio = "        << split_ratio        ();
 
 
   77  vector<HepEntity> entities(clust_seq.
jets().size());
 
   78  list<const HepEntity * > ensemble;
 
   79  for (
unsigned i = 0; i < clust_seq.
jets().size(); i++) {
 
   80    entities[i].Fill(clust_seq.
jets()[i].E(),
 
   81                     clust_seq.
jets()[i].px(),
 
   82                     clust_seq.
jets()[i].py(),
 
   83                     clust_seq.
jets()[i].pz(),
 
   86    if (abs(entities[i].pz) < entities[i].E) {
 
   87      ensemble.push_back(& (entities[i]));
 
   92  ILConeAlgorithm<HepEntity> 
 
  102           pT_min_leading_protojet(), 
 
  103           pT_min_second_protojet(), 
 
  108  float Item_ET_Threshold = 0.;
 
  109  list<HepEntity> jets;
 
  110  ilegac.makeClusters(jets, ensemble, Item_ET_Threshold);
 
  114  for(
int i = ilegac.ilcv.size()-1; i >= 0; i--) {
 
  116    std::list<const HepEntity*> tlist = ilegac.ilcv[i].LItems();
 
  117    std::list<const HepEntity*>::iterator tk;
 
  128    int jet_k = (*tk)->index;
 
  131    for (; tk != tlist.end(); tk++) {
 
  133      int jet_j = (*tk)->index;
 
  140    double d_iB = clust_seq.
jets()[jet_k].perp2();
 
 
  147void D0RunIIConePlugin::_print_banner(ostream *ostr)
 const{
 
  148  if (! _first_time()) 
return;
 
  153  (*ostr) << 
"#--------------------------------------------------------------------------" << endl;
 
  154  (*ostr) << 
"# You are running the D0 Run II Cone plugin for FastJet                    " << endl;
 
  155  (*ostr) << 
"# Original code by the D0 collaboration, provided by Lars Sonnenschein;    " << endl;
 
  156  (*ostr) << 
"# interface by FastJet authors                                             " << endl;
 
  157  (*ostr) << 
"# If you use this plugin, please cite                                      " << endl;
 
  158  (*ostr) << 
"#   G. C. Blazey et al., hep-ex/0005012                                    " << endl;
 
  159  (*ostr) << 
"#   V. M. Abazov et al. [D0 Collaboration], arXiv:1110.3771 [hep-ex]       " << endl; 
 
  160  (*ostr) << 
"# in addition to the usual FastJet reference.                              " << endl;
 
  161  (*ostr) << 
"#--------------------------------------------------------------------------" << endl;
 
void plugin_record_iB_recombination(int jet_i, double diB)
record the fact that there has been a recombination between jets()[jet_i] and the beam,...
 
const std::vector< PseudoJet > & jets() const
allow the user to access the internally stored _jets() array, which contains both the initial particl...
 
static std::ostream * fastjet_banner_stream()
returns a pointer to the stream to be used to print banners (cout by default).
 
void plugin_record_ij_recombination(int jet_i, int jet_j, double dij, int &newjet_k)
record the fact that there has been a recombination between jets()[jet_i] and jets()[jet_k],...