 |
Belle II Software
release-05-02-19
|
13 #include <analysis/dataobjects/Particle.h>
14 #include <analysis/VertexFitting/RaveInterface/RaveSetup.h>
21 #include <rave/Track.h>
22 #include <rave/Vertex.h>
38 class RaveVertexFitter {
40 typedef std::vector<int>::size_type
VecSize;
60 int fit(std::string options =
"default");
86 if (beamSpot ==
true) {
88 B2ERROR(
"Beam spot information cannot be used because the beam spot position and covariance was not set in RaveSetup");
108 B2INFO(
"number of rave::Tracks: " <<
m_raveTracks.size());
109 B2INFO(
"number of fitted rave::Vertices: " <<
m_raveVertices.size());
void isVertexIdValid(const VecSize vertexId) const
checks if the vertex the user requested via one of the getters it actually there
double getPValue(VecSize vertexId=0) const
get the p value of the fitted vertex.
int getNTracks() const
return the number of tracks that where added via addTrack or addMother
TVector3 getPos(VecSize vertexId=0) const
get the position of the fitted vertex.
void useBeamSpot(bool beamSpot=true)
Overwrite the global option in ReveSetup that tells the fitter if beam spot info should be used or no...
std::vector< Particle * > m_belleDaughters
Belle Particle pointers input.
void clearTracks()
Delete all information of previously added tracks and fitted results.
double getChi2(VecSize vertexId=0) const
get the χ² of the fitted vertex.
rave::Track TrackFitResultToRaveTrack(const TrackFitResult *const aTrackPtr) const
converts a track from Belle2::TrackFitResult format to rave::Track format
Values of the result of a track fit with a given particle hypothesis.
std::vector< rave::Vertex > m_raveVertices
holds the fitted vertices after fit() was called in the format used by Rave
std::vector< rave::Track > m_raveTracks
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave
bool m_useBeamSpot
flag determines if the beam spot will be used or not.
Abstract base class for different kinds of events.
~RaveVertexFitter()
Destructor.
double getNdf(VecSize vertexId=0) const
get the number of degrees of freedom (NDF) of the fitted vertex.
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
RaveVertexFitter()
The constructor.
TMatrixDSym getCov(VecSize vertexId=0) const
get the covariance matrix (3x3) of the of the fitted vertex position.
void initBeamSpotMember()
Initialize m_useBeamSpot.
std::vector< int > getTrackIdsForOneVertex(VecSize vertexId=0) const
get the ids of the tracks Rave associated with a specific vertex.
void updateDaughters()
update the Daughters particles
Class to store reconstructed particles.
void addMother(const Particle *const aMotherParticlePtr)
All daughters of the argument of this function will be used as input for the vertex 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.
std::vector< int >::size_type VecSize
I am using std::vector<int>::size_type because it is the official return value of ....
int fit(std::string options="default")
do the vertex fit with all tracks previously added with the addTrack or addMother function.
double getWeight(int trackId, VecSize vertexId=0) const
get the weight Rave assigned to a specific input track.