SFrame 3.6
SParticle Class Reference

4-momentum object that can be used in analyses. More...

#include <plug-ins/include/SParticle.h>

Inheritance diagram for SParticle:
Collaboration diagram for SParticle:

List of all members.

Public Member Functions

 SParticle ()
 Default constructor.
 SParticle (Double32_t pt, Double32_t eta, Double32_t phi, Double32_t e)
 Constructor with 4 discrete momentum parameters.
 SParticle (const SParticle &parent)
 Copy constructor.
template<class Geom >
 SParticle (const ROOT::Math::LorentzVector< Geom > &parent)
 Generic copy constructor.
virtual ~SParticle ()
 Default destructor.
template<class Geom >
SParticleoperator= (const ROOT::Math::LorentzVector< Geom > &rh)
 Generic copy operator.

Detailed Description

4-momentum object that can be used in analyses.

This class is basically just here to demonstrate what kind of "advanced" ROOT objects can be used/saved/read with SFrame. The class allows all the algebra operations between SParticle objects that are defined for the LorentzVector class, so for instance things like

SParticle p1( ... ), p2( ... ); SParticle p3 = p1 + p2;

The package generates dictionaries for the SParticle and std::vector<SParticle> classes, so they can be written out to and read back from TTree-s.

For detailed a description of the functions that this class supports, see: http://root.cern.ch/root/html518/ROOT__Math__LorentzVector_ROOT__Math__PtEtaPhiE4D_Double32_t___.html

Version:
Revision:
120
Examples:

FirstCycle.cxx.

Definition at line 51 of file SParticle.h.


Constructor & Destructor Documentation

SParticle::SParticle ( )

Default constructor.

This constructor creates a "null-vector". Default constructors are needed to be able to read/write objects with ROOT.

Definition at line 24 of file SParticle.cxx.

SParticle::SParticle ( Double32_t  pt,
Double32_t  eta,
Double32_t  phi,
Double32_t  e 
)

Constructor with 4 discrete momentum parameters.

This is the cmost useful constructor I guess. It receives the usual 4-momentum parameters of a reconstructed or truth particle.

Parameters:
ptpT of the particle
etapseudo-rapidity of the particle
phiazimuthal angle of the particle
eenergy of the particle

Definition at line 39 of file SParticle.cxx.

SParticle::SParticle ( const SParticle parent)

Copy constructor.

This copy constructor clones another SParticle object.

Parameters:
parentThe SParticle that we're copying

Definition at line 52 of file SParticle.cxx.

template<class Geom >
SParticle::SParticle ( const ROOT::Math::LorentzVector< Geom > &  parent)

Generic copy constructor.

This copy constructor can basically copy any kind of LorentzVector. It doesn't matter if the parent has been declared in another geometry. The constructor allows statements like:

SParticle p( p1 + p2 );

Parameters:
parentAny kind of LorentzVector that we want to copy

Definition at line 29 of file SParticle.icc.

SParticle::~SParticle ( ) [virtual]

Default destructor.

The destructor doesn't have to do anything.

Definition at line 61 of file SParticle.cxx.


Member Function Documentation

template<class Geom >
SParticle & SParticle::operator= ( const ROOT::Math::LorentzVector< Geom > &  rh)

Generic copy operator.

This operator is needed to allow arithmetic expressions that are defined for the LorentzVector class, to work on SParticle objects. It allows statements like:

SParticle p = p1 + p2;

Parameters:
rhThe LorentzVector on the right-hand side of the equation sign

Definition at line 52 of file SParticle.icc.


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