2 #include <fastjet/ClusterSequence.hh> 3 #include <fastjet/tools/Recluster.hh> 27 class FlavourRecombiner :
public DefRecomb {
32 virtual std::string description()
const {
53 PseudoJet hardest_jet(vector<PseudoJet> &particles){
55 FlavourRecombiner *flav_recombiner=
new FlavourRecombiner;
56 JetDefinition jet_def(cambridge_algorithm, R, flav_recombiner);
57 jet_def.delete_recombiner_when_unused();
63 cout <<
"Ran: " << jet_def.description() << endl << endl;
64 cout <<
"Hardest jet: " << jets[0] << endl << endl;
73 vector<PseudoJet> particles;
80 while (getline(cin,line)) {
81 if (line.substr(0,1) ==
"#") {
continue;}
82 istringstream linestream(line);
84 linestream >> px >> py >> pz >> E;
88 if (! (linestream >> btag)) btag = 0;
92 particle.set_user_index(btag);
93 particles.push_back(particle);
106 cout <<
"Recluster1 jet: " << fj1 << endl << endl;
113 cout <<
"Recluster1 jet: " << fj2 << endl << endl;
122 ostr <<
"pt, y, phi =" 126 <<
", mass = " << jet.
m()
double rap() const
returns the rapidity or some large value when the rapidity is infinite
vector< PseudoJet > sorted_by_pt(const vector< PseudoJet > &jets)
return a vector of jets sorted into decreasing kt2
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...
std::vector< PseudoJet > inclusive_jets(const double ptmin=0.0) const
return a vector of all jets (in the sense of the inclusive algorithm) with pt >= ptmin.
ostream & operator<<(ostream &, PseudoJet &)
does the actual work for printing out a jet
A class that will provide the recombination scheme facilities and/or allow a user to extend these fac...
virtual std::string description() const
return a textual description of the recombination scheme implemented here
int main()
an example program showing how to use fastjet
RecombinationScheme
The various recombination schemes.
Recluster a jet's constituents with a new jet definition.
double phi() const
returns phi (in the range 0..2pi)
virtual void recombine(const PseudoJet &pa, const PseudoJet &pb, PseudoJet &pab) const
recombine pa and pb and put result into pab
int user_index() const
return the user_index,
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) ...
void delete_self_when_unused()
by calling this routine you tell the ClusterSequence to delete itself when all the Pseudojets associa...
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