Public Member Functions | Protected Attributes

fastjet::ClusterSequenceStructure Class Reference
[Access to extra information]

Contains any information related to the clustering that should be directly accessible to PseudoJet. More...

#include <ClusterSequenceStructure.hh>

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

List of all members.

Public Member Functions

 ClusterSequenceStructure ()
 default ctor
 ClusterSequenceStructure (const ClusterSequence *cs)
 ctor with initialisation to a given ClusterSequence
virtual ~ClusterSequenceStructure ()
 default (virtual) dtor
virtual std::string description () const
 description
Direct access to the associated ClusterSequence object.

Get access to the associated ClusterSequence (if any)

virtual bool has_associated_cluster_sequence () const
 returns true if there is a valid associated ClusterSequence
virtual const ClusterSequenceassociated_cluster_sequence () const
 get a (const) pointer to the parent ClusterSequence (NULL if inexistent)
virtual const ClusterSequencevalidated_cs () const
 if the jet has a valid associated cluster sequence then return a pointer to it; otherwise throw an error
virtual const
ClusterSequenceAreaBase
validated_csab () const
 if the jet has valid area information then return a pointer to the associated ClusterSequenceAreaBase object; otherwise throw an error
virtual void set_associated_cs (const ClusterSequence *new_cs)
 set the associated csw
Methods for access to information about jet structure

These allow access to jet constituents, and other jet subtructure information.

They only work if the jet is associated with a ClusterSequence.

virtual bool has_partner (const PseudoJet &reference, PseudoJet &partner) const
 check if it has been recombined with another PseudoJet in which case, return its partner through the argument.
virtual bool has_child (const PseudoJet &reference, PseudoJet &child) const
 check if it has been recombined with another PseudoJet in which case, return its child through the argument.
virtual bool has_parents (const PseudoJet &reference, PseudoJet &parent1, PseudoJet &parent2) const
 check if it is the product of a recombination, in which case return the 2 parents through the 'parent1' and 'parent2' arguments.
virtual bool object_in_jet (const PseudoJet &reference, const PseudoJet &jet) const
 check if the reference PseudoJet is contained in the second one passed as argument.
virtual bool has_constituents () const
 return true if the structure supports constituents.
virtual std::vector< PseudoJetconstituents (const PseudoJet &reference) const
 retrieve the constituents.
virtual bool has_exclusive_subjets () const
 return true if the structure supports exclusive_subjets.
virtual std::vector< PseudoJetexclusive_subjets (const PseudoJet &reference, const double &dcut) const
 return a vector of all subjets of the current jet (in the sense of the exclusive algorithm) that would be obtained when running the algorithm with the given dcut.
virtual int n_exclusive_subjets (const PseudoJet &reference, const double &dcut) const
 return the size of exclusive_subjets(...); still n ln n with same coefficient, but marginally more efficient than manually taking exclusive_subjets.size()
virtual std::vector< PseudoJetexclusive_subjets (const PseudoJet &reference, int nsub) const
 return the list of subjets obtained by unclustering the supplied jet down to n subjets (or all constituents if there are fewer than n).
virtual double exclusive_subdmerge (const PseudoJet &reference, int nsub) const
 return the dij that was present in the merging nsub+1 -> nsub subjets inside this jet.
virtual double exclusive_subdmerge_max (const PseudoJet &reference, int nsub) const
 return the maximum dij that occurred in the whole event at the stage that the nsub+1 -> nsub merge of subjets occurred inside this jet.
virtual bool has_area () const
 check if it has a defined area
virtual double area (const PseudoJet &reference) const
 return the jet (scalar) area.
virtual double area_error (const PseudoJet &reference) const
 return the error (uncertainty) associated with the determination of the area of this jet.
virtual PseudoJet area_4vector (const PseudoJet &reference) const
 return the jet 4-vector area.
virtual bool is_pure_ghost (const PseudoJet &reference) const
 true if this jet is made exclusively of ghosts.

Protected Attributes

const ClusterSequence_associated_cs

Detailed Description

Contains any information related to the clustering that should be directly accessible to PseudoJet.

By default, this class implements basic access to the ClusterSequence related to a PseudoJet (like its constituents or its area). But it can be overloaded in order e.g. to give access to the jet substructure.

Definition at line 61 of file ClusterSequenceStructure.hh.


Constructor & Destructor Documentation

fastjet::ClusterSequenceStructure::ClusterSequenceStructure ( const ClusterSequence cs  )  [inline]

ctor with initialisation to a given ClusterSequence

In principle, this is reserved for initialisation by the parent ClusterSequence

Definition at line 70 of file ClusterSequenceStructure.hh.

                                                     {
    set_associated_cs(cs);
  };


Member Function Documentation

bool fastjet::ClusterSequenceStructure::has_partner ( const PseudoJet reference,
PseudoJet partner 
) const [virtual]

check if it has been recombined with another PseudoJet in which case, return its partner through the argument.

Otherwise, 'partner' is set to 0.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 84 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::has_partner(), and validated_cs().

                                                                                              {
  return validated_cs()->has_partner(reference, partner);
}

bool fastjet::ClusterSequenceStructure::has_child ( const PseudoJet reference,
PseudoJet child 
) const [virtual]

check if it has been recombined with another PseudoJet in which case, return its child through the argument.

Otherwise, 'child' is set to 0.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 94 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::has_child(), and validated_cs().

                                                                                          {
  return validated_cs()->has_child(reference, child);
}

bool fastjet::ClusterSequenceStructure::has_parents ( const PseudoJet reference,
PseudoJet parent1,
PseudoJet parent2 
) const [virtual]

check if it is the product of a recombination, in which case return the 2 parents through the 'parent1' and 'parent2' arguments.

Otherwise, set these to 0.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 104 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::has_parents(), and validated_cs().

                                                                                                                  {
  return validated_cs()->has_parents(reference, parent1, parent2);
}

bool fastjet::ClusterSequenceStructure::object_in_jet ( const PseudoJet reference,
const PseudoJet jet 
) const [virtual]

check if the reference PseudoJet is contained in the second one passed as argument.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

false is returned if the 2 PseudoJet do not belong the same ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 113 of file ClusterSequenceStructure.cc.

References fastjet::PseudoJet::associated_cluster_sequence(), fastjet::PseudoJet::has_associated_cluster_sequence(), has_associated_cluster_sequence(), fastjet::ClusterSequence::object_in_jet(), and validated_cs().

                                                                                                  {
  if ((!has_associated_cluster_sequence()) || (!jet.has_associated_cluster_sequence()))
    throw Error("you requested information about the internal structure of a jet, but it is not associated with a ClusterSequence or its associated ClusterSequence has gone out of scope."); 

  if (reference.associated_cluster_sequence() != jet.associated_cluster_sequence()) return false;

  return validated_cs()->object_in_jet(reference, jet);
}

bool fastjet::ClusterSequenceStructure::has_constituents (  )  const [virtual]

return true if the structure supports constituents.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 127 of file ClusterSequenceStructure.cc.

References has_associated_cluster_sequence().

                                                     {
  if (!has_associated_cluster_sequence())
    throw Error("you requested information about the internal structure of a jet, but it is not associated with a ClusterSequence or its associated ClusterSequence has gone out of scope."); 

  return true;
}

vector< PseudoJet > fastjet::ClusterSequenceStructure::constituents ( const PseudoJet reference  )  const [virtual]

retrieve the constituents.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 137 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::constituents(), and validated_cs().

                                                                                        {
  return validated_cs()->constituents(reference);
}

bool fastjet::ClusterSequenceStructure::has_exclusive_subjets (  )  const [virtual]

return true if the structure supports exclusive_subjets.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 145 of file ClusterSequenceStructure.cc.

References has_associated_cluster_sequence().

                                                          {
  if (!has_associated_cluster_sequence())
    throw Error("you requested information about the internal structure of a jet, but it is not associated with a ClusterSequence or its associated ClusterSequence has gone out of scope."); 

  return true;
}

std::vector< PseudoJet > fastjet::ClusterSequenceStructure::exclusive_subjets ( const PseudoJet reference,
const double &  dcut 
) const [virtual]

return a vector of all subjets of the current jet (in the sense of the exclusive algorithm) that would be obtained when running the algorithm with the given dcut.

Time taken is O(m ln m), where m is the number of subjets that are found. If m gets to be of order of the total number of constituents in the jet, this could be substantially slower than just getting that list of constituents.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 163 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::exclusive_subjets(), and validated_cs().

                                                                                                                       {
  return validated_cs()->exclusive_subjets(reference, dcut);
}

int fastjet::ClusterSequenceStructure::n_exclusive_subjets ( const PseudoJet reference,
const double &  dcut 
) const [virtual]

return the size of exclusive_subjets(...); still n ln n with same coefficient, but marginally more efficient than manually taking exclusive_subjets.size()

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 173 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::n_exclusive_subjets(), and validated_cs().

                                                                                                       {
  return validated_cs()->n_exclusive_subjets(reference, dcut);
}

std::vector< PseudoJet > fastjet::ClusterSequenceStructure::exclusive_subjets ( const PseudoJet reference,
int  nsub 
) const [virtual]

return the list of subjets obtained by unclustering the supplied jet down to n subjets (or all constituents if there are fewer than n).

requires n ln n time

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 185 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::exclusive_subjets(), and validated_cs().

                                                                                                            {
  return validated_cs()->exclusive_subjets(reference, nsub);
}

double fastjet::ClusterSequenceStructure::exclusive_subdmerge ( const PseudoJet reference,
int  nsub 
) const [virtual]

return the dij that was present in the merging nsub+1 -> nsub subjets inside this jet.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 194 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::exclusive_subdmerge(), and validated_cs().

                                                                                               {
  return validated_cs()->exclusive_subdmerge(reference, nsub);
}

double fastjet::ClusterSequenceStructure::exclusive_subdmerge_max ( const PseudoJet reference,
int  nsub 
) const [virtual]

return the maximum dij that occurred in the whole event at the stage that the nsub+1 -> nsub merge of subjets occurred inside this jet.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 204 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequence::exclusive_subdmerge_max(), and validated_cs().

                                                                                                   {
  return validated_cs()->exclusive_subdmerge_max(reference, nsub);
}

double fastjet::ClusterSequenceStructure::area ( const PseudoJet reference  )  const [virtual]

return the jet (scalar) area.

throws an Error if there is no support for area in the parent CS

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 231 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequenceAreaBase::area(), and validated_csab().

                                                                     {
  return validated_csab()->area(reference);
}

double fastjet::ClusterSequenceStructure::area_error ( const PseudoJet reference  )  const [virtual]

return the error (uncertainty) associated with the determination of the area of this jet.

throws an Error if there is no support for area in the parent CS

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 238 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequenceAreaBase::area_error(), and validated_csab().

                                                                           {
  return validated_csab()->area_error(reference);
}

PseudoJet fastjet::ClusterSequenceStructure::area_4vector ( const PseudoJet reference  )  const [virtual]

return the jet 4-vector area.

throws an Error if there is no support for area in the parent CS

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 244 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequenceAreaBase::area_4vector(), and validated_csab().

                                                                                {
  return validated_csab()->area_4vector(reference);
}

bool fastjet::ClusterSequenceStructure::is_pure_ghost ( const PseudoJet reference  )  const [virtual]

true if this jet is made exclusively of ghosts.

throws an Error if there is no support for area in the parent CS

Reimplemented from fastjet::PseudoJetStructureBase.

Definition at line 250 of file ClusterSequenceStructure.cc.

References fastjet::ClusterSequenceAreaBase::is_pure_ghost(), and validated_csab().

                                                                            {
  return validated_csab()->is_pure_ghost(reference);
}


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