60#include <fastjet/ClusterSequence.hh>
61#include <fastjet/tools/MassDropTagger.hh>
62#include <fastjet/tools/Filter.hh>
87class FlavourRecombiner :
public DefRecomb {
109ostream & operator<<(ostream &,
const PseudoJet &);
117 vector<PseudoJet> particles;
124 while (getline(cin,line)) {
125 if (line.substr(0,1) ==
"#") {
continue;}
126 istringstream linestream(line);
128 linestream >> px >> py >> pz >> E;
132 if (! (linestream >> btag)) btag = 0;
136 particle.set_user_index(btag);
137 particles.push_back(particle);
147 FlavourRecombiner flav_recombiner;
153 vector<PseudoJet> jets =
sorted_by_pt(cs.inclusive_jets());
155 cout <<
"Ran: " << jet_def.description() << endl << endl;
156 cout <<
"Hardest jet: " << jets[0] << endl << endl;
171 cout <<
"No substructure found" << endl;
177 cout <<
"Found suitable pair of subjets: " << endl;
178 cout <<
" " << parent1 << endl;
179 cout <<
" " << parent2 << endl;
180 cout <<
"Total = " << endl;
181 cout <<
" " << tagged << endl;
200 double Rbb = parent1.
delta_R(parent2);
201 double Rfilt = min(Rbb/2, 0.3);
203 cout <<
"Subjet separation (Rbb) = " << Rbb <<
", Rfilt = " << Rfilt << endl;
211 const vector<PseudoJet> & filtered_pieces = filtered.
pieces();
212 cout <<
"Filtered pieces are " << endl;
213 for (
unsigned i = 0; i < nfilt && i < filtered_pieces.size(); i++) {
214 cout <<
" " << filtered_pieces[i] << endl;
216 cout <<
"Filtered total is " << endl;
217 cout <<
" " << filtered << endl;
225ostream & operator<<(ostream & ostr,
const PseudoJet & jet) {
226 ostr <<
"pt, y, phi ="
227 <<
" " << setw(10) << jet.
perp()
228 <<
" " << setw(6) << jet.
rap()
229 <<
" " << setw(6) << jet.
phi()
230 <<
", mass = " << setw(10) << jet.
m()
int main()
an example program showing how to use fastjet
Class that helps perform filtering (Butterworth, Davison, Rubin and Salam, arXiv:0802....
A class that will provide the recombination scheme facilities and/or allow a user to extend these fac...
virtual void recombine(const PseudoJet &pa, const PseudoJet &pb, PseudoJet &pab) const override
recombine pa and pb and put result into pab
virtual std::string description() const override
return a textual description of the recombination scheme implemented here
class that is intended to hold a full definition of the jet clusterer
Class that helps perform 2-pronged boosted tagging using the "mass-drop" technique (with asymmetry cu...
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
double rap() const
returns the rapidity or some large value when the rapidity is infinite
const TransformerType::StructureType & structure_of() const
this is a helper to access any structure created by a Transformer (that is, of type Transformer::Stru...
double delta_R(const PseudoJet &other) const
return the cylinder (rap-phi) distance between this jet and another, .
void set_user_index(const int index)
set the user_index, intended to allow the user to add simple identifying information to a particle/je...
double phi() const
returns phi (in the range 0..2pi)
double perp() const
returns the scalar transverse momentum
double m() const
returns the invariant mass (If m2() is negative then -sqrt(-m2()) is returned, as in CLHEP)
int user_index() const
return the user_index,
virtual std::vector< PseudoJet > pieces() const
retrieve the pieces that make up the jet.
Selector SelectorNHardest(unsigned int n)
select the n hardest objects
RecombinationScheme
The various recombination schemes.
@ E_scheme
summing the 4-momenta
@ cambridge_algorithm
the longitudinally invariant variant of the cambridge algorithm (aka Aachen algoithm).
vector< PseudoJet > sorted_by_pt(const vector< PseudoJet > &jets)
return a vector of jets sorted into decreasing kt2