Belle II Software  release-06-01-15
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 #include <framework/core/Module.h>
10 
11 #include <analysis/dataobjects/Particle.h>
12 #include <analysis/dataobjects/ParticleList.h>
13 
14 #include <framework/datastore/StoreObjPtr.h>
15 
16 namespace Belle2 {
21  class Particle;
22 
29  class TreeFitterModule : public Module {
30 
31  public:
34 
36  virtual void initialize() override;
37 
39  virtual void beginRun() override;
40 
42  virtual void event() override;
43 
45  virtual void terminate() override;
46 
47  private:
48 
50  void plotFancyASCII();
51 
54 
56  std::string m_particleList;
57 
66 
72  double m_precision;
73 
75  std::vector<int> m_massConstraintList;
76 
78  std::vector<int> m_geoConstraintListPDG;
79 
82  std::vector<int> m_fixedToMotherVertexListPDG;
83 
85  std::vector<std::string> m_massConstraintListParticlename;
90 
96 
98  bool fitTree(Particle* head);
99 
102 
104  unsigned int m_nCandidatesAfter;
105 
110 
114 
117 
119  std::vector<double> m_customOriginVertex;
120 
122  std::vector<double> m_customOriginCovariance;
123 
127  std::vector<std::string> m_removeConstraintList;
128 
133 
136 
139  };
141 }
Base class for Modules.
Definition: Module.h:72
Class to store reconstructed particles.
Definition: Particle.h:74
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Module to fit an entire decay tree.
void plotFancyASCII()
plot ascii art and statistics
std::vector< double > m_customOriginVertex
vertex coordinates of the custom origin
virtual void initialize() override
initialize
virtual void event() override
performed for each event
bool m_updateDaughters
flag if you want to update all particle momenta in the decay tree.
std::vector< std::string > m_massConstraintListParticlename
vector carrying the names of the particles to be mass constraint
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...
virtual void terminate() override
stuff at the end
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 WARNING only use if you know what you are doing
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
bool m_useReferencing
linearise around a previous state of the Kalman Filter
bool fitTree(Particle *head)
this fits all particle candidates contained in the m_particleList
double m_precision
convergence precision for the newton method When the delta chiSquared between 2 iterations divided by...
StoreObjPtr< ParticleList > m_plist
input particle list
unsigned int m_nCandidatesBeforeFit
before the fit
Abstract base class for different kinds of events.