Belle II Software  release-05-02-19
RaveSetup.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Moritz Nadler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 //std
14 #include <string>
15 
16 #include <framework/logging/Logger.h>
17 
18 //root
19 #include <TVector3.h>
20 #include <TMatrixDSym.h>
21 
22 namespace rave {
23  class KinematicTreeFactory;
24  class VertexFactory;
25 }
26 
27 namespace Belle2 {
33  namespace analysis {
39  class RaveSetup {
40 
41  public:
42  friend class RaveVertexFitter;
43  friend class RaveKinematicVertexFitter;
46  {
47  RaveSetup* instance = getRawInstance();
48  if (!instance->m_initialized) {
49  B2FATAL("RaveSetup::initialize was not called. It has to be called before RaveSetup or RaveVertexFitter are used");
50  }
51  return instance;
52  }
54  static void initialize(int verbosity = 1, double MagneticField = 1.5);
56  void setBeamSpot(const TVector3& beamSpot, const TMatrixDSym& beamSpotCov);
58  void unsetBeamSpot();
59 
61  void reset();
62 
64  static void Print();
65 
66  protected:
68  static RaveSetup* getRawInstance();
70  RaveSetup();
72  ~RaveSetup();
73 
75  TVector3 m_beamSpot;
76  TMatrixDSym m_beamSpotCov;
78  rave::VertexFactory*
81  //GFRaveVertexFactory* m_GFRaveVertexFactory;
83  rave::KinematicTreeFactory* m_raveKinematicTreeFactory;
84 
86  };
87 
88  }
89 
91 }
92 
Belle2::analysis::RaveSetup::unsetBeamSpot
void unsetBeamSpot()
unset beam spot constraint
Definition: RaveSetup.cc:82
Belle2::analysis::RaveSetup::m_initialized
bool m_initialized
Has initialize() been called? unusable otherwise.
Definition: RaveSetup.h:85
Belle2::analysis::RaveSetup::initialize
static void initialize(int verbosity=1, double MagneticField=1.5)
Set everything up so everything needed for vertex fitting is there.
Definition: RaveSetup.cc:35
Belle2::analysis::RaveSetup
The RaveSetup class is part of the RaveInterface together with RaveVertexFitter It holds all global o...
Definition: RaveSetup.h:39
Belle2::analysis::RaveSetup::m_useBeamSpot
bool m_useBeamSpot
flag determines if beam spot information should be used for vertex fit.
Definition: RaveSetup.h:74
Belle2::analysis::RaveSetup::m_raveVertexFactory
rave::VertexFactory * m_raveVertexFactory
The RAVE vertex factory is the principal interface offered by the RAVE vertex fitting library.
Definition: RaveSetup.h:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::analysis::RaveSetup::~RaveSetup
~RaveSetup()
default destructor
Definition: RaveSetup.cc:55
Belle2::analysis::RaveSetup::reset
void reset()
frees memory allocated by initialize().
Definition: RaveSetup.cc:60
Belle2::analysis::RaveSetup::m_raveKinematicTreeFactory
rave::KinematicTreeFactory * m_raveKinematicTreeFactory
< The RAVE Kinematic Tree factory is the principal interface offered by the RAVE for kinematic vertex...
Definition: RaveSetup.h:83
Belle2::analysis::RaveSetup::RaveSetup
RaveSetup()
default constructor
Definition: RaveSetup.cc:50
Belle2::MagneticField
Magnetic field map.
Definition: MagneticField.h:43
Belle2::analysis::RaveKinematicVertexFitter
The RaveKinematicVertexFitter class is part of the RaveInterface together with RaveSetup.
Definition: RaveKinematicVertexFitter.h:52
Belle2::analysis::RaveSetup::getRawInstance
static RaveSetup * getRawInstance()
Same as getInstance(), but no check if the instance is initialised.
Definition: RaveSetup.cc:29
Belle2::analysis::RaveSetup::Print
static void Print()
Print() writes all RaveSetup member variables to the terminal
Definition: RaveSetup.cc:89
Belle2::analysis::RaveSetup::m_beamSpot
TVector3 m_beamSpot
beam spot position.
Definition: RaveSetup.h:75
Belle2::analysis::RaveVertexFitter
The RaveVertexFitter class is part of the RaveInterface together with RaveSetup.
Definition: RaveVertexFitter.h:46
Belle2::analysis::RaveSetup::setBeamSpot
void setBeamSpot(const TVector3 &beamSpot, const TMatrixDSym &beamSpotCov)
The beam spot position and covarance is known you can set it here so that and a vertex in the beam sp...
Definition: RaveSetup.cc:74
Belle2::analysis::RaveSetup::m_beamSpotCov
TMatrixDSym m_beamSpotCov
beam spot position covariance matrix.
Definition: RaveSetup.h:76
Belle2::analysis::RaveSetup::getInstance
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition: RaveSetup.h:45