Belle II Software  release-06-00-14
EventShapeContainer Class Reference

Class for collecting the basic objects related to the event shape. More...

#include <EventShapeContainer.h>

Inheritance diagram for EventShapeContainer:
Collaboration diagram for EventShapeContainer:

Public Member Functions

 EventShapeContainer ()
 Default constructor, resets the sphericity matrix.
 
void setSphericityEigenvector (short i, TVector3 eigenvector)
 Sets the i-th sphericity eigenvector. More...
 
void setSphericityEigenvalue (short i, float eigenvalue)
 Sets the i-th sphericity eigenvalue. More...
 
void setFWMoment (short order, float moment)
 Sets the Fox-Wolfram (FW) moment of order n. More...
 
void setThrust (float thrust)
 Sets the thrust of the event. More...
 
void setThrustAxis (TVector3 thrustAxis)
 Sets the thrust axis, normalizing it. More...
 
void setSpherocityAxis (TVector3 spherocityAxis)
 Sets the spherocity axis, normalizing it. More...
 
void setHarmonicMomentThrust (short order, float moment)
 Sets the harmonic moment of order n, calculated using the thrust axis. More...
 
void setHarmonicMomentCollision (short order, float moment)
 Sets the harmonic moment of order n, calculated using the collision axis. More...
 
void setCleoConeThrust (short order, float moment)
 Sets the Cleo cone of order n, calculated using the thrust axis. More...
 
void setCleoConeCollision (short order, float moment)
 Sets the Cleo cone of order n, calculated using the collision axis. More...
 
void setForwardHemisphere4Momentum (TLorentzVector mom)
 Sets the 4-momentum of the forward hemisphere, as defined by the thrust axis. More...
 
void setBackwardHemisphere4Momentum (TLorentzVector mom)
 Sets the 4-momentum of the backward hemisphere, as defined by the thrust axis. More...
 
float getThrust () const
 Returns the thrust. More...
 
TVector3 getThrustAxis () const
 Returns the thrust axis (normalized). More...
 
TVector3 getSpherocityAxis () const
 Returns the spherocity axis (normalized). More...
 
float getSphericityEigenvalue (short i) const
 Returns the i-th sphericity matrix eigenvalue. More...
 
TVector3 getSphericityEigenvector (short i) const
 Returns the i-th sphericity matrix eigenvector. More...
 
float getFWMoment (short order) const
 Returns the Fox-Wolfram moment of a given order. More...
 
float getHarmonicMomentCollision (short order) const
 Returns the harmonic moment of a given order, calculated respect to the beam axis. More...
 
float getHarmonicMomentThrust (short order) const
 Returns the harmonic moment of a given order, calculated respect to the thrust axis. More...
 
float getCleoConeCollision (short order) const
 Returns the Cleo cone of a given order, calculated respect to the beam axis. More...
 
float getCleoConeThrust (short order) const
 Returns the Cleo cone of a given order, calculated respect to the thrust axis. More...
 
TLorentzVector getForwardHemisphere4Momentum () const
 Returns the 4-momentum of the forward hemisphere, as defined by the thrust axis. More...
 
TLorentzVector getBackwardHemisphere4Momentum () const
 Return the 4-momentum of the backward hemisphere, as defined by the thrust axis. More...
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Private Member Functions

 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

Private Attributes

TVector3 m_thrustAxis
 Thrust axis. More...
 
TVector3 m_spherocityAxis
 Spherocity axis. More...
 
TVector3 m_sphericityEigenvector [3]
 Sphericity tensor eigenvectors.
 
float m_sphericityEigenvalue [3] = {0.}
 Sphericity tensor eigenvalues.
 
float m_foxWolframMoments [10] = {0.}
 Fox Wolfram moments up to order 9.
 
float m_thrust = 0
 Thrust value.
 
float m_harmonicMomentsThrust [10] = {0.}
 Harmonic moments up to order 9, calculated respect to the thrust axis.
 
float m_cleoConesThrust [10] = {0.}
 Cleo cones up to order 9, calculated respect to the thrust axis.
 
float m_harmonicMomentsCollision [10] = {0.}
 Harmonic moments up to order 9, calculated respect to the collision axis.
 
float m_cleoConesCollision [10] = {0.}
 Cleo cones up to order 9, calculated respect to the collision axis.
 
TLorentzVector m_forwardHemisphere4Momentum
 Total 4-momentum of the particles in the forward hemisphere.
 
TLorentzVector m_backwardHemisphere4Momentum
 Total 4-momentum of the particles in the backward hemisphere.
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Detailed Description

Class for collecting the basic objects related to the event shape.

This object is written by the EventShapeCalculator module, that stores here the quantities that require long calculations like the FW moments, the sphericity(-like) tensors and the shape axes (like thrust axis or jet axes). These quantities will be then used by the VaribaleManager functions to get the final EventShape variable, which are usually very simple to calculate. For example, the EventShapeCalculator will store here the Fox-Wolfram moments, while the ratios of them will be calculated on fly by the Variable Manager. We prefer this approach rather than storing every event shape variable directly here to keep a reasonably small data object, and making adding more variables easier.

All the quantities are defined and calculated in the center of mass frame.

The Event shape variables stored here can be divided into two classes: axis independent and axis-based. The first one are uniquely defined by the particles in the event, while the latter one require also a reference axis to be calculated.

The axis-independent quantities currently implemented are:

  • sphericity tensor eigenvalues and eigenvectors
  • Fow-Wolfram moments from 0 to 9

The axis-dependent quantities currently implemented are:

  • Harmonic moments from 0 to 9
  • Thrust
  • Cleo cones All these quantities are can be stored in two versions:
  • calculated respect to the e+e- collision axis (defined by the beam parameters)
  • calculated respect to the thrust axis (calculated by the EventShapeCalculator module)

Definition at line 52 of file EventShapeContainer.h.

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ getBackwardHemisphere4Momentum()

TLorentzVector getBackwardHemisphere4Momentum ( ) const
inline

Return the 4-momentum of the backward hemisphere, as defined by the thrust axis.

Returns
TLorentzVector 4-momentum of the particles in the hemisphere

Definition at line 367 of file EventShapeContainer.h.

368  {
370  };
TLorentzVector m_backwardHemisphere4Momentum
Total 4-momentum of the particles in the backward hemisphere.

◆ getCleoConeCollision()

float getCleoConeCollision ( short  order) const
inline

Returns the Cleo cone of a given order, calculated respect to the beam axis.

Parameters
orderOrder of the harmonic moment
Returns
float Cleo cone

Definition at line 330 of file EventShapeContainer.h.

◆ getCleoConeThrust()

float getCleoConeThrust ( short  order) const
inline

Returns the Cleo cone of a given order, calculated respect to the thrust axis.

Parameters
orderOrder of the harmonic moment
Returns
float Cleo cone

Definition at line 344 of file EventShapeContainer.h.

◆ getForwardHemisphere4Momentum()

TLorentzVector getForwardHemisphere4Momentum ( ) const
inline

Returns the 4-momentum of the forward hemisphere, as defined by the thrust axis.

Returns
TLorentzVector 4-momentum of the particles in the hemisphere

Definition at line 358 of file EventShapeContainer.h.

◆ getFWMoment()

float getFWMoment ( short  order) const
inline

Returns the Fox-Wolfram moment of a given order.

Parameters
orderOrder of the FW moment
Returns
float FW moment

Definition at line 287 of file EventShapeContainer.h.

◆ getHarmonicMomentCollision()

float getHarmonicMomentCollision ( short  order) const
inline

Returns the harmonic moment of a given order, calculated respect to the beam axis.

Parameters
orderOrder of the harmonic moment
Returns
float harmonic moment

Definition at line 301 of file EventShapeContainer.h.

◆ getHarmonicMomentThrust()

float getHarmonicMomentThrust ( short  order) const
inline

Returns the harmonic moment of a given order, calculated respect to the thrust axis.

Parameters
orderOrder of the harmonic moment
Returns
float harmonic moment

Definition at line 315 of file EventShapeContainer.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:25
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in RecoTrack, TRGSummary, TrackFitResult, Track, SoftwareTriggerResult, PIDLikelihood, MCParticle, Cluster, and Particle.

Definition at line 362 of file RelationsObject.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getSphericityEigenvalue()

float getSphericityEigenvalue ( short  i) const
inline

Returns the i-th sphericity matrix eigenvalue.

Parameters
ithe number of the eigenvalue (0,1,2)
Returns
float the eigenvalue

Definition at line 255 of file EventShapeContainer.h.

◆ getSphericityEigenvector()

TVector3 getSphericityEigenvector ( short  i) const
inline

Returns the i-th sphericity matrix eigenvector.

Parameters
ithe number of the eigenvalue (0,1,2)
Returns
float the eigenvector

Definition at line 270 of file EventShapeContainer.h.

◆ getSpherocityAxis()

TVector3 getSpherocityAxis ( ) const
inline

Returns the spherocity axis (normalized).

Returns
TVector3 the spherocity axis, normalized

Definition at line 245 of file EventShapeContainer.h.

◆ getThrust()

float getThrust ( ) const
inline

Returns the thrust.

Returns
TVector3 the thrust axis, normalized

Definition at line 227 of file EventShapeContainer.h.

◆ getThrustAxis()

TVector3 getThrustAxis ( ) const
inline

Returns the thrust axis (normalized).

Returns
TVector3 the thrust axis, normalized

Definition at line 236 of file EventShapeContainer.h.

◆ setBackwardHemisphere4Momentum()

void setBackwardHemisphere4Momentum ( TLorentzVector  mom)
inline

Sets the 4-momentum of the backward hemisphere, as defined by the thrust axis.

Parameters
momTLorentzVector 4-momentum of the particles in the backward hemisphere

Definition at line 212 of file EventShapeContainer.h.

◆ setCleoConeCollision()

void setCleoConeCollision ( short  order,
float  moment 
)
inline

Sets the Cleo cone of order n, calculated using the collision axis.

Parameters
orderThe order (0 to 9)
momentThe Cleo cone value

Definition at line 191 of file EventShapeContainer.h.

◆ setCleoConeThrust()

void setCleoConeThrust ( short  order,
float  moment 
)
inline

Sets the Cleo cone of order n, calculated using the thrust axis.

Parameters
orderThe order (0 to 9)
momentThe Cleo cone value

Definition at line 178 of file EventShapeContainer.h.

◆ setForwardHemisphere4Momentum()

void setForwardHemisphere4Momentum ( TLorentzVector  mom)
inline

Sets the 4-momentum of the forward hemisphere, as defined by the thrust axis.

Parameters
momTLorentzVector 4-momentum of the particles in the forward hemisphere

Definition at line 203 of file EventShapeContainer.h.

◆ setFWMoment()

void setFWMoment ( short  order,
float  moment 
)
inline

Sets the Fox-Wolfram (FW) moment of order n.

This is NOT the normalized FW moment (R1, R2...), but the original one.

Parameters
orderThe order (0 to 9)
momentThe Fox-Wolfram moment value

Definition at line 108 of file EventShapeContainer.h.

◆ setHarmonicMomentCollision()

void setHarmonicMomentCollision ( short  order,
float  moment 
)
inline

Sets the harmonic moment of order n, calculated using the collision axis.

Parameters
orderThe order (0 to 9)
momentThe harmonic moment value

Definition at line 165 of file EventShapeContainer.h.

◆ setHarmonicMomentThrust()

void setHarmonicMomentThrust ( short  order,
float  moment 
)
inline

Sets the harmonic moment of order n, calculated using the thrust axis.

Parameters
orderThe order (0 to 9)
momentThe harmonic moment value

Definition at line 152 of file EventShapeContainer.h.

◆ setSphericityEigenvalue()

void setSphericityEigenvalue ( short  i,
float  eigenvalue 
)
inline

Sets the i-th sphericity eigenvalue.

Parameters
ithe order (0,1,2)
eigenvaluethe eigenvalue

Definition at line 95 of file EventShapeContainer.h.

◆ setSphericityEigenvector()

void setSphericityEigenvector ( short  i,
TVector3  eigenvector 
)
inline

Sets the i-th sphericity eigenvector.

Parameters
ithe order (0,1,2)
eigenvectorthe eigenvector

Definition at line 82 of file EventShapeContainer.h.

◆ setSpherocityAxis()

void setSpherocityAxis ( TVector3  spherocityAxis)
inline

Sets the spherocity axis, normalizing it.

Parameters
spherocityAxissperocity axis. Must have magnitude equal to the thrust value.

Definition at line 140 of file EventShapeContainer.h.

◆ setThrust()

void setThrust ( float  thrust)
inline

Sets the thrust of the event.

Parameters
thrustthrust value

Definition at line 120 of file EventShapeContainer.h.

◆ setThrustAxis()

void setThrustAxis ( TVector3  thrustAxis)
inline

Sets the thrust axis, normalizing it.

Parameters
thrustAxisthrust axis.

Definition at line 129 of file EventShapeContainer.h.

Member Data Documentation

◆ m_spherocityAxis

TVector3 m_spherocityAxis
private

Spherocity axis.

It is not normalized, and it's length is the spherocity value

Definition at line 377 of file EventShapeContainer.h.

◆ m_thrustAxis

TVector3 m_thrustAxis
private

Thrust axis.

It is not normalized, and it's length is the thrust value

Definition at line 376 of file EventShapeContainer.h.


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