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__
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 double area(const PseudoJet &reference) const override
return the jet (scalar) area.
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.
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...
virtual std::vector< PseudoJet > pieces(const PseudoJet &reference) const override
retrieve the pieces building the jet.
virtual bool has_associated_cluster_sequence() const override
returns true if there is an associated ClusterSequence
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 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 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 const ClusterSequence * associated_cluster_sequence() const override
get a (const) pointer to the parent ClusterSequence (NULL if inexistent)
virtual bool has_constituents() const override
return true if the structure supports constituents.
virtual std::string description() const override
description
virtual bool has_valid_cluster_sequence() const override
returns true if this PseudoJet has an associated and still valid ClusterSequence.
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 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...
virtual std::vector< PseudoJet > constituents(const PseudoJet &reference) const override
retrieve the constituents.
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 double area_error(const PseudoJet &reference) const override
return the error (uncertainty) associated with the determination of the area of this jet.
virtual bool has_area() const override
check if it has a defined area
virtual bool is_pure_ghost(const PseudoJet &reference) const override
true if this jet is made exclusively of ghosts.
virtual const ClusterSequenceAreaBase * validated_csab() const override
if the jet has valid area information then return a pointer to the associated ClusterSequenceAreaBase...
SharedPtr< PseudoJetStructureBase > _structure
the wrapped structure
virtual bool has_exclusive_subjets() const override
return true if the structure supports exclusive_subjets.
WrappedStructure(const SharedPtr< PseudoJetStructureBase > &to_be_shared)
default ctor the argument is the structure we need to wrap
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 bool has_pieces(const PseudoJet &reference) const override
return true if the structure supports pieces.