AmpTools
Kinematics Class Reference

#include <Kinematics.h>

Public Types

enum  { kMaxParticles = 6 }
 

Public Member Functions

 Kinematics ()
 
 Kinematics (const vector< TLorentzVector > &particleList, float weight=1.0)
 
virtual ~Kinematics ()
 
void setEventID (int eventID)
 
void setParticleList (const vector< TLorentzVector > &particleList)
 
void setWeight (float weight)
 
const vector< TLorentzVector > & particleList () const
 
const TLorentzVector & particle (unsigned int index) const
 
int eventID () const
 
float weight () const
 

Detailed Description

This object contains a simple description of the particle kinematics in a single event. It contains a list of four vectors and a weight (optional) that can be used for a variety of different purposes. The object also has an event identifier that is automatically assigned and is unique.

Note that this class is where one of the few external dependencies in AmpTools resides: it utilizes the TLorentzVector class from CLHEP, which is a convenient mechanism for manipulating four-vectors.

Definition at line 61 of file Kinematics.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

In many applications, fixed-size arrays are used to store kinematic data. Provided a single place to define the maximum number of four- vectors that makeup an event.

Enumerator
kMaxParticles 

Definition at line 104 of file Kinematics.h.

Constructor & Destructor Documentation

◆ Kinematics() [1/2]

Kinematics::Kinematics ( )
inline

The default constructor.

This creates a Kinematics object with a unique identifier and a weight of 1.

Definition at line 72 of file Kinematics.h.

◆ Kinematics() [2/2]

Kinematics::Kinematics ( const vector< TLorentzVector > &  particleList,
float  weight = 1.0 
)
inline

The constructor.

This constructor generates a kinematics object from a vector of TLorentzVector, which is a data type provided by the CLHEP package. A weight can be provided as an optional argument.

Parameters
[in]particleLista vector of TLorentzVector containing the four-momenta of all particles
[in]weight(optional) a weight to apply to this event

Definition at line 87 of file Kinematics.h.

◆ ~Kinematics()

virtual Kinematics::~Kinematics ( )
inlinevirtual

The destructor.

Definition at line 96 of file Kinematics.h.

Member Function Documentation

◆ eventID()

int Kinematics::eventID ( ) const
inline

Get the event ID.

This returns the identifier of the given event.

See also
setEventID

Definition at line 178 of file Kinematics.h.

◆ particle()

const TLorentzVector & Kinematics::particle ( unsigned int  index) const

Get a particular four-vector.

This method returns a TLorentzVector corresponding to the four-momentum of the particle with the designated index.

Parameters
[in]indexindex of the particle
See also
particleList
setParticleList

Definition at line 53 of file Kinematics.cc.

Here is the caller graph for this function:

◆ particleList()

const vector< TLorentzVector > & Kinematics::particleList ( ) const

Get the list of four-vectors for an event.

This method returns a vector of TLorentzVector corresponding to the list of four-vectors for an event.

See also
setParticleList
particle

Definition at line 47 of file Kinematics.cc.

Here is the caller graph for this function:

◆ setEventID()

void Kinematics::setEventID ( int  eventID)
inline

Set the event ID.

Event ID's are assigned at construction time and guaranteed to be unique. However, the user can set the event ID to any integer using this method. The AmpTools framework does not utilize the event ID – it exists for historical reasons.

Parameters
[in]eventIDthe desired event ID
See also
eventID

Definition at line 118 of file Kinematics.h.

◆ setParticleList()

void Kinematics::setParticleList ( const vector< TLorentzVector > &  particleList)

Set the list of particles.

This method will replace the current list of four vectors with the four vectors being passed in an argument to this function call.

Parameters
[in]particleListthe vector of TLorentzVector that describes the kinematics for the event
See also
particle
particleList

Definition at line 67 of file Kinematics.cc.

◆ setWeight()

void Kinematics::setWeight ( float  weight)
inline

Set the weight of an event.

This sets the weight of the event to be something other than 1 (the default). These weights are utilized in any computation of the intensity or normalization integrals.

Parameters
[in]weightthe desired weight
See also
weight

Definition at line 145 of file Kinematics.h.

◆ weight()

float Kinematics::weight ( ) const
inline

Get the weight.

This returns the weight of a given event.

See also
setWeight

Definition at line 187 of file Kinematics.h.

Here is the caller graph for this function:

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