11#include <analysis/dataobjects/Particle.h>
12#include <analysis/VertexFitting/RaveInterface/RaveSetup.h>
19#include <rave/Track.h>
20#include <rave/Vertex.h>
38 typedef std::vector<int>::size_type
VecSize;
58 int fit(std::string options =
"default");
84 if (beamSpot ==
true) {
86 B2FATAL(
"Beam spot information cannot be used because the beam spot position and covariance was not set in RaveSetup");
105 B2INFO(
"number of rave::Tracks: " <<
m_raveTracks.size());
106 B2INFO(
"number of fitted rave::Vertices: " <<
m_raveVertices.size());
Class to store reconstructed particles.
Values of the result of a track fit with a given particle hypothesis.
static RaveSetup * getRawInstance()
Same as getInstance(), but no check if the instance is initialised.
The RaveVertexFitter class is part of the RaveInterface together with RaveSetup.
std::vector< Particle * > m_belleDaughters
Belle Particle pointers input.
~RaveVertexFitter()
Destructor.
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 getCov(VecSize vertexId=0) const
get the covariance matrix (3x3) of the of the fitted vertex position.
bool m_useBeamSpot
flag determines if the beam spot will be used or not.
int fit(std::string options="default")
do the vertex fit with all tracks previously added with the addTrack or addMother function.
std::vector< int >::size_type VecSize
I am using std::vector<int>::size_type because it is the official return value of ....
void addTrack(const Particle *const aParticlePtr)
add a track (in the format of a Belle2::Particle) to set of tracks that should be fitted to a vertex
std::vector< int > getTrackIdsForOneVertex(VecSize vertexId=0) const
get the ids of the tracks Rave associated with a specific vertex.
double getNdf(VecSize vertexId=0) const
get the number of degrees of freedom (NDF) of the fitted vertex.
rave::Track TrackFitResultToRaveTrack(const TrackFitResult *const aTrackPtr) const
converts a track from Belle2::TrackFitResult format to rave::Track format
double getChi2(VecSize vertexId=0) const
get the χ² of the fitted vertex.
B2Vector3D getPos(VecSize vertexId=0) const
get the position of the fitted vertex.
std::vector< rave::Vertex > m_raveVertices
holds the fitted vertices after fit() was called in the format used by Rave
void clearTracks()
Delete all information of previously added tracks and fitted results.
void isVertexIdValid(const VecSize vertexId) const
checks if the vertex the user requested via one of the getters it actually there
void initBeamSpotMember()
Initialize m_useBeamSpot.
void updateDaughters()
update the Daughters particles
double getWeight(int trackId, VecSize vertexId=0) const
get the weight Rave assigned to a specific input track.
double getPValue(VecSize vertexId=0) const
get the p value of the fitted vertex.
RaveVertexFitter()
The constructor.
void Print() const
Print all attributes of this object to terminal.
std::vector< rave::Track > m_raveTracks
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave
void addMother(const Particle *const aMotherParticlePtr)
All daughters of the argument of this function will be used as input for the vertex fit.
int getNTracks() const
return the number of tracks that where added via addTrack or addMother
Abstract base class for different kinds of events.