Belle II Software light-2501-betelgeuse
TreeFitterModule.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 <framework/core/Module.h>
11#include <framework/datastore/StoreArray.h>
12#include <framework/datastore/StoreObjPtr.h>
13
14#include <analysis/dataobjects/Particle.h>
15#include <analysis/dataobjects/ParticleList.h>
16
17#include <analysis/DecayDescriptor/DecayDescriptor.h>
18
19#include <Eigen/Dense>
20
21namespace Belle2 {
26 class Particle;
27
35 class TreeFitterModule : public Module {
36
37 public:
40
42 virtual void initialize() override;
43
45 virtual void beginRun() override;
46
48 virtual void event() override;
49
51 virtual void terminate() override;
52
53 private:
54
56 void plotFancyASCII();
57
60
62 std::string m_particleList;
63
72
80
82 std::vector<int> m_massConstraintList;
83
85 std::vector<int> m_geoConstraintListPDG;
86
91
97
100
107
109 bool fitTree(Particle* head);
110
113
115 unsigned int m_nCandidatesAfter;
116
122
125
127 std::vector<double> m_customOriginVertex;
128
130 std::vector<double> m_customOriginCovariance;
131
136 std::vector<std::string> m_removeConstraintList;
137
142
145
148
150 Eigen::Matrix<double, 4, 1> m_beamMomE;
151
153 Eigen::Matrix<double, 4, 4> m_beamCovariance;
154
157
159 std::vector<double> m_massConstraintMassValues;
160
163
166
169
172
175
178
181
182 };
184}
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
Base class for Modules.
Definition: Module.h:72
Class to store reconstructed particles.
Definition: Particle.h:76
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Module to fit an entire decay tree.
std::string m_massConstraintDecayString
decay string to select particles that will be mass-constrained
DecayDescriptor m_pDDescriptorForIgnoring
Decay descriptor of the ignored particles.
void plotFancyASCII()
plot ascii art and statistics
std::vector< double > m_massConstraintMassValues
list of values for mass constraints
std::string m_ignoreFromVertexFit
decay string to select particles that will be ignored to determine the vertex position
DecayDescriptor m_pDDescriptorInvisible
Decay descriptor of the invisible particle.
std::vector< double > m_customOriginVertex
vertex coordinates of the custom origin
virtual void initialize() override
initialize
virtual void event() override
performed for each event
Eigen::Matrix< double, 4, 1 > m_beamMomE
beam four-momentum
bool m_updateDaughters
flag if you want to update all particle momenta in the decay tree.
unsigned int m_nCandidatesAfter
after the fit
std::vector< int > m_massConstraintList
vector carrying the PDG codes of the particles to be mass constraint
std::vector< int > m_fixedToMotherVertexListPDG
list of pdg codes of particles where we use the same vertex for production and decay which is the ver...
StoreArray< Particle > m_particles
StoreArray of Particles.
virtual void terminate() override
stuff at the end
DecayDescriptor m_pDDescriptorMassConstraint
Decay descriptor of the mass constrained particles.
bool m_usePDGMassForMassConstraint
use PDG values for mass constraints
bool m_automatic_vertex_constraining
should the vertex be joined with the mother and should it be geometrically constrained?...
virtual void beginRun() override
performed at the start of run
bool m_ipConstraint
Use x-y-z beamspot constraint.
int m_originDimension
dimension to use for beam/origin constraint
int m_inflationFactorCovZ
inflate beamspot covariance of z by this number
std::vector< std::string > m_removeConstraintList
list of constraints not to be applied in tree fit
int m_massConstraintType
type of the mass constraint false: use normal one.
std::vector< int > m_geoConstraintListPDG
list of pdg codes of particles to use a geo constraint for
std::vector< double > m_customOriginCovariance
covariance of the custom origin
std::string m_particleList
name of the particle list fed to the fitter
double m_confidenceLevel
minimum confidence level to accept fit calculated as f(chiSquared, NDF) -2: accept all 0: only accept...
bool m_customOrigin
use a custom vertex as the production vertex of the highest hierarchy particle
std::string m_treatAsInvisible
decay string to select one particle that will be treated as invisible
Eigen::Matrix< double, 4, 4 > m_beamCovariance
beam covariance matrix
int m_beamConstraintPDG
PDG code of particle to be constrained to the beam 4-momentum.
bool fitTree(Particle *head)
this fits all particle candidates contained in the m_particleList
double m_precision
convergence precision for the newton method
StoreObjPtr< ParticleList > m_plist
input particle list
unsigned int m_nCandidatesBeforeFit
before the fit
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24