42#include "fastjet/ClusterSequence.hh"
43#include "fastjet/Selector.hh"
54 vector<PseudoJet> input_particles;
56 double px, py , pz, E;
57 while (cin >> px >> py >> pz >> E) {
60 input_particles.push_back(
PseudoJet(px,py,pz,E));
70 cout << input_particles.size() <<
" particles before selector" << endl;
71 input_particles = particle_selector(input_particles);
72 cout << input_particles.size() <<
" particles after selector" << endl;
98 vector<PseudoJet> inclusive_jets =
sorted_by_pt(jet_selector(clust_seq.inclusive_jets()));
108 double rapmin, rapmax;
110 cout <<
"Ran " << jet_def.description() << endl;
112 cout <<
"Selected particles: " << particle_selector.
description() << endl;
114 cout <<
" with a total rapidity range of [" << rapmin <<
", " << rapmax <<
"]" << endl;
116 cout <<
"Selected jets: " << jet_selector.
description() << endl;
118 cout <<
" with a total rapidity range of [" << rapmin <<
", " << rapmax <<
"]" << endl;
121 printf(
"%5s %15s %15s %15s\n",
"jet #",
"rapidity",
"phi",
"pt");
124 for (
unsigned int i = 0; i < inclusive_jets.size(); i++) {
125 printf(
"%5u %15.8f %15.8f %15.8f\n",
126 i, inclusive_jets[i].rap(), inclusive_jets[i].phi(),
127 inclusive_jets[i].perp());
int main()
an example program showing how to use fastjet
class that is intended to hold a full definition of the jet clusterer
PseudoJet()
default constructor, which as of FJ3.0 provides an object for which all operations are now valid and ...
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
std::string description() const
returns a textual description of the selector
void get_rapidity_extent(double &rapmin, double &rapmax) const
returns the rapidity range for which it may return "true"
Selector SelectorNHardest(unsigned int n)
select the n hardest objects
Selector SelectorAbsRapMax(double absrapmax)
select objects with |rap| <= absrapmax
Selector SelectorPtMin(double ptmin)
select objects with pt >= ptmin
Selector SelectorAbsRapRange(double rapmin, double rapmax)
select objects with absrapmin <= |rap| <= absrapmax
@ kt_algorithm
the longitudinally invariant kt algorithm
vector< PseudoJet > sorted_by_pt(const vector< PseudoJet > &jets)
return a vector of jets sorted into decreasing kt2