SFrame 3.6
|
4-momentum object that can be used in analyses. More...
#include <plug-ins/include/SParticle.h>
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 > | |
SParticle & | operator= (const ROOT::Math::LorentzVector< Geom > &rh) |
Generic copy operator. |
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
Definition at line 51 of file SParticle.h.
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.
pt | pT of the particle |
eta | pseudo-rapidity of the particle |
phi | azimuthal angle of the particle |
e | energy 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.
parent | The SParticle that we're copying |
Definition at line 52 of file SParticle.cxx.
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 );
parent | Any 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.
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;
rh | The LorentzVector on the right-hand side of the equation sign |
Definition at line 52 of file SParticle.icc.