31#include "fastjet/CDFMidPointPlugin.hh"
32#include "fastjet/ClusterSequence.hh"
33#include "fastjet/Error.hh"
37#include "MidPointAlgorithm.hh"
38#include "PhysicsTower.hh"
41FASTJET_BEGIN_NAMESPACE
46thread_safety_helpers::FirstTimeTrue CDFMidPointPlugin::_first_time;
48string CDFMidPointPlugin::description ()
const {
51 string sm_scale_string =
"split-merge uses ";
54 sm_scale_string +=
"pt";
57 sm_scale_string +=
"Et";
60 sm_scale_string +=
"mt";
63 sm_scale_string +=
"pttilde (scalar sum of pts)";
67 err <<
"Unrecognized split-merge scale choice = " << _sm_scale;
68 throw Error(err.str());
72 if (cone_area_fraction() == 1) {
73 desc <<
"CDF MidPoint jet algorithm, with " ;
75 desc <<
"CDF MidPoint+Searchcone jet algorithm, with ";
77 desc <<
"seed_threshold = " << seed_threshold () <<
", "
78 <<
"cone_radius = " << cone_radius () <<
", "
79 <<
"cone_area_fraction = " << cone_area_fraction () <<
", "
80 <<
"max_pair_size = " << max_pair_size () <<
", "
81 <<
"max_iterations = " << max_iterations () <<
", "
82 <<
"overlap_threshold = " << overlap_threshold () <<
", "
94 vector<PhysicsTower> towers;
95 towers.reserve(clust_seq.
jets().size());
96 for (
unsigned i = 0; i < clust_seq.
jets().size(); i++) {
97 LorentzVector fourvect(clust_seq.
jets()[i].px(),
98 clust_seq.
jets()[i].py(),
99 clust_seq.
jets()[i].pz(),
100 clust_seq.
jets()[i].E());
101 PhysicsTower tower(fourvect);
104 tower.calTower.iEta = i;
105 towers.push_back(tower);
109 MidPointAlgorithm m(_seed_threshold,_cone_radius,_cone_area_fraction,
110 _max_pair_size,_max_iterations,_overlap_threshold,
111 MidPointAlgorithm::SplitMergeScale(_sm_scale));
114 std::vector<Cluster> jets;
121 for(vector<Cluster>::const_iterator jetIter = jets.begin();
122 jetIter != jets.end(); jetIter++) {
123 const vector<PhysicsTower> & tower_list = jetIter->towerList;
124 int jet_k = tower_list[0].calTower.iEta;
126 int ntow = int(jetIter->towerList.size());
127 for (
int itow = 1; itow < ntow; itow++) {
130 int jet_j = tower_list[itow].calTower.iEta;
137 double d_iB = clust_seq.
jets()[jet_k].perp2();
158void CDFMidPointPlugin::_print_banner(ostream *ostr)
const{
159 if (! _first_time())
return;
164 (*ostr) <<
"#-------------------------------------------------------------------------" << endl;
165 (*ostr) <<
"# You are running the CDF MidPoint plugin for FastJet " << endl;
166 (*ostr) <<
"# This is based on an implementation provided by Joey Huston. " << endl;
167 (*ostr) <<
"# If you use this plugin, please cite " << endl;
168 (*ostr) <<
"# G. C. Blazey et al., hep-ex/0005012. " << endl;
169 (*ostr) <<
"# in addition to the usual FastJet reference. " << endl;
170 (*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],...
base class corresponding to errors that can be thrown by FastJet