31#include "fastjet/PxConePlugin.hh"
33#include "fastjet/ClusterSequence.hh"
40FASTJET_BEGIN_NAMESPACE
44thread_safety_helpers::FirstTimeTrue PxConePlugin::_first_time;
46string PxConePlugin::description ()
const {
49 desc <<
"PxCone jet algorithm with "
50 <<
"cone_radius = " << cone_radius () <<
", "
51 <<
"min_jet_energy = " << min_jet_energy () <<
", "
52 <<
"overlap_threshold = " << overlap_threshold () <<
", "
53 <<
"E_scheme_jets = " << E_scheme_jets () <<
", "
54 <<
"mode (1=e+e-, 2=hh) = " << _mode
55 <<
" (NB: non-standard version of PxCone, containing small bug fixes by Gavin Salam)";
68 int ntrak = clust_seq.
jets().size(), itkdm = 4;
69 double *ptrak =
new double[ntrak*4+1];
70 for (
int i = 0; i < ntrak; i++) {
71 ptrak[4*i+0] = clust_seq.
jets()[i].px();
72 ptrak[4*i+1] = clust_seq.
jets()[i].py();
73 ptrak[4*i+2] = clust_seq.
jets()[i].pz();
74 ptrak[4*i+3] = clust_seq.
jets()[i].E();
80 double *pjet =
new double[mxjet*5+1];
81 int *ipass =
new int[ntrak+1];
82 int *ijmul =
new int[mxjet+1];
103 if (ierr != 0)
throw Error(
"An error occurred while running PXCONE");
106 valarray<int> last_index_created(njet);
108 vector<vector<int> > jet_particle_content(njet);
111 for (
int itrak = 0; itrak < ntrak; itrak++) {
112 int jet_i = ipass[itrak] - 1;
113 if (jet_i >= 0) jet_particle_content[jet_i].push_back(itrak);
119 for(
int ipxjet = njet-1; ipxjet >= 0; ipxjet--) {
120 const vector<int> & jet_trak_list = jet_particle_content[ipxjet];
121 int jet_k = jet_trak_list[0];
123 for (
unsigned ilist = 1; ilist < jet_trak_list.size(); ilist++) {
126 int jet_j = jet_trak_list[ilist];
130 if (ilist != jet_trak_list.size()-1 || E_scheme_jets()) {
137 PseudoJet(pjet[5*ipxjet+0],pjet[5*ipxjet+1],
138 pjet[5*ipxjet+2],pjet[5*ipxjet+3]),
144 double d_iB = clust_seq.
jets()[jet_k].perp2();
170void PxConePlugin::_print_banner(ostream *ostr)
const{
171 if (! _first_time())
return;
176 (*ostr) <<
"#-------------------------------------------------------------------------" << endl;
177 (*ostr) <<
"# You are running the PxCone plugin for FastJet " << endl;
178 (*ostr) <<
"# Original code by the Luis Del Pozo, David Ward and Michael H. Seymour " << endl;
179 (*ostr) <<
"# If you use this plugin, please cite " << endl;
180 (*ostr) <<
"# M. H. Seymour and C. Tevlin, JHEP 0611 (2006) 052 [hep-ph/0609100]. " << endl;
181 (*ostr) <<
"# in addition to the usual FastJet reference. " << endl;
182 (*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...
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],...
base class corresponding to errors that can be thrown by FastJet
Class to contain pseudojets, including minimal information of use to jet-clustering routines.