FastJet  3.1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Types | Public Member Functions | List of all members
fastjet::Recluster Class Reference

Recluster a jet's constituents with a new jet definition. More...

#include <fastjet/tools/Recluster.hh>

Inheritance diagram for fastjet::Recluster:
Inheritance graph
[legend]
Collaboration diagram for fastjet::Recluster:
Collaboration graph
[legend]

Public Types

enum  Keep { keep_only_hardest, keep_all }
 the various options for the output of Recluster More...
 

Public Member Functions

 Recluster ()
 default constructor (uses an undefined JetDefinition, and so cannot be used directly). More...
 
 Recluster (const JetDefinition &new_jet_def, bool acquire_recombiner_in=false, Keep keep_in=keep_only_hardest)
 Constructs a Recluster object that reclusters a jet into a new jet using a generic JetDefinition. More...
 
 Recluster (JetAlgorithm new_jet_alg, double new_jet_radius, Keep keep_in=keep_only_hardest)
 Constructs a Recluster object that reclusters a jet into a new jet using a JetAlgorithm and its parameters. More...
 
 Recluster (JetAlgorithm new_jet_alg, Keep keep_in=keep_only_hardest)
 constructor with just a jet algorithm, but no jet radius. More...
 
virtual ~Recluster ()
 default dtor
 
void set_acquire_recombiner (bool acquire)
 set whether the reclustering should attempt to acquire a recombiner from the input jet
 
bool acquire_recombiner () const
 returns true if this reclusterer is set to acquire the recombiner from the input jet
 
void set_cambridge_optimisation (bool enabled)
 sets whether to try to optimise reclustering with Cambridge/Aachen algorithms (by not reclustering if the requested C/A reclustering can be obtained by using subjets of an input C/A jet or one composed of multiple C/A pieces from the same clustering sequence). More...
 
void set_cambridge_optimization (bool enabled)
 sets whether to try to optimise reclustering with Cambridge/Aachen algorithms (US spelling!)
 
bool cambridge_optimization ()
 returns true if the reclusterer tries to optimise reclustering with Cambridge/Aachen algorithms
 
bool cambridge_optimisation ()
 
void set_keep (Keep keep_in)
 set the behaviour with regards to keeping all resulting jets or just the hardest. More...
 
Keep keep () const
 returns the current "keep" mode i.e. More...
 
virtual std::string description () const
 class description
 
virtual PseudoJet result (const PseudoJet &jet) const
 runs the reclustering and sets kept and rejected to be the jets of interest (with non-zero rho, they will have been subtracted). More...
 
bool get_new_jets_and_def (const PseudoJet &input_jet, std::vector< PseudoJet > &output_jets) const
 A lower-level method that does the actual work of reclustering the input jet. More...
 
PseudoJet generate_output_jet (std::vector< PseudoJet > &incljets, bool ca_optimisation_used) const
 given a set of inclusive jets and a jet definition used, create the resulting PseudoJet; More...
 
- Public Member Functions inherited from fastjet::FunctionOfPseudoJet< PseudoJet >
 FunctionOfPseudoJet ()
 default ctor
 
virtual ~FunctionOfPseudoJet ()
 default dtor (virtual to allow safe polymorphism)
 
PseudoJet operator() (const PseudoJet &pj) const
 apply the function using the "traditional" () operator. More...
 
std::vector< PseudoJetoperator() (const std::vector< PseudoJet > &pjs) const
 apply the function on a vector of PseudoJet, returning a vector of the results. More...
 

Detailed Description

Recluster a jet's constituents with a new jet definition.

When Recluster is constructed from a JetDefinition, it is that definition that will be used to obtain the new jets. The user may then decide if the recombiner should be the one from that jet definition or if it should be acquired from the jet being processed (the default).

Alternatively, Recluster can be constructed from a jet algorithm and an optional radius. In that case the recombiner is systematically obtained from the jet being processed (unless you call set_acquire_recombiner(false)). If only the jet algorithm is specified, a default radius of max_allowable_R will be assumed if needed.

Recluster has two possible behaviours:

[Note that since the structure of the resulting PseudoJet depends on its usage, this class inherits from FunctionOfPseudoJet<PseudoJet> (including a description) rather than being a full-fledged Transformer]

Definition at line 73 of file Recluster.hh.

Member Enumeration Documentation

the various options for the output of Recluster

Enumerator
keep_only_hardest 

keep only the hardest inclusive jet and return a "standard" jet with an associated ClusterSequence [this will be the default]

keep_all 

keep all the inclusive jets.

result() will join them into a composite jet

Definition at line 76 of file Recluster.hh.

Constructor & Destructor Documentation

fastjet::Recluster::Recluster ( )
inline

default constructor (uses an undefined JetDefinition, and so cannot be used directly).

Definition at line 87 of file Recluster.hh.

fastjet::Recluster::Recluster ( const JetDefinition new_jet_def,
bool  acquire_recombiner_in = false,
Keep  keep_in = keep_only_hardest 
)
inline

Constructs a Recluster object that reclusters a jet into a new jet using a generic JetDefinition.

Parameters
new_jet_defthe jet definition applied to do the reclustering
acquire_recombinerwhen true, the reclustering will guess the recombiner from the input jet instead of the one in new_jet_def. An error is then thrown if no consistent recombiner is found
keep_inRecluster::keep_only_hardest: the result is the hardest inclusive jet after reclustering, returned as a "standard" jet. Recluster::keep_all: the result is a composite jet with the inclusive jets as pieces.

Definition at line 104 of file Recluster.hh.

fastjet::Recluster::Recluster ( JetAlgorithm  new_jet_alg,
double  new_jet_radius,
Keep  keep_in = keep_only_hardest 
)

Constructs a Recluster object that reclusters a jet into a new jet using a JetAlgorithm and its parameters.

Parameters
new_jet_algthe jet algorithm applied to obtain the new clustering
new_jet_radiusthe jet radius
keep_inRecluster::keep_only_hardest: the result is the hardest inclusive jet after reclustering, returned as a "standard" jet. Recluster::keep_all: the result is a composite jet with the inclusive jets as pieces.

This ctor will always acquire the recombiner from the jet being reclustered (it will throw if none can be found). If you wish to use Recluster with an algorithm that requires an extra parameter (like the genkt algorithm), please specify the jet definition fully using the constructor above.

Definition at line 51 of file Recluster.cc.

fastjet::Recluster::Recluster ( JetAlgorithm  new_jet_alg,
Keep  keep_in = keep_only_hardest 
)

constructor with just a jet algorithm, but no jet radius.

If the algorithm requires a jet radius, JetDefinition::max_allowable_R will be used.

Definition at line 55 of file Recluster.cc.

Member Function Documentation

void fastjet::Recluster::set_cambridge_optimisation ( bool  enabled)
inline

sets whether to try to optimise reclustering with Cambridge/Aachen algorithms (by not reclustering if the requested C/A reclustering can be obtained by using subjets of an input C/A jet or one composed of multiple C/A pieces from the same clustering sequence).

By default this is enabled, and should always be correct; disable it to test this statement!

Definition at line 154 of file Recluster.hh.

void fastjet::Recluster::set_keep ( Keep  keep_in)
inline

set the behaviour with regards to keeping all resulting jets or just the hardest.

Definition at line 165 of file Recluster.hh.

Keep fastjet::Recluster::keep ( ) const
inline

returns the current "keep" mode i.e.

whether only the hardest inclusive jet is returned or all of them (see the Keep enum above)

Definition at line 169 of file Recluster.hh.

PseudoJet fastjet::Recluster::result ( const PseudoJet jet) const
virtual

runs the reclustering and sets kept and rejected to be the jets of interest (with non-zero rho, they will have been subtracted).

Normally this will be accessed through the base class's operator().

Parameters
jetthe jet that gets reclustered
Returns
the reclustered jet

Implements fastjet::FunctionOfPseudoJet< PseudoJet >.

Definition at line 87 of file Recluster.cc.

bool fastjet::Recluster::get_new_jets_and_def ( const PseudoJet input_jet,
std::vector< PseudoJet > &  output_jets 
) const

A lower-level method that does the actual work of reclustering the input jet.

The resulting jets are stored in output_jets. The jet definition that has been used can be accessed from the output_jets' ClusterSequence.

Parameters
input_jetthe (input) jet that one wants to recluster
output_jetsinclusive jets resulting from the new clustering

Returns true if the C/A optimisation has been used (this means that generate_output_jet then has to watch out for non-explicit-ghost areas that might be leftover)

Definition at line 108 of file Recluster.cc.

PseudoJet fastjet::Recluster::generate_output_jet ( std::vector< PseudoJet > &  incljets,
bool  ca_optimisation_used 
) const

given a set of inclusive jets and a jet definition used, create the resulting PseudoJet;

If ca_optimisation_used then special care will be taken in deciding whether the final jet can legitimately have an area.

Definition at line 176 of file Recluster.cc.


The documentation for this class was generated from the following files: