PXL
Public Member Functions | Static Public Member Functions
pxl::Particle Class Reference

This class represents a particle as measured in a high-energy-physics collision. More...

#include <Particle.hh>

+ Inheritance diagram for pxl::Particle:
+ Collaboration diagram for pxl::Particle:

Public Member Functions

void addP4 (double px, double py, double pz, double e)
 Adds the passed four-vector components. More...
 
void addP4 (const LorentzVector &vector)
 Adds the four-vector vector. More...
 
void addP4 (const Particle *particle)
 Adds the four-vector particle. More...
 
void addParticle (const Particle *pa)
 
void addVector (const LorentzVector &vector)
 Adds the four-vector vector. More...
 
void boost (const Basic3Vector &boostvector)
 Boost this particle by a given Basic3Vector. More...
 
void boost (double b_x, double b_y, double b_z)
 Boost this particle by the given boost vector components x,y, and z. More...
 
virtual Serializableclone () const
 Creates a deep copy and returns a C++ pointer to the newly-created object. More...
 
virtual WkPtrBasecreateSelfWkPtr ()
 Creates a weak pointer to itself and returns a pxl::WkPtrBase* to the newly-created weak pointer instance. More...
 
virtual void deserialize (const InputStream &in)
 This method deserializes this object. More...
 
Basic3Vector getBoostVector () const
 Returns the boost vector for this particle. More...
 
double getCharge () const
 Returns the particle charge. More...
 
double getE () const
 Get the E component (energy) of the four-vector. More...
 
double getEt () const
 Get the transverse energy. More...
 
double getEta () const
 Get the pseudorapidity. More...
 
double getMass () const
 Get the mass of the four-vector. More...
 
double getP () const
 Get the absolute momentum of the three-vector. More...
 
int getPdgNumber () const
 Returns the particle PDG number. More...
 
double getPhi () const
 Get the azimuth angle. More...
 
double getPt () const
 Get the transverse momentum. More...
 
double getPx () const
 Get the x component of the four-vector. More...
 
double getPy () const
 Get the y component of the four-vector. More...
 
double getPz () const
 Get the z component of the four-vector. More...
 
double getTheta () const
 Get the polar angle. More...
 
virtual const IdgetTypeId () const
 Returns the unique ID of this class. More...
 
const LorentzVectorgetVector () const
 This method grants read access to the vector. More...
 
LorentzVectorgetVector ()
 This method grants write access to the vector. More...
 
const Particleoperator+= (const Particle &pa)
 Adds vector and charge of pa. More...
 
const Particleoperator-= (const Particle &pa)
 Subtracts vector and charge of pa. More...
 
 Particle ()
 
 Particle (const Particle &original)
 
 Particle (const Particle *original)
 
virtual std::ostream & print (int level=1, std::ostream &os=std::cout, int pan=0) const
 Prints information about this particle to the stream os. More...
 
virtual void serialize (const OutputStream &out) const
 This method serializes this object by serializing the type ID and the unique object ID. More...
 
void setCharge (double v)
 Sets the particle charge to v. More...
 
void setP4 (double px, double py, double pz, double e)
 Set all four-vector components in the (px, py, pz, E) representation. More...
 
void setP4 (const LorentzVector &vector)
 Set the four-vector components to those of vector. More...
 
void setP4FromDaughters ()
 Sets the four-vector to the sum of the four-vectors of all direct daughters. More...
 
void setP4FromDaughtersRecursive ()
 Recursively sets the four-vector to the sum of the four-vectors of all daughters. More...
 
void setPdgNumber (int v)
 Sets the particle PDF number to v. More...
 
void setVector (const LorentzVector &vector)
 Set the four-vector components to those of vector. More...
 
- Public Member Functions inherited from pxl::Object
int getWorkFlag () const
 Returns the value of the workflag. More...
 
bool isLocked () const
 Returns the value of the lock flag. More...
 
 Object ()
 
 Object (const Object &original)
 
 Object (const Object *original)
 
virtual std::ostream & printContent (int level=1, std::ostream &os=std::cout, int pan=0) const
 
void setLocked (bool v)
 Sets the value of the lock flag to v. More...
 
void setWorkFlag (int v)
 Sets the value of the workflag to v. More...
 
- Public Member Functions inherited from pxl::Relative
RelativegetDaughter () const
 Returns the first entry of the daughter relations. More...
 
const RelationsgetDaughterRelations () const
 Grants const access to the pxl::Relations instance managing daughter relations. More...
 
const std::set< Relative * > & getDaughters () const
 Returns all daughter relations. More...
 
const RelationsgetFlatRelations () const
 Grants const access to the pxl::Relations instance managing flat relations. More...
 
RelativegetMother () const
 Returns the first entry of the mother relations. More...
 
const RelationsgetMotherRelations () const
 Grants const access to the Relations instance managing mother relations. More...
 
const std::set< Relative * > & getMothers () const
 Returns all mother relations. More...
 
const std::string & getName () const
 Returns the name. More...
 
const SoftRelationsgetSoftRelations () const
 Get access to the soft relations. More...
 
SoftRelationsgetSoftRelations ()
 Get access to the soft relations. More...
 
Id id () const
 Returns the PXL unique object-id (UUID) More...
 
void linkDaughter (Relative *target)
 Establishes a daughter relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkFlat (Relative *target)
 Establishes a flat relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkMother (Relative *target)
 Establishes a mother relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkSoft (Relative *relative, const std::string &type)
 Create a soft relation with name type to the Relative relative. More...
 
size_t numberOfDaughters () const
 Returns number of daughters. More...
 
size_t numberOfMothers () const
 Returns number of mothers. More...
 
ObjectOwnerowner () const
 Returns a C++ pointer to the pxl::ObjectOwner it is owned by. More...
 
std::ostream & printDecayTree (int level=0, std::ostream &os=std::cout, int pan=1) const
 Recursively invokes its own and the print() methods of all daughter objects. More...
 
void setName (const std::string &v)
 Sets the name to the contents of v. More...
 
void unlinkDaughter (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkDaughters ()
 Removes all existing daughter relations. More...
 
void unlinkFlat (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkFlat ()
 Removes all existing flat relations. More...
 
void unlinkMother (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkMothers ()
 Removes all existing mother relations. More...
 
void unlinkSoft (Relative *relative, const std::string &type)
 Remove a soft relation with name type to the Relative relative. More...
 
virtual ~Relative ()
 Destructor, ensures safe deletion of all hard relations. More...
 
- Public Member Functions inherited from pxl::Serializable
const IdgetId () const
 Returns the unique ID (UUID) of the individual object. More...
 
Serializableoperator= (const Serializable &original)
 Assignment operator, UUID is changed in case this object is changed. More...
 
 Serializable ()
 Constructor. More...
 
 Serializable (const Serializable &original)
 Copy constructor. A copied object gets a new unique ID. More...
 
virtual const std::string toString () const
 Returns a string with the output of the virtual print method. More...
 
virtual ~Serializable ()
 Destructor. More...
 
- Public Member Functions inherited from pxl::UserRecordHelper
void deserialize (const InputStream &in)
 
void eraseUserRecord (const std::string &key)
 
const VariantgetUserRecord (const std::string &key) const
 
template<typename datatype >
bool getUserRecord (const std::string &key, datatype &item) const
 
const UserRecordsgetUserRecords () const
 
UserRecordsgetUserRecords ()
 
bool hasUserRecord (const std::string &key) const
 
void serialize (const OutputStream &out) const
 
void setUserRecord (const std::string &key, const Variant &value)
 
void setUserRecords (const UserRecords &value)
 
- Public Member Functions inherited from pxl::CommonParticle
template<class objecttype >
std::auto_ptr< ParticleHelper
< objecttype > > 
getAs ()
 get auto_ptr to helper class which enables using setters More...
 
virtual ~CommonParticle ()
 

Static Public Member Functions

static const IdgetStaticTypeId ()
 
- Static Public Member Functions inherited from pxl::Object
static const IdgetStaticTypeId ()
 
- Static Public Member Functions inherited from pxl::Relative
static const IdgetStaticTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from pxl::Relative
std::ostream & printPan (std::ostream &os, int pan) const
 Service method for printing relations tree. More...
 
std::ostream & printPan1st (std::ostream &os, int pan) const
 Service method for printing relations tree. More...
 
 Relative ()
 Default constructor. More...
 
 Relative (const Relative &original)
 Copy constructor. Relations are not copied. More...
 
 Relative (const Relative *original)
 Copy constructor. Relations are not copied. More...
 

Detailed Description

This class represents a particle as measured in a high-energy-physics collision.

In addition to the properties inherited from the general PXL object, the particle contains a Lorentz-four-vector, charge and a PDG number. The Lorentz vector is in (px, py, pz, E) representation. Further properties of particles (or similar reconstructed objects) can be added to the contained user records. Furthermore, relations to other object such as other particles and vertices can be established.

Constructor & Destructor Documentation

pxl::Particle::Particle ( )
inline
pxl::Particle::Particle ( const Particle original)
inline
pxl::Particle::Particle ( const Particle original)
inlineexplicit

Member Function Documentation

void pxl::Particle::addP4 ( double  px,
double  py,
double  pz,
double  e 
)
inlinevirtual

Adds the passed four-vector components.

Implements pxl::CommonParticle.

void pxl::Particle::addP4 ( const LorentzVector vector)
inline

Adds the four-vector vector.

void pxl::Particle::addP4 ( const Particle particle)
inline

Adds the four-vector particle.

void pxl::Particle::addParticle ( const Particle pa)
inline
void pxl::Particle::addVector ( const LorentzVector vector)
inline

Adds the four-vector vector.

void pxl::Particle::boost ( const Basic3Vector boostvector)
inline

Boost this particle by a given Basic3Vector.

void pxl::Particle::boost ( double  b_x,
double  b_y,
double  b_z 
)
inline

Boost this particle by the given boost vector components x,y, and z.

virtual Serializable* pxl::Particle::clone ( ) const
inlinevirtual

Creates a deep copy and returns a C++ pointer to the newly-created object.

Reimplemented from pxl::Object.

virtual WkPtrBase* pxl::Particle::createSelfWkPtr ( )
inlinevirtual

Creates a weak pointer to itself and returns a pxl::WkPtrBase* to the newly-created weak pointer instance.

Reimplemented from pxl::Object.

virtual void pxl::Particle::deserialize ( const InputStream in)
inlinevirtual

This method deserializes this object.

When extending this method, derived classes must first call the base class method.

Reimplemented from pxl::Object.

Basic3Vector pxl::Particle::getBoostVector ( ) const
inline

Returns the boost vector for this particle.

double pxl::Particle::getCharge ( ) const
inlinevirtual

Returns the particle charge.

Implements pxl::CommonParticle.

double pxl::Particle::getE ( ) const
inlinevirtual

Get the E component (energy) of the four-vector.

Implements pxl::CommonParticle.

double pxl::Particle::getEt ( ) const
inline

Get the transverse energy.

double pxl::Particle::getEta ( ) const
inlinevirtual

Get the pseudorapidity.

Implements pxl::CommonParticle.

double pxl::Particle::getMass ( ) const
inlinevirtual

Get the mass of the four-vector.

Implements pxl::CommonParticle.

double pxl::Particle::getP ( ) const
inline

Get the absolute momentum of the three-vector.

int pxl::Particle::getPdgNumber ( ) const
inline

Returns the particle PDG number.

double pxl::Particle::getPhi ( ) const
inlinevirtual

Get the azimuth angle.

Implements pxl::CommonParticle.

double pxl::Particle::getPt ( ) const
inlinevirtual

Get the transverse momentum.

Implements pxl::CommonParticle.

double pxl::Particle::getPx ( ) const
inlinevirtual

Get the x component of the four-vector.

Implements pxl::CommonParticle.

double pxl::Particle::getPy ( ) const
inlinevirtual

Get the y component of the four-vector.

Implements pxl::CommonParticle.

double pxl::Particle::getPz ( ) const
inlinevirtual

Get the z component of the four-vector.

Implements pxl::CommonParticle.

static const Id& pxl::Particle::getStaticTypeId ( )
inlinestatic
double pxl::Particle::getTheta ( ) const
inline

Get the polar angle.

virtual const Id& pxl::Particle::getTypeId ( ) const
inlinevirtual

Returns the unique ID of this class.

Reimplemented from pxl::Object.

const LorentzVector& pxl::Particle::getVector ( ) const
inline

This method grants read access to the vector.

LorentzVector& pxl::Particle::getVector ( )
inline

This method grants write access to the vector.

const Particle& pxl::Particle::operator+= ( const Particle pa)
inline

Adds vector and charge of pa.

const Particle& pxl::Particle::operator-= ( const Particle pa)
inline

Subtracts vector and charge of pa.

std::ostream & pxl::Particle::print ( int  level = 1,
std::ostream &  os = std::cout,
int  pan = 0 
) const
virtual

Prints information about this particle to the stream os.

Reimplemented from pxl::Object.

virtual void pxl::Particle::serialize ( const OutputStream out) const
inlinevirtual

This method serializes this object by serializing the type ID and the unique object ID.

When extending this method, derived classes must first call the base class method.

Reimplemented from pxl::Object.

void pxl::Particle::setCharge ( double  v)
inlinevirtual

Sets the particle charge to v.

Implements pxl::CommonParticle.

void pxl::Particle::setP4 ( double  px,
double  py,
double  pz,
double  e 
)
inlinevirtual

Set all four-vector components in the (px, py, pz, E) representation.

Note: Due to consistency reasons, no single setters are present.

Implements pxl::CommonParticle.

void pxl::Particle::setP4 ( const LorentzVector vector)
inline

Set the four-vector components to those of vector.

void pxl::Particle::setP4FromDaughters ( )

Sets the four-vector to the sum of the four-vectors of all direct daughters.

void pxl::Particle::setP4FromDaughtersRecursive ( )

Recursively sets the four-vector to the sum of the four-vectors of all daughters.

Starts at daughters without further daughters.

void pxl::Particle::setPdgNumber ( int  v)
inline

Sets the particle PDF number to v.

void pxl::Particle::setVector ( const LorentzVector vector)
inline

Set the four-vector components to those of vector.


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