Belle II Software  release-08-01-10
ConstraintConfiguration.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 #pragma once
9 
10 #include <vector>
11 #include <Eigen/Core>
12 
13 namespace TreeFitter {
14 
17  public:
18 
21  m_massConstraintType(false),
27  m_ipConstraint(false),
28  m_customOrigin(false),
32  m_headOfTreePDG(0),
34  m_beamMomE(Eigen::Matrix<double, 4, 1>()),
35  m_beamCovariance(Eigen::Matrix<double, 4, 4>()),
37  {};
38 
40  ConstraintConfiguration(const bool& massConstraintType,
41  const std::vector<int>& massConstraintListPDG,
42  const std::vector<int>& fixedToMotherVertexListPDG,
43  const std::vector<int>& geoConstraintListPDG,
44  const std::vector<std::string>& removeConstraintList,
45  const bool& automatic_vertex_constraining,
46  const bool& ipConstraint,
47  const bool& customOrigin,
48  const std::vector<double>& customOriginVertex,
49  const std::vector<double>& customOriginCovariance,
50  const int& originDimension,
51  const int& beamConstraintPDG,
52  const Eigen::Matrix<double, 4, 1>& beamMomE,
53  const Eigen::Matrix<double, 4, 4>& beamCovariance,
54  const int& inflationFactorCovZ = 1
55  ) :
56  m_massConstraintType(massConstraintType),
57  m_massConstraintListPDG(massConstraintListPDG),
58  m_fixedToMotherVertexListPDG(fixedToMotherVertexListPDG),
59  m_geoConstraintListPDG(geoConstraintListPDG),
60  m_removeConstraintList(removeConstraintList),
61  m_automatic_vertex_constraining(automatic_vertex_constraining),
62  m_ipConstraint(ipConstraint),
63  m_customOrigin(customOrigin),
64  m_customOriginVertex(customOriginVertex),
65  m_customOriginCovariance(customOriginCovariance),
66  m_originDimension(originDimension),
67  m_headOfTreePDG(0),
68  m_beamConstraintPDG(beamConstraintPDG),
69  m_beamMomE(beamMomE),
70  m_beamCovariance(beamCovariance),
71  m_inflationFactorCovZ(inflationFactorCovZ)
72  {}
73 
76 
78  const std::vector<int> m_massConstraintListPDG;
79 
81  const std::vector<int> m_fixedToMotherVertexListPDG;
82 
84  const std::vector<int> m_geoConstraintListPDG;
85 
87  const std::vector<std::string> m_removeConstraintList;
88 
91 
93  const bool m_ipConstraint;
94 
96  const bool m_customOrigin;
97 
99  const std::vector<double> m_customOriginVertex;
100 
102  const std::vector<double> m_customOriginCovariance;
103 
105  const int m_originDimension;
106 
108  mutable int m_headOfTreePDG;
109 
112 
114  Eigen::Matrix<double, 4, 1> m_beamMomE;
115 
117  Eigen::Matrix<double, 4, 4> m_beamCovariance;
118 
121 
122  };
123 }
124 
const bool m_customOrigin
is custom origin
ConstraintConfiguration(const bool &massConstraintType, const std::vector< int > &massConstraintListPDG, const std::vector< int > &fixedToMotherVertexListPDG, const std::vector< int > &geoConstraintListPDG, const std::vector< std::string > &removeConstraintList, const bool &automatic_vertex_constraining, const bool &ipConstraint, const bool &customOrigin, const std::vector< double > &customOriginVertex, const std::vector< double > &customOriginCovariance, const int &originDimension, const int &beamConstraintPDG, const Eigen::Matrix< double, 4, 1 > &beamMomE, const Eigen::Matrix< double, 4, 4 > &beamCovariance, const int &inflationFactorCovZ=1)
constructor
const std::vector< double > m_customOriginVertex
x,y,z of custom origin as vector len 3
const int m_originDimension
dimension of the origin constraint and ALL geometric gcosntraints
Eigen::Matrix< double, 4, 1 > m_beamMomE
Beam four-momentum.
const std::vector< int > m_geoConstraintListPDG
list of pdg codes to mass constrain
const std::vector< int > m_fixedToMotherVertexListPDG
list of pdg codes to mass constrain
const std::vector< double > m_customOriginCovariance
covariance matrix of origin as row major vector len = 9
int m_headOfTreePDG
PDG code of the head particle.
const std::vector< int > m_massConstraintListPDG
list of pdg codes to mass constrain
const bool m_ipConstraint
is IP constraint
const int m_beamConstraintPDG
PDG code to beam constraint.
const bool m_automatic_vertex_constraining
automatically determining if it is worth extracting a vertex for this particle or if it should be joi...
const std::vector< std::string > m_removeConstraintList
list of constraints not to apply in tree fit
Eigen::Matrix< double, 4, 4 > m_beamCovariance
Beam Covariance.
const bool m_massConstraintType
const flag for the type of the mass constraint
const int m_inflationFactorCovZ
inflate covariance of z by this number -> iptube