Belle II Software development
EventShapeContainer Class Reference

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

#include <EventShapeContainer.h>

Inheritance diagram for EventShapeContainer:
RelationsInterface< BASE >

Public Member Functions

 EventShapeContainer ()
 Default constructor, resets the sphericity matrix.
 
void setSphericityEigenvector (short i, ROOT::Math::XYZVector eigenvector)
 Sets the i-th sphericity eigenvector.
 
void setSphericityEigenvalue (short i, float eigenvalue)
 Sets the i-th sphericity eigenvalue.
 
void setFWMoment (short order, float moment)
 Sets the Fox-Wolfram (FW) moment of order n.
 
void setThrust (float thrust)
 Sets the thrust of the event.
 
void setThrustAxis (ROOT::Math::XYZVector thrustAxis)
 Sets the thrust axis, normalizing it.
 
void setSpherocityAxis (ROOT::Math::XYZVector spherocityAxis)
 Sets the spherocity axis, normalizing it.
 
void setHarmonicMomentThrust (short order, float moment)
 Sets the harmonic moment of order n, calculated using the thrust axis.
 
void setHarmonicMomentCollision (short order, float moment)
 Sets the harmonic moment of order n, calculated using the collision axis.
 
void setCleoConeThrust (short order, float moment)
 Sets the Cleo cone of order n, calculated using the thrust axis.
 
void setCleoConeCollision (short order, float moment)
 Sets the Cleo cone of order n, calculated using the collision axis.
 
void setForwardHemisphere4Momentum (ROOT::Math::PxPyPzEVector mom)
 Sets the 4-momentum of the forward hemisphere, as defined by the thrust axis.
 
void setBackwardHemisphere4Momentum (ROOT::Math::PxPyPzEVector mom)
 Sets the 4-momentum of the backward hemisphere, as defined by the thrust axis.
 
float getThrust () const
 Returns the thrust.
 
ROOT::Math::XYZVector getThrustAxis () const
 Returns the thrust axis (normalized).
 
ROOT::Math::XYZVector getSpherocityAxis () const
 Returns the spherocity axis (normalized).
 
float getSphericityEigenvalue (short i) const
 Returns the i-th sphericity matrix eigenvalue.
 
ROOT::Math::XYZVector getSphericityEigenvector (short i) const
 Returns the i-th sphericity matrix eigenvector.
 
float getFWMoment (short order) const
 Returns the Fox-Wolfram moment of a given order.
 
float getHarmonicMomentCollision (short order) const
 Returns the harmonic moment of a given order, calculated respect to the beam axis.
 
float getHarmonicMomentThrust (short order) const
 Returns the harmonic moment of a given order, calculated respect to the thrust axis.
 
float getCleoConeCollision (short order) const
 Returns the Cleo cone of a given order, calculated respect to the beam axis.
 
float getCleoConeThrust (short order) const
 Returns the Cleo cone of a given order, calculated respect to the thrust axis.
 
ROOT::Math::PxPyPzEVector getForwardHemisphere4Momentum () const
 Returns the 4-momentum of the forward hemisphere, as defined by the thrust axis.
 
ROOT::Math::PxPyPzEVector getBackwardHemisphere4Momentum () const
 Return the 4-momentum of the backward hemisphere, as defined by the thrust axis.
 
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).
 
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).
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
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.
 
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.
 
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.
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
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.
 
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.
 
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.
 
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.
 
virtual std::string getName () const
 Return a short name that describes this object, e.g.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format.
 
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

ROOT::Math::XYZVector m_thrustAxis
 Thrust axis.
 
ROOT::Math::XYZVector m_spherocityAxis
 Spherocity axis.
 
ROOT::Math::XYZVector 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.
 
ROOT::Math::PxPyPzEVector m_forwardHemisphere4Momentum
 Total 4-momentum of the particles in the forward hemisphere.
 
ROOT::Math::PxPyPzEVector 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.

Constructor & Destructor Documentation

◆ EventShapeContainer()

EventShapeContainer ( )
inline

Default constructor, resets the sphericity matrix.

Definition at line 59 of file EventShapeContainer.h.

60 {
61 m_thrustAxis.SetXYZ(0., 0., 0.);
62 m_spherocityAxis.SetXYZ(0., 0., 0.);
63 m_forwardHemisphere4Momentum.SetXYZT(0., 0., 0., 0.);
64 m_backwardHemisphere4Momentum.SetXYZT(0., 0., 0., 0.);
65
66 m_thrustAxis.SetXYZ(0., 0., 0.);
67 for (int i = 0; i < 3; i++)
68 m_sphericityEigenvector[i].SetXYZ(0., 0., 0.);
69 };
ROOT::Math::PxPyPzEVector m_backwardHemisphere4Momentum
Total 4-momentum of the particles in the backward hemisphere.
ROOT::Math::XYZVector m_sphericityEigenvector[3]
Sphericity tensor eigenvectors.
ROOT::Math::XYZVector m_thrustAxis
Thrust axis.
ROOT::Math::PxPyPzEVector m_forwardHemisphere4Momentum
Total 4-momentum of the particles in the forward hemisphere.
ROOT::Math::XYZVector m_spherocityAxis
Spherocity axis.

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.

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
DataStore::StoreEntry * m_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.

◆ 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.

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

◆ 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.

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
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).

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
inlineprotectedinherited

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

Definition at line 418 of file RelationsObject.h.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getBackwardHemisphere4Momentum()

ROOT::Math::PxPyPzEVector getBackwardHemisphere4Momentum ( ) const
inline

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

Returns
PxPyPzEVector of the particles in the hemisphere

Definition at line 367 of file EventShapeContainer.h.

368 {
370 };

◆ 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.

331 {
332 if (order < 0 || order > 9) {
333 B2ERROR("Invalid CLEO cone order. The order must be in the [0,9] range.");
334 return std::numeric_limits<float>::quiet_NaN();
335 } else
336 return m_cleoConesCollision[order];
337 };
float m_cleoConesCollision[10]
Cleo cones up to order 9, calculated respect to the collision axis.

◆ 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.

345 {
346 if (order < 0 || order > 9) {
347 B2ERROR("Invalid CLEO cone order. The order must be in the [0,9] range.");
348 return std::numeric_limits<float>::quiet_NaN();
349 } else
350 return m_cleoConesThrust[order];
351 };
float m_cleoConesThrust[10]
Cleo cones up to order 9, calculated respect to the thrust axis.

◆ getForwardHemisphere4Momentum()

ROOT::Math::PxPyPzEVector getForwardHemisphere4Momentum ( ) const
inline

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

Returns
PxPyPzEVector of the particles in the hemisphere

Definition at line 358 of file EventShapeContainer.h.

359 {
361 };

◆ 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.

288 {
289 if (order < 0 || order > 9) {
290 B2ERROR("Invalid Fox-Wolfram moment order. It must be in the [0,9] range.");
291 return std::numeric_limits<float>::quiet_NaN();
292 } else
293 return m_foxWolframMoments[order];
294 };
float m_foxWolframMoments[10]
Fox Wolfram moments up to order 9.

◆ 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.

302 {
303 if (order < 0 || order > 9) {
304 B2ERROR("Invalid harmonic moment order. It must be in the [0,9] range.");
305 return std::numeric_limits<float>::quiet_NaN();
306 } else
307 return m_harmonicMomentsCollision[order];
308 };
float m_harmonicMomentsCollision[10]
Harmonic moments up to order 9, calculated respect to the collision axis.

◆ 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.

316 {
317 if (order < 0 || order > 9) {
318 B2ERROR("Invalid harmonic moment order. The order must be in the [0,9] range.");
319 return std::numeric_limits<float>::quiet_NaN();
320 } else
321 return m_harmonicMomentsThrust[order];
322 };
float m_harmonicMomentsThrust[10]
Harmonic moments up to order 9, calculated respect to the thrust axis.

◆ 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.

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ 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:24
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 Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, TRGSummary, and RecoTrack.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

◆ 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.

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

◆ 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.

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

◆ 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.

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ 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.

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

◆ 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.

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ 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.

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ 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.

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

◆ 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.

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ 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.

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ 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.

256 {
257 if (i < 0 || i > 2) {
258 B2ERROR("Invalid Eigenvalue number (n = " << i << "). There are only 3 eigenvalues...");
259 return std::numeric_limits<float>::quiet_NaN();
260 } else
261 return m_sphericityEigenvalue[i];
262 };
float m_sphericityEigenvalue[3]
Sphericity tensor eigenvalues.

◆ getSphericityEigenvector()

ROOT::Math::XYZVector 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.

271 {
272 if (i < 0 || i > 2) {
273 B2ERROR("Invalid Eigenvalue number (n = " << i << "). There are only 3 eigenvalues...");
274 return ROOT::Math::XYZVector(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN(),
275 std::numeric_limits<float>::quiet_NaN());
276 } else
277 return m_sphericityEigenvector[i];
278 };

◆ getSpherocityAxis()

ROOT::Math::XYZVector getSpherocityAxis ( ) const
inline

Returns the spherocity axis (normalized).

Returns
XYZVector the spherocity axis, normalized

Definition at line 245 of file EventShapeContainer.h.

246 {
247 return m_spherocityAxis;
248 };

◆ getThrust()

float getThrust ( ) const
inline

Returns the thrust.

Returns
XYZVector the thrust axis, normalized

Definition at line 227 of file EventShapeContainer.h.

228 {
229 return m_thrust;
230 };

◆ getThrustAxis()

ROOT::Math::XYZVector getThrustAxis ( ) const
inline

Returns the thrust axis (normalized).

Returns
XYZVector the thrust axis, normalized

Definition at line 236 of file EventShapeContainer.h.

237 {
238 return m_thrustAxis;
239 };

◆ setBackwardHemisphere4Momentum()

void setBackwardHemisphere4Momentum ( ROOT::Math::PxPyPzEVector  mom)
inline

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

Parameters
momPxPyPzEVector of the particles in the backward hemisphere

Definition at line 212 of file EventShapeContainer.h.

213 {
215 };

◆ 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.

192 {
193 if (order < 0 || order > 9)
194 B2ERROR("Invalid Cleo cone order. It must be in the [0,9] range.");
195 else
196 m_cleoConesCollision[order] = moment;
197 };

◆ 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.

179 {
180 if (order < 0 || order > 9)
181 B2ERROR("Invalid Cleo cone order. It must be in the [0,9] range.");
182 else
183 m_cleoConesThrust[order] = moment;
184 };

◆ setForwardHemisphere4Momentum()

void setForwardHemisphere4Momentum ( ROOT::Math::PxPyPzEVector  mom)
inline

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

Parameters
momPxPyPzEVector of the particles in the forward hemisphere

Definition at line 203 of file EventShapeContainer.h.

204 {
206 };

◆ 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.

109 {
110 if (order < 0 || order > 9)
111 B2ERROR("Invalid Fox-Wolfram moment order (n = " << order << "). The order must be in the [0,9] range.");
112 else
113 m_foxWolframMoments[order] = moment;
114 };

◆ 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.

166 {
167 if (order < 0 || order > 9)
168 B2ERROR("Invalid harmonic moment order. It must be in the [0,9] range.");
169 else
170 m_harmonicMomentsCollision[order] = moment;
171 };

◆ 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.

153 {
154 if (order < 0 || order > 9)
155 B2ERROR("Invalid harmonic moment order. It must be in the [0,9] range.");
156 else
157 m_harmonicMomentsThrust[order] = moment;
158 };

◆ 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.

96 {
97 if (i < 0 || i > 2)
98 B2ERROR("Invalid EigenVector number (n = " << i << "). You can set only 3 eigenvectors.");
99 else
100 m_sphericityEigenvalue[i] = eigenvalue;
101 };

◆ setSphericityEigenvector()

void setSphericityEigenvector ( short  i,
ROOT::Math::XYZVector  eigenvector 
)
inline

Sets the i-th sphericity eigenvector.

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

Definition at line 82 of file EventShapeContainer.h.

83 {
84 if (i < 0 || i > 2)
85 B2ERROR("Invalid EigenVector number (n = " << i << "). You can set only 3 eigenvectors.");
86 else
87 m_sphericityEigenvector[i] = eigenvector;
88 };

◆ setSpherocityAxis()

void setSpherocityAxis ( ROOT::Math::XYZVector  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.

141 {
142 if (spherocityAxis.R() < 1.E-10)
143 B2WARNING("The spherocity axis you are trying to set has magnitude numerically compatible with 0.");
144 m_spherocityAxis = spherocityAxis.Unit();
145 };

◆ setThrust()

void setThrust ( float  thrust)
inline

Sets the thrust of the event.

Parameters
thrustthrust value

Definition at line 120 of file EventShapeContainer.h.

121 {
122 m_thrust = thrust;
123 };

◆ setThrustAxis()

void setThrustAxis ( ROOT::Math::XYZVector  thrustAxis)
inline

Sets the thrust axis, normalizing it.

Parameters
thrustAxisthrust axis.

Definition at line 129 of file EventShapeContainer.h.

130 {
131 if (thrustAxis.R() < 1.E-10)
132 B2WARNING("The thrust axis you are trying to set has magnitude numerically compatible with 0.");
133 m_thrustAxis = thrustAxis.Unit();
134 };

Member Data Documentation

◆ m_backwardHemisphere4Momentum

ROOT::Math::PxPyPzEVector m_backwardHemisphere4Momentum
private

Total 4-momentum of the particles in the backward hemisphere.

Definition at line 393 of file EventShapeContainer.h.

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_cleoConesCollision

float m_cleoConesCollision[10] = {0.}
private

Cleo cones up to order 9, calculated respect to the collision axis.

Definition at line 389 of file EventShapeContainer.h.

◆ m_cleoConesThrust

float m_cleoConesThrust[10] = {0.}
private

Cleo cones up to order 9, calculated respect to the thrust axis.

Definition at line 387 of file EventShapeContainer.h.

◆ m_forwardHemisphere4Momentum

ROOT::Math::PxPyPzEVector m_forwardHemisphere4Momentum
private

Total 4-momentum of the particles in the forward hemisphere.

Definition at line 392 of file EventShapeContainer.h.

◆ m_foxWolframMoments

float m_foxWolframMoments[10] = {0.}
private

Fox Wolfram moments up to order 9.

Definition at line 382 of file EventShapeContainer.h.

◆ m_harmonicMomentsCollision

float m_harmonicMomentsCollision[10] = {0.}
private

Harmonic moments up to order 9, calculated respect to the collision axis.

Definition at line 388 of file EventShapeContainer.h.

◆ m_harmonicMomentsThrust

float m_harmonicMomentsThrust[10] = {0.}
private

Harmonic moments up to order 9, calculated respect to the thrust axis.

Definition at line 386 of file EventShapeContainer.h.

◆ m_sphericityEigenvalue

float m_sphericityEigenvalue[3] = {0.}
private

Sphericity tensor eigenvalues.

Definition at line 381 of file EventShapeContainer.h.

◆ m_sphericityEigenvector

ROOT::Math::XYZVector m_sphericityEigenvector[3]
private

Sphericity tensor eigenvectors.

Definition at line 380 of file EventShapeContainer.h.

◆ m_spherocityAxis

ROOT::Math::XYZVector 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_thrust

float m_thrust = 0
private

Thrust value.

Definition at line 385 of file EventShapeContainer.h.

◆ m_thrustAxis

ROOT::Math::XYZVector 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: