Belle II Software  release-08-01-10
BeamParametersFitter.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 /* MDST headers. */
12 #include <mdst/dbobjects/BeamSpot.h>
13 #include <mdst/dbobjects/CollisionBoostVector.h>
14 #include <mdst/dbobjects/CollisionInvariantMass.h>
15 
16 /* Basf2 headers. */
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/database/IntervalOfValidity.h>
19 #include <framework/dbobjects/BeamParameters.h>
20 
21 namespace Belle2 {
32 
33  public:
34 
39  {
40  }
41 
46  {
47  }
48 
53  {
55  }
56 
60  void setAngleHER(double angleHER)
61  {
62  m_AngleHER = angleHER;
63  }
64 
68  void setAngleLER(double angleLER)
69  {
70  m_AngleLER = angleLER;
71  }
72 
76  void setAngleError(double angleError)
77  {
78  m_AngleError = angleError;
79  }
80 
84  void setBoostError(double boostError)
85  {
86  m_BoostError = boostError;
87  }
88 
92  void setInvariantMassError(double invariantMassError)
93  {
94  m_InvariantMassError = invariantMassError;
95  }
96 
100  void setVerbose(bool verbose)
101  {
102  m_Verbose = verbose;
103  }
104 
109  {
110  return m_BeamParameters;
111  }
112 
116  void setBeamParameters(const BeamParameters* beamParameters)
117  {
118  m_BeamParameters = *beamParameters;
119  }
120 
124  void fit();
125 
133  void fillVertexData(double covarianceXX, double covarianceYY);
134 
138  void importBeamParameters();
139 
140  protected:
141 
145  void setupDatabase();
146 
149 
151  double m_AngleHER = 0;
152 
154  double m_AngleLER = 0;
155 
157  double m_AngleError = 0;
158 
160  double m_BoostError = 0.0001;
161 
163  double m_InvariantMassError = 0.0001;
164 
166  bool m_Verbose = false;
167 
170 
173 
176 
179 
180  };
181 
183 }
Fitter calculating BeamParameters from CollisionBoostVector and CollisionInvariantMass.
void setAngleHER(double angleHER)
Set HER angle.
BeamParameters m_BeamParameters
Beam parameters.
void setupDatabase()
Setup database.
double m_InvariantMassError
Invariant-mass error (use only if error is 0).
DBObjPtr< CollisionBoostVector > m_CollisionBoostVector
Collision boost vector.
void setIntervalOfValidity(const IntervalOfValidity &iov)
Set interval of validity.
bool m_Verbose
Whether to be verbose (print Minuit output).
void setInvariantMassError(double invariantMassError)
Set invariant-mass error.
void importBeamParameters()
Import beam parameters.
DBObjPtr< CollisionInvariantMass > m_CollisionInvariantMass
Collision invariant mass.
void setAngleError(double angleError)
Set angle error.
IntervalOfValidity m_IntervalOfValidity
Interval of validity.
void setVerbose(bool verbose)
Set whether to be verbose (print Minuit output).
DBObjPtr< BeamSpot > m_BeamSpot
Beam spot.
double m_BoostError
Boost error (use only if inverse error matrix is not available).
BeamParameters getBeamParameters() const
Get beam parameters.
void setBoostError(double boostError)
Set boost error.
void setAngleLER(double angleLER)
Set LER angle.
void setBeamParameters(const BeamParameters *beamParameters)
Set beam parameters.
void fillVertexData(double covarianceXX, double covarianceYY)
Fill beam spot (vertex) data.
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
A class that describes the interval of experiments/runs for which an object in the database is valid.
Abstract base class for different kinds of events.