Belle II Software light-2406-ragdoll
|
The RaveVertexFitter class is part of the RaveInterface together with RaveSetup. More...
#include <RaveVertexFitter.h>
Public Member Functions | |
RaveVertexFitter () | |
The constructor. | |
~RaveVertexFitter () | |
Destructor. | |
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 | |
void | addTrack (const TrackFitResult *const aTrackPtr) |
add a track (in the format of a pointer to a Belle2::TrackFitResult) to set of tracks that should be fitted to a vertex | |
void | addMother (const Particle *const aMotherParticlePtr) |
All daughters of the argument of this function will be used as input for the vertex fit. | |
int | fit (std::string options="default") |
do the vertex fit with all tracks previously added with the addTrack or addMother function. | |
B2Vector3D | getPos (VecSize vertexId=0) const |
get the position of the fitted vertex. | |
double | getPValue (VecSize vertexId=0) const |
get the p value of the fitted vertex. | |
double | getNdf (VecSize vertexId=0) const |
get the number of degrees of freedom (NDF) of the fitted vertex. | |
double | getChi2 (VecSize vertexId=0) const |
get the χ² of the fitted vertex. | |
TMatrixDSym | getCov (VecSize vertexId=0) const |
get the covariance matrix (3x3) of the of the fitted vertex position. | |
double | getWeight (int trackId, VecSize vertexId=0) const |
get the weight Rave assigned to a specific input track. | |
std::vector< int > | getTrackIdsForOneVertex (VecSize vertexId=0) const |
get the ids of the tracks Rave associated with a specific vertex. | |
void | useBeamSpot (bool beamSpot=true) |
Overwrite the global option in ReveSetup that tells the fitter if beam spot info should be used or not. | |
void | clearTracks () |
Delete all information of previously added tracks and fitted results. | |
void | Print () const |
Print all attributes of this object to terminal. | |
int | getNTracks () const |
return the number of tracks that where added via addTrack or addMother | |
void | updateDaughters () |
update the Daughters particles | |
Protected Member Functions | |
void | initBeamSpotMember () |
Initialize m_useBeamSpot. | |
void | isVertexIdValid (const VecSize vertexId) const |
checks if the vertex the user requested via one of the getters it actually there | |
rave::Track | TrackFitResultToRaveTrack (const TrackFitResult *const aTrackPtr) const |
converts a track from Belle2::TrackFitResult format to rave::Track format | |
Protected Attributes | |
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 | |
std::vector< rave::Vertex > | m_raveVertices |
holds the fitted vertices after fit() was called in the format used by Rave | |
std::vector< Particle * > | m_belleDaughters |
Belle Particle pointers input. | |
Private Types | |
typedef std::vector< int >::size_type | VecSize |
I am using std::vector<int>::size_type because it is the official return value of .size() although on normal machines a ::size_type is just an unsigned int anyway. | |
The RaveVertexFitter 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. RaveVertexFitter provides the getters to extract the results produced by Rave.
Definition at line 36 of file RaveVertexFitter.h.
|
private |
I am using std::vector<int>::size_type because it is the official return value of .size() although on normal machines a ::size_type is just an unsigned int anyway.
Because std::vector<int>::size_type is so long it is shortened to VecSize
Definition at line 38 of file RaveVertexFitter.h.
RaveVertexFitter | ( | ) |
The constructor.
Definition at line 30 of file RaveVertexFitter.cc.
void addMother | ( | const Particle *const | aMotherParticlePtr | ) |
All daughters of the argument of this function will be used as input for the vertex fit.
Definition at line 110 of file RaveVertexFitter.cc.
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
Definition at line 87 of file RaveVertexFitter.cc.
void addTrack | ( | const TrackFitResult *const | aTrackPtr | ) |
add a track (in the format of a pointer to a Belle2::TrackFitResult) to set of tracks that should be fitted to a vertex
Definition at line 55 of file RaveVertexFitter.cc.
|
inline |
Delete all information of previously added tracks and fitted results.
Definition at line 95 of file RaveVertexFitter.h.
int fit | ( | std::string | options = "default" | ) |
do the vertex fit with all tracks previously added with the addTrack or addMother function.
The argument is a string determining the Rave fitting method. See https://rave.hepforge.org/trac/wiki/RaveMethods for the different methods The return value is the number of successfully found vertices (depending on the selected algorithm this can be more then one vertex). Return value 0 means the fit was not successful. -1 means not enough tracks were added
Definition at line 121 of file RaveVertexFitter.cc.
double getChi2 | ( | VecSize | vertexId = 0 | ) | const |
get the χ² of the fitted vertex.
If Rave was also used to find different vertices the user has to provide the index of that vertex
Definition at line 222 of file RaveVertexFitter.cc.
TMatrixDSym getCov | ( | VecSize | vertexId = 0 | ) | const |
get the covariance matrix (3x3) of the of the fitted vertex position.
If Rave was also used to find different vertices the user has to provide the index of that vertex
Definition at line 230 of file RaveVertexFitter.cc.
double getNdf | ( | VecSize | vertexId = 0 | ) | const |
get the number of degrees of freedom (NDF) of the fitted vertex.
If Rave was also used to find different vertices the user has to provide the index of that vertex
Definition at line 214 of file RaveVertexFitter.cc.
|
inline |
return the number of tracks that where added via addTrack or addMother
Definition at line 110 of file RaveVertexFitter.h.
B2Vector3D getPos | ( | VecSize | vertexId = 0 | ) | const |
get the position of the fitted vertex.
If Rave was also used to find different vertices the user has to provide the index of that vertex
Definition at line 169 of file RaveVertexFitter.cc.
double getPValue | ( | VecSize | vertexId = 0 | ) | const |
get the p value of the fitted vertex.
If Rave was also used to find different vertices the user has to provide the index of that vertex
Definition at line 206 of file RaveVertexFitter.cc.
std::vector< int > getTrackIdsForOneVertex | ( | VecSize | vertexId = 0 | ) | const |
get the ids of the tracks Rave associated with a specific vertex.
The trackId is determined by the order of the addTrack calls. So the first track added with addTrack has trackId = 0, the next has 1 etc
Definition at line 194 of file RaveVertexFitter.cc.
double getWeight | ( | int | trackId, |
VecSize | vertexId = 0 |
||
) | const |
get the weight Rave assigned to a specific input track.
The trackId is determined by the order of the addTrack calls. So the first track added with addTrack has trackId = 0, the next has 1 etc
Definition at line 178 of file RaveVertexFitter.cc.
|
protected |
Initialize m_useBeamSpot.
Called by constructor
Definition at line 41 of file RaveVertexFitter.cc.
|
protected |
checks if the vertex the user requested via one of the getters it actually there
Definition at line 155 of file RaveVertexFitter.cc.
|
inline |
Print all attributes of this object to terminal.
Definition at line 102 of file RaveVertexFitter.h.
|
protected |
converts a track from Belle2::TrackFitResult format to rave::Track format
Definition at line 60 of file RaveVertexFitter.cc.
void updateDaughters | ( | ) |
update the Daughters particles
Definition at line 250 of file RaveVertexFitter.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 82 of file RaveVertexFitter.h.
|
protected |
Belle Particle pointers input.
Definition at line 142 of file RaveVertexFitter.h.
|
protected |
holds the tracks that were added to a RaveVertexFitter object in the format used by Rave
Definition at line 136 of file RaveVertexFitter.h.
|
protected |
holds the fitted vertices after fit() was called in the format used by Rave
Definition at line 139 of file RaveVertexFitter.h.
|
protected |
flag determines if the beam spot will be used or not.
Overwrites the global flag in RaveSetup
Definition at line 130 of file RaveVertexFitter.h.