![]() |
AmpTools
|
#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 |
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.
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.
|
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.
|
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.
[in] | particleList | a 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.
|
inlinevirtual |
The destructor.
Definition at line 96 of file Kinematics.h.
|
inline |
Get the event ID.
This returns the identifier of the given event.
Definition at line 178 of file Kinematics.h.
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.
[in] | index | index of the particle |
Definition at line 53 of file Kinematics.cc.
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.
Definition at line 47 of file Kinematics.cc.
|
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.
[in] | eventID | the desired event ID |
Definition at line 118 of file Kinematics.h.
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.
[in] | particleList | the vector of TLorentzVector that describes the kinematics for the event |
Definition at line 67 of file Kinematics.cc.
|
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.
[in] | weight | the desired weight |
Definition at line 145 of file Kinematics.h.
|
inline |
Get the weight.
This returns the weight of a given event.
Definition at line 187 of file Kinematics.h.