 |
Belle II Software
release-05-02-19
|
13 #include <analysis/dataobjects/Particle.h>
14 #include <analysis/VertexFitting/RaveInterface/RaveSetup.h>
16 #include <mdst/dataobjects/TrackFitResult.h>
21 #include <TMatrixFSym.h>
23 #include <rave/Vertex.h>
24 #include <rave/Track.h>
25 #include <rave/KinematicTree.h>
28 #include <framework/utilities/IOIntercept.h>
44 class RaveKinematicVertexFitter {
87 if (beamSpot ==
true) {
89 B2ERROR(
"Beam spot information cannot be used because the beam spot position and covariance was not set in RaveSetup");
void clearTracks()
Delete all information of previously added tracks and fitted results.
RaveKinematicVertexFitter()
The default constructor checks if RaveSetup was initialized and will set the attributes of RaveKinema...
bool m_massConstFit
flag determines if the mass fit is performed
double getChi2()
get the χ² of the fitted vertex.
double m_fittedChi2
chi^2 of the vertex fit
rave::KinematicParticle m_fittedParticle
Particle fit output.
double getPValue()
get the p value of the fitted vertex.
TMatrixDSym ErrorMatrixMassToEnergy(const TLorentzVector &p4, const TMatrixDSym &MassErr)
Convert the error matrix from P-M to P-E.
std::vector< rave::KinematicParticle > m_inputParticles
input particles for vertex fit in rave format
rave::KinematicTree m_fittedResult
the output of the kinematic fit
double getNdf()
get the number of degrees of freedom (NDF) of the fitted vertex.
TMatrixDSym getCov()
get the covariance matrix (7x7).
Particle * getMother()
returns a pointer to the mother particle
void useBeamSpot(bool beamSpot=true)
Overwrite the global option in ReveSetup that tells the fitter if beam spot info should be used or no...
TMatrixDSym getVertexErrorMatrix()
get the covariance matrix (3x3) of the of the fitted vertex position.
void updateMother()
update the mother particle
double m_fittedNdf
Ndf of the vertex fit.
IOIntercept::InterceptorScopeGuard< IOIntercept::OutputToLogMessages > captureOutput()
Start capturing the output of rave and divert it to log messages.
std::vector< Particle * > m_belleDaughters
Belle Particle pointers input.
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
TMatrixDSym ErrorMatrixEnergyToMass(const TLorentzVector &p4, const TMatrixDSym &EnergyErr)
Convert the error matrix from P-E to P-M.
Abstract base class for different kinds of events.
bool m_vertFit
flag determines if the vertex fit is performed
void setVertFit(bool isVertFit=true)
Set vertex fit: set false in case of mass fit only.
Simple RAII guard for output interceptor.
int fit()
do the kinematic vertex fit with all tracks previously added with the addTrack or addMother function.
Particle * m_motherParticlePtr
pointer to the mother particle who's daughters will be used in the fit.
void addMother(const Particle *aMotherParticlePtr)
All daughters of the argument of this function will be used as input for the vertex fit.
Class to store reconstructed particles.
void updateDaughters()
update the Daughters particles
std::vector< rave::Vertex > m_raveVertices
holds the fitted vertices after fit() was called in the format used by Rave
TVector3 getPos()
get the position of the fitted vertex.
bool m_useBeamSpot
flag determines if the beam spot will be used or not.
std::vector< rave::Track > m_raveTracks
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave
TLorentzVector m_fitted4Vector
4 momentum of the mother particle after the fit
void Print() const
Print all attributes of this object to terminal.
static RaveSetup * getRawInstance()
Same as getInstance(), but no check if the instance is initialised.
void setMother(const Particle *aMotherParticlePtr)
Set Mother particle for Vertex/momentum update.
void setMassConstFit(bool isConstFit=true)
Set mass constrained fit
~RaveKinematicVertexFitter()
Destructor.
TMatrixFSym m_fitted7Cov
7x7 errror matrix of the mother particle after the fit
TVector3 m_fittedPos
Fitted vertex position.
std::string m_raveAlgorithm
Algorithm used by rave (kalman, avr, ...)
double m_fittedPValue
Pvalue of the fit result.