32 #ifndef __FASTJET_WRAPPED_STRUCTURE_HH__ 33 #define __FASTJET_WRAPPED_STRUCTURE_HH__ 35 #include "fastjet/PseudoJetStructureBase.hh" 36 #include "fastjet/Error.hh" 38 FASTJET_BEGIN_NAMESPACE
58 : _structure(to_be_shared){
60 throw Error(
"Trying to construct a wrapped structure around an empty (NULL) structure");
68 return "PseudoJet wrapping the structure ("+_structure->description()+
")";
79 return _structure->has_associated_cluster_sequence();
85 return _structure->associated_cluster_sequence();
91 return _structure->has_valid_cluster_sequence();
97 return _structure->validated_cs();
103 return _structure->validated_csab();
123 return _structure->has_partner(reference, partner);
132 return _structure->has_child(reference, child);
142 return _structure->has_parents(reference, parent1, parent2);
150 const PseudoJet &jet)
const FASTJET_OVERRIDE{
151 return _structure->object_in_jet(reference, jet);
159 return _structure->has_constituents();
166 return _structure->constituents(reference);
171 return _structure->has_exclusive_subjets();
185 const double & dcut)
const FASTJET_OVERRIDE{
186 return _structure->exclusive_subjets(reference, dcut);
195 const double & dcut)
const FASTJET_OVERRIDE{
196 return _structure->n_exclusive_subjets(reference, dcut);
205 int nsub)
const FASTJET_OVERRIDE{
206 return _structure->exclusive_subjets_up_to (reference, nsub);
214 return _structure->exclusive_subdmerge(reference, nsub);
223 return _structure->exclusive_subdmerge_max(reference, nsub);
234 return _structure->has_pieces(reference);
240 virtual std::vector<PseudoJet>
pieces(
const PseudoJet &reference)
const FASTJET_OVERRIDE {
241 return _structure->pieces(reference);
252 return _structure->has_area();
259 return _structure->area(reference);
267 return _structure->area_error(reference);
274 return _structure->area_4vector(reference);
281 return _structure->is_pure_ghost(reference);
290 FASTJET_END_NAMESPACE
292 #endif // __FASTJET_PSEUDOJET_STRUCTURE_BASE_HH__ WrappedStructure(const SharedPtr< PseudoJetStructureBase > &to_be_shared)
default ctor the argument is the structure we need to wrap
virtual std::vector< PseudoJet > exclusive_subjets(const PseudoJet &reference, const double &dcut) const override
return a vector of all subjets of the current jet (in the sense of the exclusive algorithm) that woul...
virtual bool has_child(const PseudoJet &reference, PseudoJet &child) const override
check if it has been recombined with another PseudoJet in which case, return its child through the ar...
virtual PseudoJet area_4vector(const PseudoJet &reference) const override
return the jet 4-vector area.
virtual double exclusive_subdmerge(const PseudoJet &reference, int nsub) const override
return the dij that was present in the merging nsub+1 -> nsub subjets inside this jet...
virtual ~WrappedStructure()
default (virtual) dtor
virtual bool has_area() const override
check if it has a defined area
virtual std::vector< PseudoJet > constituents(const PseudoJet &reference) const override
retrieve the constituents.
virtual bool has_parents(const PseudoJet &reference, PseudoJet &parent1, PseudoJet &parent2) const override
check if it is the product of a recombination, in which case return the 2 parents through the 'parent...
This wraps a (shared) pointer to an underlying structure.
virtual bool has_partner(const PseudoJet &reference, PseudoJet &partner) const override
check if it has been recombined with another PseudoJet in which case, return its partner through the ...
virtual bool has_exclusive_subjets() const override
return true if the structure supports exclusive_subjets.
virtual std::vector< PseudoJet > exclusive_subjets_up_to(const PseudoJet &reference, int nsub) const override
return the list of subjets obtained by unclustering the supplied jet down to n subjets (or all consti...
virtual const ClusterSequence * associated_cluster_sequence() const override
get a (const) pointer to the parent ClusterSequence (NULL if inexistent)
virtual std::string description() const override
description
virtual double area(const PseudoJet &reference) const override
return the jet (scalar) area.
Contains any information related to the clustering that should be directly accessible to PseudoJet...
virtual bool has_valid_cluster_sequence() const override
returns true if this PseudoJet has an associated and still valid ClusterSequence. ...
virtual const ClusterSequence * validated_cs() const override
if the jet has a valid associated cluster sequence then return a pointer to it; otherwise throw an er...
virtual double exclusive_subdmerge_max(const PseudoJet &reference, int nsub) const override
return the maximum dij that occurred in the whole event at the stage that the nsub+1 -> nsub merge of...
base class that sets interface for extensions of ClusterSequence that provide information about the a...
base class corresponding to errors that can be thrown by FastJet
an implementation of C++0x shared pointers (or boost's)
virtual bool has_associated_cluster_sequence() const override
returns true if there is an associated ClusterSequence
virtual const ClusterSequenceAreaBase * validated_csab() const override
if the jet has valid area information then return a pointer to the associated ClusterSequenceAreaBase...
virtual int n_exclusive_subjets(const PseudoJet &reference, const double &dcut) const override
return the size of exclusive_subjets(...); still n ln n with same coefficient, but marginally more ef...
virtual bool object_in_jet(const PseudoJet &reference, const PseudoJet &jet) const override
check if the reference PseudoJet is contained the second one passed as argument.
SharedPtr< PseudoJetStructureBase > _structure
the wrapped structure
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
virtual bool has_constituents() const override
return true if the structure supports constituents.
virtual std::vector< PseudoJet > pieces(const PseudoJet &reference) const override
retrieve the pieces building the jet.
virtual bool has_pieces(const PseudoJet &reference) const override
return true if the structure supports pieces.
virtual double area_error(const PseudoJet &reference) const override
return the error (uncertainty) associated with the determination of the area of this jet...
virtual bool is_pure_ghost(const PseudoJet &reference) const override
true if this jet is made exclusively of ghosts.