31 #include "fastjet/CDFJetCluPlugin.hh"
32 #include "fastjet/ClusterSequence.hh"
37 #include "JetCluAlgorithm.hh"
38 #include "PhysicsTower.hh"
41 FASTJET_BEGIN_NAMESPACE
46 bool CDFJetCluPlugin::_first_time =
true;
48 string CDFJetCluPlugin::description ()
const {
51 desc <<
"CDF JetClu jet algorithm with "
52 <<
"seed_threshold = " << seed_threshold () <<
", "
53 <<
"cone_radius = " << cone_radius () <<
", "
54 <<
"adjacency_cut = " << adjacency_cut () <<
", "
55 <<
"max_iterations = " << max_iterations () <<
", "
56 <<
"iratch = " << iratch () <<
", "
57 <<
"overlap_threshold = " << overlap_threshold () ;
68 vector<PhysicsTower> towers;
69 towers.reserve(clust_seq.
jets().size());
74 for (
unsigned i = 0; i < clust_seq.
jets().size(); i++) {
77 LorentzVector fourvect(particle.px(), particle.py(),
78 particle.pz(), particle.E());
79 PhysicsTower tower(fourvect);
82 towers.push_back(tower);
86 JetCluAlgorithm j(seed_threshold(), cone_radius(), adjacency_cut(),
87 max_iterations(), iratch(), overlap_threshold());
90 std::vector<Cluster> jets;
107 for(
int iCDFjets = jets.size()-1; iCDFjets >= 0; iCDFjets--) {
109 const vector<PhysicsTower> & tower_list = jets[iCDFjets].towerList;
110 int ntow = int(tower_list.size());
117 vector<int> jc_indices(ntow);
118 vector<double> fj_indices(ntow);
119 for (
int itow = 0; itow < ntow; itow++) {
120 jc_indices[itow] = itow;
121 fj_indices[itow] = tower_list[itow].fjindex;
123 sort_indices(jc_indices, fj_indices);
125 int jet_k = tower_list[jc_indices[0]].fjindex;
127 for (
int itow = 1; itow < ntow; itow++) {
128 if (tower_list[jc_indices[itow]].Et() > 1e-50) {
133 jet_j = tower_list[jc_indices[itow]].fjindex;
136 assert (jet_j >= 0 && jet_j <
int(towers.size()));
148 double d_iB = clust_seq.
jets()[jet_k].perp2();
170 void CDFJetCluPlugin::_print_banner(ostream *ostr)
const{
171 if (! _first_time)
return;
177 (*ostr) <<
"#-------------------------------------------------------------------------" << endl;
178 (*ostr) <<
"# You are running the CDF JetClu plugin for FastJet " << endl;
179 (*ostr) <<
"# This is based on an implementation provided by Joey Huston. " << endl;
180 (*ostr) <<
"# If you use this plugin, please cite " << endl;
181 (*ostr) <<
"# F. Abe et al. [CDF Collaboration], Phys. Rev. D 45 (1992) 1448. " << endl;
182 (*ostr) <<
"# in addition to the usual FastJet reference. " << endl;
183 (*ostr) <<
"#-------------------------------------------------------------------------" << endl;
189 FASTJET_END_NAMESPACE
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], with the specified dij, and return the index (newjet_k) allocated to the new jet, whose momentum is assumed to be the 4-vector sum of that of jet_i and jet_j
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...
static std::ostream * fastjet_banner_stream()
returns a pointer to the stream to be used to print banners (cout by default).
Class to contain pseudojets, including minimal information of use to jet-clustering routines...