Belle II Software development
RaveSetup.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11//std
12#include <string>
13
14#include <framework/logging/Logger.h>
15#include <framework/geometry/B2Vector3.h>
16
17//root
18#include <TMatrixDSym.h>
19
20namespace rave {
21 class KinematicTreeFactory;
22 class VertexFactory;
23}
24
25namespace Belle2 {
31 namespace analysis {
37 class RaveSetup {
38
39 public:
40 friend class RaveVertexFitter;
41 friend class RaveKinematicVertexFitter;
44 {
45 RaveSetup* instance = getRawInstance();
46 if (!instance->m_initialized) {
47 B2FATAL("RaveSetup::initialize was not called. It has to be called before RaveSetup or RaveVertexFitter are used");
48 }
49 return instance;
50 }
52 static void initialize(int verbosity = 1, double MagneticField = 1.5);
54 void setBeamSpot(const B2Vector3D& beamSpot, const TMatrixDSym& beamSpotCov);
56 void unsetBeamSpot();
57
59 void reset();
60
62 static void Print();
63
64 protected:
66 static RaveSetup* getRawInstance();
68 RaveSetup();
70 ~RaveSetup();
71
74 TMatrixDSym m_beamSpotCov;
76 rave::VertexFactory*
79 //GFRaveVertexFactory* m_GFRaveVertexFactory;
81 rave::KinematicTreeFactory* m_raveKinematicTreeFactory;
82
84 };
85
86 }
87
89}
90
Magnetic field map.
Definition: MagneticField.h:32
The RaveKinematicVertexFitter class is part of the RaveInterface together with RaveSetup.
The RaveSetup class is part of the RaveInterface together with RaveVertexFitter It holds all global o...
Definition: RaveSetup.h:37
TMatrixDSym m_beamSpotCov
beam spot position covariance matrix.
Definition: RaveSetup.h:74
RaveSetup()
default constructor
Definition: RaveSetup.cc:48
void unsetBeamSpot()
unset beam spot constraint
Definition: RaveSetup.cc:80
rave::KinematicTreeFactory * m_raveKinematicTreeFactory
< The RAVE Kinematic Tree factory is the principal interface offered by the RAVE for kinematic vertex...
Definition: RaveSetup.h:81
bool m_useBeamSpot
flag determines if beam spot information should be used for vertex fit.
Definition: RaveSetup.h:72
static void initialize(int verbosity=1, double MagneticField=1.5)
Set everything up so everything needed for vertex fitting is there.
Definition: RaveSetup.cc:33
static RaveSetup * getRawInstance()
Same as getInstance(), but no check if the instance is initialised.
Definition: RaveSetup.cc:27
bool m_initialized
Has initialize() been called? unusable otherwise.
Definition: RaveSetup.h:83
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition: RaveSetup.h:43
B2Vector3D m_beamSpot
beam spot position.
Definition: RaveSetup.h:73
rave::VertexFactory * m_raveVertexFactory
The RAVE vertex factory is the principal interface offered by the RAVE vertex fitting library.
Definition: RaveSetup.h:77
static void Print()
Print() writes all RaveSetup member variables to the terminal
Definition: RaveSetup.cc:87
~RaveSetup()
default destructor
Definition: RaveSetup.cc:53
void setBeamSpot(const B2Vector3D &beamSpot, const TMatrixDSym &beamSpotCov)
The beam spot position and covariance is known you can set it here so that and a vertex in the beam s...
Definition: RaveSetup.cc:72
void reset()
frees memory allocated by initialize().
Definition: RaveSetup.cc:58
The RaveVertexFitter class is part of the RaveInterface together with RaveSetup.
Abstract base class for different kinds of events.