31 #include "fastjet/ClusterSequence.hh"
32 #include "fastjet/ClusterSequenceArea.hh"
33 #include "fastjet/Selector.hh"
34 #include "fastjet/SISConePlugin.hh"
39 FASTJET_BEGIN_NAMESPACE
45 unique_ptr<JetDefinition::Plugin>
plugin;
47 unique_ptr<ClusterSequence>
cs;
54 valarray<double> mom(4);
55 for (
int j = 0;
j <= 3;
j++) {
61 psjet.set_user_index(
i);
70 for (
int j = 0;
j <= 3;
j++) {
88 const double &ghost_maxrap = 0.0,
89 const int &nrepeat = 0,
90 const double &ghost_area = 0.0) {
95 if (ghost_maxrap == 0.0) {
100 GhostedAreaSpec area_spec(ghost_maxrap, nrepeat, ghost_area);
101 AreaDefinition area_def(active_area, area_spec);
117 vector<PseudoJet> constit =
cs->constituents(
jets[
kk]);
118 for (
unsigned int ll = 0; ll < constit.size(); ++ll)
119 whichjet[constit[ll].user_index()] =
kk + 1;
123 FASTJET_END_NAMESPACE
125 using namespace fastjet::fwrapper;
160 const double *
p,
const int &
npart,
const double &
R,
const double &
f,
double *f77jets,
int &
njets,
int *whichjet) {
162 plugin = std::make_unique<SISConePlugin>(
R,
f);
208 const double &ghost_rapmax,
210 const double &ghost_area,
215 plugin = std::make_unique<SISConePlugin>(
R,
f);
262 const double &ptjetmin,
269 jet_def = JetDefinition(kt_algorithm,
R);
270 }
else if (palg == 0.0) {
271 jet_def = JetDefinition(cambridge_algorithm,
R);
272 }
else if (palg == -1.0) {
273 jet_def = JetDefinition(antikt_algorithm,
R);
275 jet_def = JetDefinition(genkt_algorithm,
R, palg);
328 const double &ghost_rapmax,
330 const double &ghost_area,
336 jet_def = JetDefinition(kt_algorithm,
R);
337 }
else if (palg == 0.0) {
338 jet_def = JetDefinition(cambridge_algorithm,
R);
339 }
else if (palg == -1.0) {
340 jet_def = JetDefinition(antikt_algorithm,
R);
342 jet_def = JetDefinition(genkt_algorithm,
R, palg);
370 vector<PseudoJet> constituents =
cs->constituents(
jets[ijet - 1]);
372 nconstituents = constituents.size();
373 for (
int i = 0;
i < nconstituents;
i++) {
374 constituent_indices[
i] = constituents[
i].cluster_hist_index() + 1;
394 const ClusterSequenceAreaBase *csab = dynamic_cast<const ClusterSequenceAreaBase *>(
cs.get());
395 if (csab !=
nullptr) {
397 return csab->area(
jets[ijet - 1]);
415 return cs->exclusive_dmerge(
n);
431 return cs->exclusive_dmerge_max(
n);
446 const double &rapmax,
452 const ClusterSequenceAreaBase *csab = dynamic_cast<const ClusterSequenceAreaBase *>(
cs.get());
453 if (csab !=
nullptr) {
456 bool use_area_4vector =
false;
457 csab->get_median_rho_and_sigma(
range, use_area_4vector, rho, sigma, meanarea);
459 Error(
"Clustering with area is necessary in order to be able to evaluate rho.");