Belle II Software development
|
The RaveKinematicVertexFitter class is part of the RaveInterface together with RaveSetup. More...
#include <RaveKinematicVertexFitter.h>
Public Member Functions | |
RaveKinematicVertexFitter () | |
The default constructor checks if RaveSetup was initialized and will set the attributes of RaveKinematicVertexFitter. | |
~RaveKinematicVertexFitter () | |
Destructor. | |
void | addTrack (const Particle *aParticlePtr) |
add a track (in the format of a Belle2::Particle) to set of tracks that should be fitted to a vertex | |
void | addMother (const Particle *aMotherParticlePtr) |
All daughters of the argument of this function will be used as input for the vertex fit. | |
void | setMother (const Particle *aMotherParticlePtr) |
Set Mother particle for Vertex/momentum update. | |
int | fit () |
do the kinematic vertex fit with all tracks previously added with the addTrack or addMother function. | |
ROOT::Math::XYZVector | getPos () |
get the position of the fitted vertex. | |
double | getPValue () |
get the p value of the fitted vertex. | |
double | getNdf () |
get the number of degrees of freedom (NDF) of the fitted vertex. | |
double | getChi2 () |
get the χ² of the fitted vertex. | |
TMatrixDSym | getCov () |
get the covariance matrix (7x7). | |
TMatrixDSym | getVertexErrorMatrix () |
get the covariance matrix (3x3) of the of the fitted vertex position. | |
void | useBeamSpot (bool beamSpot=true) |
Overwrite the global option in ReveSetup that tells the fitter if beam spot info should be used or not. | |
Particle * | getMother () |
returns a pointer to the mother particle | |
void | updateMother () |
update the mother particle | |
void | updateDaughters () |
update the Daughters particles | |
void | clearTracks () |
Delete all information of previously added tracks and fitted results. | |
void | setMassConstFit (bool isConstFit=true) |
Set mass constrained fit | |
void | setVertFit (bool isVertFit=true) |
Set vertex fit: set false in case of mass fit only. | |
void | Print () const |
Print all attributes of this object to terminal. | |
Protected Attributes | |
bool | m_useBeamSpot |
flag determines if the beam spot will be used or not. | |
Particle * | m_motherParticlePtr |
pointer to the mother particle who's daughters will be used in the fit. | |
std::string | m_raveAlgorithm |
Algorithm used by rave (kalman, avr, ...) | |
rave::KinematicTree | m_fittedResult |
the output of the kinematic fit | |
std::vector< rave::Track > | m_raveTracks |
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave | |
std::vector< rave::Vertex > | m_raveVertices |
holds the fitted vertices after fit() was called in the format used by Rave | |
std::vector< rave::KinematicParticle > | m_inputParticles |
input particles for vertex fit in rave format | |
rave::KinematicParticle | m_fittedParticle |
Particle fit output. | |
std::vector< Particle * > | m_belleDaughters |
Belle Particle pointers input. | |
bool | m_massConstFit |
flag determines if the mass fit is performed | |
bool | m_vertFit |
flag determines if the vertex fit is performed | |
double | m_fittedNdf |
Ndf of the vertex fit. | |
double | m_fittedPValue |
Pvalue of the fit result. | |
double | m_fittedChi2 |
chi^2 of the vertex fit | |
ROOT::Math::XYZVector | m_fittedPos |
Fitted vertex position. | |
ROOT::Math::PxPyPzEVector | m_fitted4Vector |
4 momentum of the mother particle after the fit | |
TMatrixFSym | m_fitted7Cov |
7x7 error matrix of the mother particle after the fit | |
Private Member Functions | |
TMatrixDSym | ErrorMatrixMassToEnergy (const ROOT::Math::PxPyPzEVector &p4, const TMatrixDSym &MassErr) |
Convert the error matrix from P-M to P-E. | |
TMatrixDSym | ErrorMatrixEnergyToMass (const ROOT::Math::PxPyPzEVector &p4, const TMatrixDSym &EnergyErr) |
Convert the error matrix from P-E to P-M. | |
IOIntercept::InterceptorScopeGuard< IOIntercept::OutputToLogMessages > | captureOutput () |
Start capturing the output of rave and divert it to log messages. | |
The RaveKinematicVertexFitter class is part of the RaveInterface together with RaveSetup.
To fit a vertex the user adds tracks (different formats are supported). Then calls the fit() function where the name of the fitting method and parameters can be passed as a string. RaveKinematicVertexFitter provides the getters to extract the results produced by Rave.
Definition at line 44 of file RaveKinematicVertexFitter.h.
The default constructor checks if RaveSetup was initialized and will set the attributes of RaveKinematicVertexFitter.
Definition at line 37 of file RaveKinematicVertexFitter.cc.
void addMother | ( | const Particle * | aMotherParticlePtr | ) |
All daughters of the argument of this function will be used as input for the vertex fit.
Writes back the result directly to the mother particle
Definition at line 105 of file RaveKinematicVertexFitter.cc.
void addTrack | ( | const Particle * | aParticlePtr | ) |
add a track (in the format of a Belle2::Particle) to set of tracks that should be fitted to a vertex
Definition at line 68 of file RaveKinematicVertexFitter.cc.
|
private |
Start capturing the output of rave and divert it to log messages.
Capturing will finish as soon as the returned object goes out of scope
Definition at line 46 of file RaveKinematicVertexFitter.cc.
|
inline |
Delete all information of previously added tracks and fitted results.
Definition at line 107 of file RaveKinematicVertexFitter.h.
|
private |
Convert the error matrix from P-E to P-M.
It Requires an input error matrix in the form X,P,E
Definition at line 483 of file RaveKinematicVertexFitter.cc.
|
private |
Convert the error matrix from P-M to P-E.
It Requires an input error matrix in the form X,P,M
Definition at line 453 of file RaveKinematicVertexFitter.cc.
int fit | ( | ) |
do the kinematic vertex fit with all tracks previously added with the addTrack or addMother function.
The return value is 1 if a vertex is successfully found. Return value 0 means the fit was not successful. -1 means not enough tracks were added
Definition at line 129 of file RaveKinematicVertexFitter.cc.
double getChi2 | ( | ) |
get the χ² of the fitted vertex.
Definition at line 426 of file RaveKinematicVertexFitter.cc.
TMatrixDSym getCov | ( | ) |
Particle * getMother | ( | ) |
returns a pointer to the mother particle
Definition at line 406 of file RaveKinematicVertexFitter.cc.
double getNdf | ( | ) |
get the number of degrees of freedom (NDF) of the fitted vertex.
Definition at line 421 of file RaveKinematicVertexFitter.cc.
ROOT::Math::XYZVector getPos | ( | ) |
double getPValue | ( | ) |
TMatrixDSym getVertexErrorMatrix | ( | ) |
get the covariance matrix (3x3) of the of the fitted vertex position.
Definition at line 436 of file RaveKinematicVertexFitter.cc.
|
inline |
Print all attributes of this object to terminal.
Definition at line 120 of file RaveKinematicVertexFitter.h.
void setMassConstFit | ( | bool | isConstFit = true | ) |
Set mass constrained fit
Definition at line 56 of file RaveKinematicVertexFitter.cc.
void setMother | ( | const Particle * | aMotherParticlePtr | ) |
Set Mother particle for Vertex/momentum update.
Not to be used with addMother
Definition at line 121 of file RaveKinematicVertexFitter.cc.
void setVertFit | ( | bool | isVertFit = true | ) |
Set vertex fit: set false in case of mass fit only.
Definition at line 61 of file RaveKinematicVertexFitter.cc.
void updateDaughters | ( | ) |
update the Daughters particles
Definition at line 329 of file RaveKinematicVertexFitter.cc.
void updateMother | ( | ) |
update the mother particle
Definition at line 324 of file RaveKinematicVertexFitter.cc.
|
inline |
Overwrite the global option in ReveSetup that tells the fitter if beam spot info should be used or not.
The beam spot pos and cov must still be set in the RaveSetup class if you what to use it
Definition at line 85 of file RaveKinematicVertexFitter.h.
|
protected |
Belle Particle pointers input.
Definition at line 155 of file RaveKinematicVertexFitter.h.
|
protected |
4 momentum of the mother particle after the fit
Definition at line 170 of file RaveKinematicVertexFitter.h.
|
protected |
7x7 error matrix of the mother particle after the fit
Definition at line 172 of file RaveKinematicVertexFitter.h.
|
protected |
chi^2 of the vertex fit
Definition at line 166 of file RaveKinematicVertexFitter.h.
|
protected |
Ndf of the vertex fit.
Definition at line 162 of file RaveKinematicVertexFitter.h.
|
protected |
Particle fit output.
Definition at line 152 of file RaveKinematicVertexFitter.h.
|
protected |
Fitted vertex position.
Definition at line 168 of file RaveKinematicVertexFitter.h.
|
protected |
Pvalue of the fit result.
Definition at line 164 of file RaveKinematicVertexFitter.h.
|
protected |
the output of the kinematic fit
Definition at line 141 of file RaveKinematicVertexFitter.h.
|
protected |
input particles for vertex fit in rave format
Definition at line 150 of file RaveKinematicVertexFitter.h.
|
protected |
flag determines if the mass fit is performed
Definition at line 158 of file RaveKinematicVertexFitter.h.
|
protected |
pointer to the mother particle who's daughters will be used in the fit.
the fit result will be written back to the mother particle
Definition at line 135 of file RaveKinematicVertexFitter.h.
|
protected |
Algorithm used by rave (kalman, avr, ...)
Definition at line 138 of file RaveKinematicVertexFitter.h.
|
protected |
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave
Definition at line 144 of file RaveKinematicVertexFitter.h.
|
protected |
holds the fitted vertices after fit() was called in the format used by Rave
Definition at line 147 of file RaveKinematicVertexFitter.h.
|
protected |
flag determines if the beam spot will be used or not.
Overwrites the global flag in RaveSetup
Definition at line 132 of file RaveKinematicVertexFitter.h.
|
protected |
flag determines if the vertex fit is performed
Definition at line 160 of file RaveKinematicVertexFitter.h.