FastJet 3.4.1
Classes | Public Member Functions | List of all members
fastjet::PseudoJet Class Reference

Class to contain pseudojets, including minimal information of use to jet-clustering routines. More...

#include <fastjet/PseudoJet.hh>

Collaboration diagram for fastjet::PseudoJet:
Collaboration graph
[legend]

Classes

class  InexistentUserInfo
 error class to be thrown if accessing user info when it doesn't exist More...
 
class  UserInfoBase
 a base class to hold extra user information in a PseudoJet More...
 

Public Member Functions

template<>
 PseudoJet (const siscone::Cmomentum &four_vector)
 shortcut for converting siscone Cmomentum into PseudoJet More...
 
template<>
 PseudoJet (const siscone_spherical::CSphmomentum &four_vector)
 shortcut for converting siscone CSphmomentum into PseudoJet More...
 
Constructors and destructor
 PseudoJet ()
 default constructor, which as of FJ3.0 provides an object for which all operations are now valid and which has zero momentum More...
 
 PseudoJet (const double px, const double py, const double pz, const double E)
 construct a pseudojet from explicit components More...
 
template<class L >
 PseudoJet (const L &some_four_vector)
 constructor from any object that has px,py,pz,E = some_four_vector[0–3], More...
 
 PseudoJet (bool)
 
virtual ~PseudoJet ()
 default (virtual) destructor More...
 
Kinematic modification functions
PseudoJetboost (const PseudoJet &prest)
 transform this jet (given in the rest frame of prest) into a jet in the lab frame More...
 
PseudoJetunboost (const PseudoJet &prest)
 transform this jet (given in lab) into a jet in the rest frame of prest More...
 
PseudoJetoperator*= (double)
 multiply the jet's momentum by the coefficient More...
 
PseudoJetoperator/= (double)
 divide the jet's momentum by the coefficient More...
 
PseudoJetoperator+= (const PseudoJet &)
 add the other jet's momentum to this jet More...
 
PseudoJetoperator-= (const PseudoJet &)
 subtract the other jet's momentum from this jet More...
 
void reset (double px, double py, double pz, double E)
 reset the 4-momentum according to the supplied components and put the user and history indices back to their default values More...
 
void reset (const PseudoJet &psjet)
 reset the PseudoJet to be equal to psjet (including its indices); NB if the argument is derived from a PseudoJet then the "reset" used will be the templated version More...
 
template<class L >
void reset (const L &some_four_vector)
 reset the 4-momentum according to the supplied generic 4-vector (accessible via indexing, [0]==px,...[3]==E) and put the user and history indices back to their default values. More...
 
void reset_PtYPhiM (double pt_in, double y_in, double phi_in, double m_in=0.0)
 reset the PseudoJet according to the specified pt, rapidity, azimuth and mass (also resetting indices, etc.) (phi should satisfy -2pi<phi<4pi) More...
 
void reset_momentum (double px, double py, double pz, double E)
 reset the 4-momentum according to the supplied components but leave all other information (indices, user info, etc.) untouched More...
 
void reset_momentum (const PseudoJet &pj)
 reset the 4-momentum according to the components of the supplied PseudoJet, including cached components; note that the template version (below) will be called for classes derived from PJ. More...
 
void reset_momentum_PtYPhiM (double pt, double y, double phi, double m=0.0)
 reset the 4-momentum according to the specified pt, rapidity, azimuth and mass (phi should satisfy -2pi<phi<4pi) More...
 
template<class L >
void reset_momentum (const L &some_four_vector)
 reset the 4-momentum according to the supplied generic 4-vector (accessible via indexing, [0]==px,...[3]==E), but leave all other information (indices, user info, etc.) untouched More...
 
void set_cached_rap_phi (double rap, double phi)
 in some cases when setting a 4-momentum, the user/program knows what rapidity and azimuth are associated with that 4-momentum; by calling this routine the user can provide the information directly to the PseudoJet and avoid expensive rap-phi recalculations. More...
 
User index functions

To allow the user to set and access an integer index which can be exploited by the user to associate extra information with a particle/jet (for example pdg id, or an indication of a particle's origin within the user's analysis)

int user_index () const
 return the user_index, More...
 
void set_user_index (const int index)
 set the user_index, intended to allow the user to add simple identifying information to a particle/jet More...
 
User information types and functions

Allows PseudoJet to carry extra user info (as an object derived from UserInfoBase).

void set_user_info (UserInfoBase *user_info_in)
 sets the internal shared pointer to the user information. More...
 
template<class L >
const L & user_info () const
 returns a reference to the dynamic cast conversion of user_info to type L. More...
 
bool has_user_info () const
 returns true if the PseudoJet has user information More...
 
template<class L >
bool has_user_info () const
 returns true if the PseudoJet has user information than can be cast to the template argument type. More...
 
const UserInfoBaseuser_info_ptr () const
 retrieve a pointer to the (const) user information More...
 
const SharedPtr< UserInfoBase > & user_info_shared_ptr () const
 retrieve a (const) shared pointer to the user information More...
 
SharedPtr< UserInfoBase > & user_info_shared_ptr ()
 retrieve a (non-const) shared pointer to the user information; you can use this, for example, to set the shared pointer, eg More...
 
void set_user_info_shared_ptr (const SharedPtr< UserInfoBase > &user_info_in)
 
Description

Since a PseudoJet can have a structure that contains a variety of information, we provide a description that allows one to check exactly what kind of PseudoJet we are dealing with

std::string description () const
 return a string describing what kind of PseudoJet we are dealing with More...
 
Access to the associated ClusterSequence object.

In addition to having kinematic information, jets may contain a reference to an associated ClusterSequence (this is the case, for example, if the jet has been returned by a ClusterSequence member function).

bool has_associated_cluster_sequence () const
 returns true if this PseudoJet has an associated ClusterSequence. More...
 
bool has_associated_cs () const
 shorthand for has_associated_cluster_sequence() More...
 
bool has_valid_cluster_sequence () const
 returns true if this PseudoJet has an associated and still valid(ated) ClusterSequence. More...
 
bool has_valid_cs () const
 shorthand for has_valid_cluster_sequence() More...
 
const ClusterSequenceassociated_cluster_sequence () const
 get a (const) pointer to the parent ClusterSequence (NULL if inexistent) More...
 
const ClusterSequenceassociated_cs () const
 
const ClusterSequencevalidated_cluster_sequence () const
 if the jet has a valid associated cluster sequence then return a pointer to it; otherwise throw an error More...
 
const ClusterSequencevalidated_cs () const
 shorthand for validated_cluster_sequence() More...
 
const ClusterSequenceAreaBasevalidated_cluster_sequence_area_base () const
 if the jet has valid area information then return a pointer to the associated ClusterSequenceAreaBase object; otherwise throw an error More...
 
const ClusterSequenceAreaBasevalidated_csab () const
 shorthand for validated_cluster_sequence_area_base() More...
 
Access to the associated PseudoJetStructureBase object.

In addition to having kinematic information, jets may contain a reference to an associated ClusterSequence (this is the case, for example, if the jet has been returned by a ClusterSequence member function).

void set_structure_shared_ptr (const SharedPtr< PseudoJetStructureBase > &structure_in)
 set the associated structure More...
 
bool has_structure () const
 return true if there is some structure associated with this PseudoJet More...
 
const PseudoJetStructureBasestructure_ptr () const
 return a pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet. More...
 
PseudoJetStructureBasestructure_non_const_ptr ()
 return a non-const pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet. More...
 
const PseudoJetStructureBasevalidated_structure_ptr () const
 return a pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet. More...
 
const SharedPtr< PseudoJetStructureBase > & structure_shared_ptr () const
 return a reference to the shared pointer to the PseudoJetStructureBase associated with this PseudoJet More...
 
template<typename StructureType >
const StructureType & structure () const
 returns a reference to the structure casted to the requested structure type More...
 
template<typename TransformerType >
bool has_structure_of () const
 check if the PseudoJet has the structure resulting from a Transformer (that is, its structure is compatible with a Transformer::StructureType). More...
 
template<typename TransformerType >
const TransformerType::StructureType & structure_of () const
 this is a helper to access any structure created by a Transformer (that is, of type Transformer::StructureType). More...
 
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 (PseudoJet &partner) const
 check if it has been recombined with another PseudoJet in which case, return its partner through the argument. More...
 
virtual bool has_child (PseudoJet &child) const
 check if it has been recombined with another PseudoJet in which case, return its child through the argument. More...
 
virtual bool has_parents (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. More...
 
virtual bool contains (const PseudoJet &constituent) const
 check if the current PseudoJet contains the one passed as argument. More...
 
virtual bool is_inside (const PseudoJet &jet) const
 check if the current PseudoJet is contained in the one passed as argument. More...
 
virtual bool has_constituents () const
 returns true if the PseudoJet has constituents More...
 
virtual std::vector< PseudoJetconstituents () const
 retrieve the constituents. More...
 
virtual bool has_exclusive_subjets () const
 returns true if the PseudoJet has support for exclusive subjets More...
 
std::vector< PseudoJetexclusive_subjets (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. More...
 
int n_exclusive_subjets (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() More...
 
std::vector< PseudoJetexclusive_subjets (int nsub) const
 return the list of subjets obtained by unclustering the supplied jet down to nsub subjets. More...
 
std::vector< PseudoJetexclusive_subjets_up_to (int nsub) const
 return the list of subjets obtained by unclustering the supplied jet down to nsub subjets (or all constituents if there are fewer than nsub). More...
 
double exclusive_subdmerge (int nsub) const
 Returns the dij that was present in the merging nsub+1 -> nsub subjets inside this jet. More...
 
double exclusive_subdmerge_max (int nsub) const
 Returns the maximum dij that occurred in the whole event at the stage that the nsub+1 -> nsub merge of subjets occurred inside this jet. More...
 
virtual bool has_pieces () const
 returns true if a jet has pieces More...
 
virtual std::vector< PseudoJetpieces () const
 retrieve the pieces that make up the jet. More...
 
virtual bool has_area () const
 check if it has a defined area More...
 
virtual double area () const
 return the jet (scalar) area. More...
 
virtual double area_error () const
 return the error (uncertainty) associated with the determination of the area of this jet. More...
 
virtual PseudoJet area_4vector () const
 return the jet 4-vector area. More...
 
virtual bool is_pure_ghost () const
 true if this jet is made exclusively of ghosts. More...
 

Kinematic access functions

enum  {
  X =0 , Y =1 , Z =2 , T =3 ,
  NUM_COORDINATES =4 , SIZE =NUM_COORDINATES
}
 
double E () const
 
double e () const
 
double px () const
 
double py () const
 
double pz () const
 
double phi () const
 returns phi (in the range 0..2pi) More...
 
double phi_std () const
 returns phi in the range -pi..pi More...
 
double phi_02pi () const
 returns phi in the range 0..2pi More...
 
double rap () const
 returns the rapidity or some large value when the rapidity is infinite More...
 
double rapidity () const
 the same as rap() More...
 
double pseudorapidity () const
 returns the pseudo-rapidity or some large value when the rapidity is infinite More...
 
double eta () const
 
double pt2 () const
 returns the squared transverse momentum More...
 
double pt () const
 returns the scalar transverse momentum More...
 
double perp2 () const
 returns the squared transverse momentum More...
 
double perp () const
 returns the scalar transverse momentum More...
 
double kt2 () const
 returns the squared transverse momentum More...
 
double m2 () const
 returns the squared invariant mass // like CLHEP More...
 
double m () const
 returns the invariant mass (If m2() is negative then -sqrt(-m2()) is returned, as in CLHEP) More...
 
double mperp2 () const
 returns the squared transverse mass = kt^2+m^2 More...
 
double mperp () const
 returns the transverse mass = sqrt(kt^2+m^2) More...
 
double mt2 () const
 returns the squared transverse mass = kt^2+m^2 More...
 
double mt () const
 returns the transverse mass = sqrt(kt^2+m^2) More...
 
double modp2 () const
 return the squared 3-vector modulus = px^2+py^2+pz^2 More...
 
double modp () const
 return the 3-vector modulus = sqrt(px^2+py^2+pz^2) More...
 
double Et () const
 return the transverse energy More...
 
double Et2 () const
 return the transverse energy squared More...
 
double cos_theta () const
 cos of the polar angle should we have: min(1.0,max(-1.0,_pz/sqrt(modp2())));
More...
 
double theta () const
 polar angle More...
 
double operator() (int i) const
 returns component i, where X==0, Y==1, Z==2, E==3 More...
 
double operator[] (int i) const
 returns component i, where X==0, Y==1, Z==2, E==3 More...
 
double kt_distance (const PseudoJet &other) const
 returns kt distance (R=1) between this jet and another More...
 
double plain_distance (const PseudoJet &other) const
 returns squared cylinder (rap-phi) distance between this jet and another More...
 
double squared_distance (const PseudoJet &other) const
 returns squared cylinder (rap-phi) distance between this jet and another More...
 
double delta_R (const PseudoJet &other) const
 return the cylinder (rap-phi) distance between this jet and another, $\Delta_R = \sqrt{\Delta y^2 + \Delta \phi^2}$. More...
 
double delta_phi_to (const PseudoJet &other) const
 returns other.phi() - this.phi(), constrained to be in range -pi . More...
 
double beam_distance () const
 returns distance between this jet and the beam More...
 
std::valarray< double > four_mom () const
 return a valarray containing the four-momentum (components 0-2 are 3-mom, component 3 is energy). More...
 

Members mainly intended for internal use

SharedPtr< PseudoJetStructureBase_structure
 
SharedPtr< UserInfoBase_user_info
 
int cluster_hist_index () const
 return the cluster_hist_index, intended to be used by clustering routines. More...
 
void set_cluster_hist_index (const int index)
 set the cluster_hist_index, intended to be used by clustering routines. More...
 
int cluster_sequence_history_index () const
 alternative name for cluster_hist_index() [perhaps more meaningful] More...
 
void set_cluster_sequence_history_index (const int index)
 alternative name for set_cluster_hist_index(...) [perhaps more meaningful] More...
 
PseudoJet operator* (double, const PseudoJet &)
 

Detailed Description

Class to contain pseudojets, including minimal information of use to jet-clustering routines.

Definition at line 68 of file PseudoJet.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 237 of file PseudoJet.hh.

Constructor & Destructor Documentation

◆ PseudoJet() [1/6]

fastjet::PseudoJet::PseudoJet ( )
inline

default constructor, which as of FJ3.0 provides an object for which all operations are now valid and which has zero momentum

Definition at line 82 of file PseudoJet.hh.

◆ PseudoJet() [2/6]

fastjet::PseudoJet::PseudoJet ( const double  px,
const double  py,
const double  pz,
const double  E 
)

construct a pseudojet from explicit components

Definition at line 53 of file PseudoJet.cc.

◆ PseudoJet() [3/6]

template<class L >
fastjet::PseudoJet::PseudoJet ( const L &  some_four_vector)
inline

constructor from any object that has px,py,pz,E = some_four_vector[0–3],

Definition at line 1036 of file PseudoJet.hh.

◆ PseudoJet() [4/6]

fastjet::PseudoJet::PseudoJet ( bool  )
inline

Definition at line 96 of file PseudoJet.hh.

◆ ~PseudoJet()

virtual fastjet::PseudoJet::~PseudoJet ( )
inlinevirtual

default (virtual) destructor

Definition at line 104 of file PseudoJet.hh.

◆ PseudoJet() [5/6]

template<>
fastjet::PseudoJet::PseudoJet ( const siscone::Cmomentum &  four_vector)

shortcut for converting siscone Cmomentum into PseudoJet

Definition at line 19 of file SISConePlugin.cc.

◆ PseudoJet() [6/6]

template<>
fastjet::PseudoJet::PseudoJet ( const siscone_spherical::CSphmomentum &  four_vector)

shortcut for converting siscone CSphmomentum into PseudoJet

Definition at line 19 of file SISConeSphericalPlugin.cc.

Member Function Documentation

◆ E()

double fastjet::PseudoJet::E ( ) const
inline

Definition at line 116 of file PseudoJet.hh.

◆ e()

double fastjet::PseudoJet::e ( ) const
inline

Definition at line 117 of file PseudoJet.hh.

◆ px()

double fastjet::PseudoJet::px ( ) const
inline

Definition at line 118 of file PseudoJet.hh.

◆ py()

double fastjet::PseudoJet::py ( ) const
inline

Definition at line 119 of file PseudoJet.hh.

◆ pz()

double fastjet::PseudoJet::pz ( ) const
inline

Definition at line 120 of file PseudoJet.hh.

◆ phi()

double fastjet::PseudoJet::phi ( ) const
inline

returns phi (in the range 0..2pi)

Definition at line 123 of file PseudoJet.hh.

◆ phi_std()

double fastjet::PseudoJet::phi_std ( ) const
inline

returns phi in the range -pi..pi

Definition at line 126 of file PseudoJet.hh.

◆ phi_02pi()

double fastjet::PseudoJet::phi_02pi ( ) const
inline

returns phi in the range 0..2pi

Definition at line 131 of file PseudoJet.hh.

◆ rap()

double fastjet::PseudoJet::rap ( ) const
inline

returns the rapidity or some large value when the rapidity is infinite

Definition at line 138 of file PseudoJet.hh.

◆ rapidity()

double fastjet::PseudoJet::rapidity ( ) const
inline

the same as rap()

Definition at line 144 of file PseudoJet.hh.

◆ pseudorapidity()

double fastjet::PseudoJet::pseudorapidity ( ) const

returns the pseudo-rapidity or some large value when the rapidity is infinite

Definition at line 238 of file PseudoJet.cc.

◆ eta()

double fastjet::PseudoJet::eta ( ) const
inline

Definition at line 149 of file PseudoJet.hh.

◆ pt2()

double fastjet::PseudoJet::pt2 ( ) const
inline

returns the squared transverse momentum

Definition at line 152 of file PseudoJet.hh.

◆ pt()

double fastjet::PseudoJet::pt ( ) const
inline

returns the scalar transverse momentum

Definition at line 154 of file PseudoJet.hh.

◆ perp2()

double fastjet::PseudoJet::perp2 ( ) const
inline

returns the squared transverse momentum

Definition at line 156 of file PseudoJet.hh.

◆ perp()

double fastjet::PseudoJet::perp ( ) const
inline

returns the scalar transverse momentum

Definition at line 158 of file PseudoJet.hh.

◆ kt2()

double fastjet::PseudoJet::kt2 ( ) const
inline

returns the squared transverse momentum

Definition at line 160 of file PseudoJet.hh.

◆ m2()

double fastjet::PseudoJet::m2 ( ) const
inline

returns the squared invariant mass // like CLHEP

Definition at line 163 of file PseudoJet.hh.

◆ m()

double fastjet::PseudoJet::m ( ) const
inline

returns the invariant mass (If m2() is negative then -sqrt(-m2()) is returned, as in CLHEP)

Definition at line 1064 of file PseudoJet.hh.

◆ mperp2()

double fastjet::PseudoJet::mperp2 ( ) const
inline

returns the squared transverse mass = kt^2+m^2

Definition at line 169 of file PseudoJet.hh.

◆ mperp()

double fastjet::PseudoJet::mperp ( ) const
inline

returns the transverse mass = sqrt(kt^2+m^2)

Definition at line 171 of file PseudoJet.hh.

◆ mt2()

double fastjet::PseudoJet::mt2 ( ) const
inline

returns the squared transverse mass = kt^2+m^2

Definition at line 173 of file PseudoJet.hh.

◆ mt()

double fastjet::PseudoJet::mt ( ) const
inline

returns the transverse mass = sqrt(kt^2+m^2)

Definition at line 175 of file PseudoJet.hh.

◆ modp2()

double fastjet::PseudoJet::modp2 ( ) const
inline

return the squared 3-vector modulus = px^2+py^2+pz^2

Definition at line 178 of file PseudoJet.hh.

◆ modp()

double fastjet::PseudoJet::modp ( ) const
inline

return the 3-vector modulus = sqrt(px^2+py^2+pz^2)

Definition at line 180 of file PseudoJet.hh.

◆ Et()

double fastjet::PseudoJet::Et ( ) const
inline

return the transverse energy

Definition at line 183 of file PseudoJet.hh.

◆ Et2()

double fastjet::PseudoJet::Et2 ( ) const
inline

return the transverse energy squared

Definition at line 185 of file PseudoJet.hh.

◆ cos_theta()

double fastjet::PseudoJet::cos_theta ( ) const
inline

cos of the polar angle should we have: min(1.0,max(-1.0,_pz/sqrt(modp2())));

Definition at line 189 of file PseudoJet.hh.

◆ theta()

double fastjet::PseudoJet::theta ( ) const
inline

polar angle

Definition at line 193 of file PseudoJet.hh.

◆ operator()()

double fastjet::PseudoJet::operator() ( int  i) const

returns component i, where X==0, Y==1, Z==2, E==3

Definition at line 218 of file PseudoJet.cc.

◆ operator[]()

double fastjet::PseudoJet::operator[] ( int  i) const
inline

returns component i, where X==0, Y==1, Z==2, E==3

Definition at line 198 of file PseudoJet.hh.

◆ kt_distance()

double fastjet::PseudoJet::kt_distance ( const PseudoJet other) const

returns kt distance (R=1) between this jet and another

Definition at line 475 of file PseudoJet.cc.

◆ plain_distance()

double fastjet::PseudoJet::plain_distance ( const PseudoJet other) const

returns squared cylinder (rap-phi) distance between this jet and another

Definition at line 488 of file PseudoJet.cc.

◆ squared_distance()

double fastjet::PseudoJet::squared_distance ( const PseudoJet other) const
inline

returns squared cylinder (rap-phi) distance between this jet and another

Definition at line 209 of file PseudoJet.hh.

◆ delta_R()

double fastjet::PseudoJet::delta_R ( const PseudoJet other) const
inline

return the cylinder (rap-phi) distance between this jet and another, $\Delta_R = \sqrt{\Delta y^2 + \Delta \phi^2}$.

Definition at line 214 of file PseudoJet.hh.

◆ delta_phi_to()

double fastjet::PseudoJet::delta_phi_to ( const PseudoJet other) const

returns other.phi() - this.phi(), constrained to be in range -pi .

returns other.phi() - this.phi(), i.e.

. pi

the phi distance to other, constrained to be in range -pi .. pi

Definition at line 498 of file PseudoJet.cc.

◆ beam_distance()

double fastjet::PseudoJet::beam_distance ( ) const
inline

returns distance between this jet and the beam

Definition at line 228 of file PseudoJet.hh.

◆ four_mom()

valarray< double > fastjet::PseudoJet::four_mom ( ) const

return a valarray containing the four-momentum (components 0-2 are 3-mom, component 3 is energy).

Definition at line 206 of file PseudoJet.cc.

◆ boost()

PseudoJet & fastjet::PseudoJet::boost ( const PseudoJet prest)

transform this jet (given in the rest frame of prest) into a jet in the lab frame

transform this jet (given in the rest frame of prest) into a jet in the lab frame

Definition at line 376 of file PseudoJet.cc.

◆ unboost()

PseudoJet & fastjet::PseudoJet::unboost ( const PseudoJet prest)

transform this jet (given in lab) into a jet in the rest frame of prest

transform this jet (given in lab) into a jet in the rest frame of prest

Definition at line 403 of file PseudoJet.cc.

◆ operator*=()

PseudoJet & fastjet::PseudoJet::operator*= ( double  coeff)

multiply the jet's momentum by the coefficient

Definition at line 295 of file PseudoJet.cc.

◆ operator/=()

PseudoJet & fastjet::PseudoJet::operator/= ( double  coeff)

divide the jet's momentum by the coefficient

Definition at line 315 of file PseudoJet.cc.

◆ operator+=()

PseudoJet & fastjet::PseudoJet::operator+= ( const PseudoJet other_jet)

add the other jet's momentum to this jet

Definition at line 323 of file PseudoJet.cc.

◆ operator-=()

PseudoJet & fastjet::PseudoJet::operator-= ( const PseudoJet other_jet)

subtract the other jet's momentum from this jet

Definition at line 335 of file PseudoJet.cc.

◆ reset() [1/3]

void fastjet::PseudoJet::reset ( double  px,
double  py,
double  pz,
double  E 
)
inline

reset the 4-momentum according to the supplied components and put the user and history indices back to their default values

Definition at line 1070 of file PseudoJet.hh.

◆ reset() [2/3]

void fastjet::PseudoJet::reset ( const PseudoJet psjet)
inline

reset the PseudoJet to be equal to psjet (including its indices); NB if the argument is derived from a PseudoJet then the "reset" used will be the templated version

Note: this is included on top of the templated version because PseudoJet is not "derived" from PseudoJet, so the templated reset would not handle this case properly.

Definition at line 299 of file PseudoJet.hh.

◆ reset() [3/3]

template<class L >
void fastjet::PseudoJet::reset ( const L &  some_four_vector)
inline

reset the 4-momentum according to the supplied generic 4-vector (accessible via indexing, [0]==px,...[3]==E) and put the user and history indices back to their default values.

Definition at line 307 of file PseudoJet.hh.

◆ reset_PtYPhiM()

void fastjet::PseudoJet::reset_PtYPhiM ( double  pt_in,
double  y_in,
double  phi_in,
double  m_in = 0.0 
)
inline

reset the PseudoJet according to the specified pt, rapidity, azimuth and mass (also resetting indices, etc.) (phi should satisfy -2pi<phi<4pi)

Definition at line 333 of file PseudoJet.hh.

◆ reset_momentum() [1/3]

void fastjet::PseudoJet::reset_momentum ( double  px,
double  py,
double  pz,
double  E 
)
inline

reset the 4-momentum according to the supplied components but leave all other information (indices, user info, etc.) untouched

Definition at line 1080 of file PseudoJet.hh.

◆ reset_momentum() [2/3]

void fastjet::PseudoJet::reset_momentum ( const PseudoJet pj)
inline

reset the 4-momentum according to the components of the supplied PseudoJet, including cached components; note that the template version (below) will be called for classes derived from PJ.

Definition at line 1088 of file PseudoJet.hh.

◆ reset_momentum_PtYPhiM()

void fastjet::PseudoJet::reset_momentum_PtYPhiM ( double  pt,
double  y,
double  phi,
double  m = 0.0 
)

reset the 4-momentum according to the specified pt, rapidity, azimuth and mass (phi should satisfy -2pi<phi<4pi)

Definition at line 444 of file PseudoJet.cc.

◆ reset_momentum() [3/3]

template<class L >
void fastjet::PseudoJet::reset_momentum ( const L &  some_four_vector)
inline

reset the 4-momentum according to the supplied generic 4-vector (accessible via indexing, [0]==px,...[3]==E), but leave all other information (indices, user info, etc.) untouched

Definition at line 356 of file PseudoJet.hh.

◆ set_cached_rap_phi()

void fastjet::PseudoJet::set_cached_rap_phi ( double  rap,
double  phi 
)

in some cases when setting a 4-momentum, the user/program knows what rapidity and azimuth are associated with that 4-momentum; by calling this routine the user can provide the information directly to the PseudoJet and avoid expensive rap-phi recalculations.

  • Parameters
    raprapidity
  • Parameters
    phi(in range -twopi...4*pi)
    USE WITH CAUTION: there are no checks that the rapidity and azimuth supplied are sensible, nor does this reset the 4-momentum components if things don't match.

Definition at line 434 of file PseudoJet.cc.

◆ user_index()

int fastjet::PseudoJet::user_index ( ) const
inline

return the user_index,

Definition at line 389 of file PseudoJet.hh.

◆ set_user_index()

void fastjet::PseudoJet::set_user_index ( const int  index)
inline

set the user_index, intended to allow the user to add simple identifying information to a particle/jet

Definition at line 392 of file PseudoJet.hh.

◆ set_user_info()

void fastjet::PseudoJet::set_user_info ( UserInfoBase user_info_in)
inline

sets the internal shared pointer to the user information.

Note that the PseudoJet will now own the pointer, and delete the corresponding object when it (the jet, and any copies of the jet) goes out of scope.

Definition at line 445 of file PseudoJet.hh.

◆ user_info()

template<class L >
const L & fastjet::PseudoJet::user_info ( ) const
inline

returns a reference to the dynamic cast conversion of user_info to type L.

Usage: suppose you have previously set the user info with a pointer to an object of type MyInfo,

class MyInfo: public PseudoJet::UserInfoBase { MyInfo(int id) : _pdg_id(id); int pdg_id() const {return _pdg_id;} int _pdg_id; };

PseudoJet particle(...); particle.set_user_info(new MyInfo(its_pdg_id));

Then you would access that pdg_id() as

particle.user_info<MyInfo>().pdg_id();

It's overkill for just a single integer, but scales easily to more extensive information.

Note that user_info() throws an InexistentUserInfo() error if there is no user info; throws a std::bad_cast if the conversion doesn't work

If this behaviour does not fit your needs, use instead the the user_info_ptr() or user_info_shared_ptr() member functions.

Definition at line 478 of file PseudoJet.hh.

◆ has_user_info() [1/2]

bool fastjet::PseudoJet::has_user_info ( ) const
inline

returns true if the PseudoJet has user information

Definition at line 484 of file PseudoJet.hh.

◆ has_user_info() [2/2]

template<class L >
bool fastjet::PseudoJet::has_user_info ( ) const
inline

returns true if the PseudoJet has user information than can be cast to the template argument type.

Definition at line 491 of file PseudoJet.hh.

◆ user_info_ptr()

const UserInfoBase * fastjet::PseudoJet::user_info_ptr ( ) const
inline

retrieve a pointer to the (const) user information

Definition at line 496 of file PseudoJet.hh.

◆ user_info_shared_ptr() [1/2]

const SharedPtr< UserInfoBase > & fastjet::PseudoJet::user_info_shared_ptr ( ) const
inline

retrieve a (const) shared pointer to the user information

Definition at line 505 of file PseudoJet.hh.

◆ user_info_shared_ptr() [2/2]

SharedPtr< UserInfoBase > & fastjet::PseudoJet::user_info_shared_ptr ( )
inline

retrieve a (non-const) shared pointer to the user information; you can use this, for example, to set the shared pointer, eg

p2.user_info_shared_ptr() = p1.user_info_shared_ptr();

or

SharedPtr<PseudoJet::UserInfoBase> info_shared(new MyInfo(...));
p2.user_info_shared_ptr() = info_shared;
An implementation of shared pointers that is broadly similar to C++11 shared_ptr (https://en....
Definition: SharedPtr.hh:341

Definition at line 522 of file PseudoJet.hh.

◆ set_user_info_shared_ptr()

void fastjet::PseudoJet::set_user_info_shared_ptr ( const SharedPtr< UserInfoBase > &  user_info_in)
inline

Definition at line 526 of file PseudoJet.hh.

◆ description()

string fastjet::PseudoJet::description ( ) const

return a string describing what kind of PseudoJet we are dealing with

Definition at line 506 of file PseudoJet.cc.

◆ has_associated_cluster_sequence()

bool fastjet::PseudoJet::has_associated_cluster_sequence ( ) const

returns true if this PseudoJet has an associated ClusterSequence.

Definition at line 527 of file PseudoJet.cc.

◆ has_associated_cs()

bool fastjet::PseudoJet::has_associated_cs ( ) const
inline

shorthand for has_associated_cluster_sequence()

Definition at line 558 of file PseudoJet.hh.

◆ has_valid_cluster_sequence()

bool fastjet::PseudoJet::has_valid_cluster_sequence ( ) const

returns true if this PseudoJet has an associated and still valid(ated) ClusterSequence.

Definition at line 544 of file PseudoJet.cc.

◆ has_valid_cs()

bool fastjet::PseudoJet::has_valid_cs ( ) const
inline

shorthand for has_valid_cluster_sequence()

Definition at line 564 of file PseudoJet.hh.

◆ associated_cluster_sequence()

const ClusterSequence * fastjet::PseudoJet::associated_cluster_sequence ( ) const

get a (const) pointer to the parent ClusterSequence (NULL if inexistent)

Definition at line 534 of file PseudoJet.cc.

◆ associated_cs()

const ClusterSequence * fastjet::PseudoJet::associated_cs ( ) const
inline

Definition at line 570 of file PseudoJet.hh.

◆ validated_cluster_sequence()

const ClusterSequence * fastjet::PseudoJet::validated_cluster_sequence ( ) const
inline

if the jet has a valid associated cluster sequence then return a pointer to it; otherwise throw an error

Definition at line 574 of file PseudoJet.hh.

◆ validated_cs()

const ClusterSequence * fastjet::PseudoJet::validated_cs ( ) const

shorthand for validated_cluster_sequence()

Definition at line 554 of file PseudoJet.cc.

◆ validated_cluster_sequence_area_base()

const ClusterSequenceAreaBase * fastjet::PseudoJet::validated_cluster_sequence_area_base ( ) const
inline

if the jet has valid area information then return a pointer to the associated ClusterSequenceAreaBase object; otherwise throw an error

Definition at line 583 of file PseudoJet.hh.

◆ validated_csab()

const ClusterSequenceAreaBase * fastjet::PseudoJet::validated_csab ( ) const

shorthand for validated_cluster_sequence_area_base()

Definition at line 800 of file PseudoJet.cc.

◆ set_structure_shared_ptr()

void fastjet::PseudoJet::set_structure_shared_ptr ( const SharedPtr< PseudoJetStructureBase > &  structure_in)

set the associated structure

Definition at line 561 of file PseudoJet.cc.

◆ has_structure()

bool fastjet::PseudoJet::has_structure ( ) const

return true if there is some structure associated with this PseudoJet

Definition at line 571 of file PseudoJet.cc.

◆ structure_ptr()

const PseudoJetStructureBase * fastjet::PseudoJet::structure_ptr ( ) const

return a pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet.

return NULL if there is no associated structure

Definition at line 580 of file PseudoJet.cc.

◆ structure_non_const_ptr()

PseudoJetStructureBase * fastjet::PseudoJet::structure_non_const_ptr ( )

return a non-const pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet.

return NULL if there is no associated structure

Only use this if you know what you are doing. In any case, prefer the 'structure_ptr()' (the const version) to this method, unless you really need a write access to the PseudoJet's underlying structure.

Definition at line 595 of file PseudoJet.cc.

◆ validated_structure_ptr()

const PseudoJetStructureBase * fastjet::PseudoJet::validated_structure_ptr ( ) const

return a pointer to the structure (of type PseudoJetStructureBase*) associated with this PseudoJet.

throw an error if there is no associated structure

Definition at line 605 of file PseudoJet.cc.

◆ structure_shared_ptr()

const SharedPtr< PseudoJetStructureBase > & fastjet::PseudoJet::structure_shared_ptr ( ) const

return a reference to the shared pointer to the PseudoJetStructureBase associated with this PseudoJet

Definition at line 614 of file PseudoJet.cc.

◆ structure()

template<typename StructureType >
const StructureType & fastjet::PseudoJet::structure

returns a reference to the structure casted to the requested structure type

If there is no structure associated, an Error is thrown. If the type is not met, a std::bad_cast error is thrown.

Definition at line 1128 of file PseudoJet.hh.

◆ has_structure_of()

template<typename TransformerType >
bool fastjet::PseudoJet::has_structure_of

check if the PseudoJet has the structure resulting from a Transformer (that is, its structure is compatible with a Transformer::StructureType).

If there is no structure, false is returned.

Definition at line 1136 of file PseudoJet.hh.

◆ structure_of()

template<typename TransformerType >
const TransformerType::StructureType & fastjet::PseudoJet::structure_of

this is a helper to access any structure created by a Transformer (that is, of type Transformer::StructureType).

If there is no structure, or if the structure is not compatible with TransformerType, an error is thrown.

Definition at line 1146 of file PseudoJet.hh.

◆ has_partner()

bool fastjet::PseudoJet::has_partner ( 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

Definition at line 626 of file PseudoJet.cc.

◆ has_child()

bool fastjet::PseudoJet::has_child ( 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

Definition at line 637 of file PseudoJet.cc.

◆ has_parents()

bool fastjet::PseudoJet::has_parents ( 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

Definition at line 648 of file PseudoJet.cc.

◆ contains()

bool fastjet::PseudoJet::contains ( const PseudoJet constituent) const
virtual

check if the current PseudoJet contains the one passed as argument.

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

Definition at line 658 of file PseudoJet.cc.

◆ is_inside()

bool fastjet::PseudoJet::is_inside ( const PseudoJet jet) const
virtual

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

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

Definition at line 668 of file PseudoJet.cc.

◆ has_constituents()

bool fastjet::PseudoJet::has_constituents ( ) const
virtual

returns true if the PseudoJet has constituents

Definition at line 675 of file PseudoJet.cc.

◆ constituents()

vector< PseudoJet > fastjet::PseudoJet::constituents ( ) const
virtual

retrieve the constituents.

an Error is thrown if this PseudoJet has no currently valid associated ClusterSequence or other substructure information

Definition at line 681 of file PseudoJet.cc.

◆ has_exclusive_subjets()

bool fastjet::PseudoJet::has_exclusive_subjets ( ) const
virtual

returns true if the PseudoJet has support for exclusive subjets

Definition at line 688 of file PseudoJet.cc.

◆ exclusive_subjets() [1/2]

std::vector< PseudoJet > fastjet::PseudoJet::exclusive_subjets ( 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.

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

Definition at line 704 of file PseudoJet.cc.

◆ n_exclusive_subjets()

int fastjet::PseudoJet::n_exclusive_subjets ( 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()

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

Definition at line 715 of file PseudoJet.cc.

◆ exclusive_subjets() [2/2]

std::vector< PseudoJet > fastjet::PseudoJet::exclusive_subjets ( int  nsub) const

return the list of subjets obtained by unclustering the supplied jet down to nsub subjets.

Throws an error if there are fewer than nsub particles in the jet.

For ClusterSequence type jets, requires nsub ln nsub time

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

Definition at line 735 of file PseudoJet.cc.

◆ exclusive_subjets_up_to()

std::vector< PseudoJet > fastjet::PseudoJet::exclusive_subjets_up_to ( int  nsub) const

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

For ClusterSequence type jets, requires nsub ln nsub time

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

Definition at line 728 of file PseudoJet.cc.

◆ exclusive_subdmerge()

double fastjet::PseudoJet::exclusive_subdmerge ( int  nsub) const

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

Returns 0 if there were nsub or fewer constituents in the jet.

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

Definition at line 752 of file PseudoJet.cc.

◆ exclusive_subdmerge_max()

double fastjet::PseudoJet::exclusive_subdmerge_max ( int  nsub) const

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

Returns 0 if there were nsub or fewer constituents in the jet.

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

Definition at line 763 of file PseudoJet.cc.

◆ has_pieces()

bool fastjet::PseudoJet::has_pieces ( ) const
virtual

returns true if a jet has pieces

By default a single particle or a jet coming from a ClusterSequence have no pieces and this methos will return false.

In practice, this is equivalent to have an structure of type CompositeJetStructure.

Definition at line 772 of file PseudoJet.cc.

◆ pieces()

std::vector< PseudoJet > fastjet::PseudoJet::pieces ( ) const
virtual

retrieve the pieces that make up the jet.

If the jet does not support pieces, an error is throw

Definition at line 781 of file PseudoJet.cc.

◆ has_area()

bool fastjet::PseudoJet::has_area ( ) const
virtual

check if it has a defined area

Definition at line 809 of file PseudoJet.cc.

◆ area()

double fastjet::PseudoJet::area ( ) const
virtual

return the jet (scalar) area.

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

Definition at line 818 of file PseudoJet.cc.

◆ area_error()

double fastjet::PseudoJet::area_error ( ) 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

Definition at line 826 of file PseudoJet.cc.

◆ area_4vector()

PseudoJet fastjet::PseudoJet::area_4vector ( ) const
virtual

return the jet 4-vector area.

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

Definition at line 833 of file PseudoJet.cc.

◆ is_pure_ghost()

bool fastjet::PseudoJet::is_pure_ghost ( ) 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

Definition at line 840 of file PseudoJet.cc.

◆ cluster_hist_index()

int fastjet::PseudoJet::cluster_hist_index ( ) const
inline

return the cluster_hist_index, intended to be used by clustering routines.

Definition at line 834 of file PseudoJet.hh.

◆ set_cluster_hist_index()

void fastjet::PseudoJet::set_cluster_hist_index ( const int  index)
inline

set the cluster_hist_index, intended to be used by clustering routines.

Definition at line 836 of file PseudoJet.hh.

◆ cluster_sequence_history_index()

int fastjet::PseudoJet::cluster_sequence_history_index ( ) const
inline

alternative name for cluster_hist_index() [perhaps more meaningful]

Definition at line 839 of file PseudoJet.hh.

◆ set_cluster_sequence_history_index()

void fastjet::PseudoJet::set_cluster_sequence_history_index ( const int  index)
inline

alternative name for set_cluster_hist_index(...) [perhaps more meaningful]

Definition at line 843 of file PseudoJet.hh.

Friends And Related Function Documentation

◆ operator*

PseudoJet operator* ( double  ,
const PseudoJet  
)
friend

Definition at line 269 of file PseudoJet.cc.

Member Data Documentation

◆ _structure

SharedPtr<PseudoJetStructureBase> fastjet::PseudoJet::_structure
protected

Definition at line 850 of file PseudoJet.hh.

◆ _user_info

SharedPtr<UserInfoBase> fastjet::PseudoJet::_user_info
protected

Definition at line 851 of file PseudoJet.hh.


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