40 #include "fastjet/ClusterSequence.hh" 41 #include "fastjet/Selector.hh" 52 vector<PseudoJet> input_particles;
54 double px, py , pz, E;
55 while (cin >> px >> py >> pz >> E) {
58 input_particles.push_back(
PseudoJet(px,py,pz,E));
68 cout << input_particles.size() <<
" particles before selector" << endl;
69 input_particles = particle_selector(input_particles);
70 cout << input_particles.size() <<
" particles after selector" << endl;
96 vector<PseudoJet> inclusive_jets =
sorted_by_pt(jet_selector(clust_seq.inclusive_jets()));
106 double rapmin, rapmax;
108 cout <<
"Ran " << jet_def.description() << endl;
110 cout <<
"Selected particles: " << particle_selector.
description() << endl;
112 cout <<
" with a total rapidity range of [" << rapmin <<
", " << rapmax <<
"]" << endl;
114 cout <<
"Selected jets: " << jet_selector.
description() << endl;
116 cout <<
" with a total rapidity range of [" << rapmin <<
", " << rapmax <<
"]" << endl;
119 printf(
"%5s %15s %15s %15s\n",
"jet #",
"rapidity",
"phi",
"pt");
122 for (
unsigned int i = 0; i < inclusive_jets.size(); i++) {
123 printf(
"%5u %15.8f %15.8f %15.8f\n",
124 i, inclusive_jets[i].rap(), inclusive_jets[i].phi(),
125 inclusive_jets[i].perp());
vector< PseudoJet > sorted_by_pt(const vector< PseudoJet > &jets)
return a vector of jets sorted into decreasing kt2
Selector SelectorNHardest(unsigned int n)
select the n hardest objects
Selector SelectorAbsRapMax(double absrapmax)
select objects with |rap| <= absrapmax
void get_rapidity_extent(double &rapmin, double &rapmax) const
returns the rapidity range for which it may return "true"
Selector SelectorPtMin(double ptmin)
select objects with pt >= ptmin
Selector SelectorAbsRapRange(double rapmin, double rapmax)
select objects with absrapmin <= |rap| <= absrapmax
int main()
an example program showing how to use fastjet
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
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
class that is intended to hold a full definition of the jet clusterer