Belle II Software  release-05-02-19
TreeFitterModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributor: Francesco Tenchini, Jo-Frederik Krohn *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 #include <framework/core/Module.h>
12 
13 namespace Belle2 {
18  class Particle;
19 
26  class TreeFitterModule : public Module {
27 
28  public:
31 
33  virtual void initialize() override;
34 
36  virtual void beginRun() override;
37 
39  virtual void event() override;
40 
42  virtual void terminate() override;
43 
44  private:
45 
47  void plotFancyASCII();
48 
50  std::string m_particleList;
51 
59  double m_confidenceLevel;
60 
66  double m_precision;
67 
69  std::vector<int> m_massConstraintList;
70 
72  std::vector<int> m_geoConstraintListPDG;
73 
76  std::vector<int> m_fixedToMotherVertexListPDG;
77 
79  std::vector<std::string> m_massConstraintListParticlename;
84 
89  bool m_ipConstraint;
90 
92  bool fitTree(Particle* head);
93 
95  unsigned int m_nCandidatesBeforeFit;
96 
98  unsigned int m_nCandidatesAfter;
99 
104 
107  bool m_customOrigin;
108 
110  bool m_useReferencing;
111 
113  std::vector<double> m_customOriginVertex;
114 
116  std::vector<double> m_customOriginCovariance;
117 
121  std::vector<std::string> m_removeConstraintList;
122 
127 
130 
133  };
135 }
Belle2::TreeFitterModule::m_nCandidatesBeforeFit
unsigned int m_nCandidatesBeforeFit
before the fit
Definition: TreeFitterModule.h:103
Belle2::TreeFitterModule::m_particleList
std::string m_particleList
name of the particle list fed to the fitter
Definition: TreeFitterModule.h:58
Belle2::TreeFitterModule::m_precision
double m_precision
convergence precision for the newton method When the delta chiSquared between 2 iterations divided by...
Definition: TreeFitterModule.h:74
Belle2::TreeFitterModule::m_geoConstraintListPDG
std::vector< int > m_geoConstraintListPDG
list of pdg codes of particles to use a geo cosntraint for
Definition: TreeFitterModule.h:80
Belle2::TreeFitterModule::m_massConstraintListParticlename
std::vector< std::string > m_massConstraintListParticlename
vector carrying the names of the particles to be mass constraint
Definition: TreeFitterModule.h:87
Belle2::TreeFitterModule::m_ipConstraint
bool m_ipConstraint
Use x-y-z beamspot constraint.
Definition: TreeFitterModule.h:97
Belle2::TreeFitterModule::m_massConstraintType
int m_massConstraintType
type of the mass constraint false: use normal one.
Definition: TreeFitterModule.h:91
Belle2::TreeFitterModule::m_automatic_vertex_constraining
bool m_automatic_vertex_constraining
should the vertex be joined with the mother and should it be geometrically cosntrained?...
Definition: TreeFitterModule.h:134
Belle2::TreeFitterModule::m_nCandidatesAfter
unsigned int m_nCandidatesAfter
after the fit
Definition: TreeFitterModule.h:106
Belle2::TreeFitterModule::initialize
virtual void initialize() override
initialize
Definition: TreeFitterModule.cc:96
Belle2::TreeFitterModule::m_useReferencing
bool m_useReferencing
linearise around a previous state of the Kalman Filter
Definition: TreeFitterModule.h:118
Belle2::TreeFitterModule::m_massConstraintList
std::vector< int > m_massConstraintList
vector carrying the PDG codes of the particles to be mass constraint
Definition: TreeFitterModule.h:77
Belle2::TreeFitterModule::m_originDimension
int m_originDimension
dimension to use for beam/origin cosntraint
Definition: TreeFitterModule.h:137
Belle2::TreeFitterModule::terminate
virtual void terminate() override
stuff at the end
Definition: TreeFitterModule.cc:153
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TreeFitterModule::m_customOriginVertex
std::vector< double > m_customOriginVertex
vertex coordinates of the custom origin
Definition: TreeFitterModule.h:121
Belle2::TreeFitterModule::m_confidenceLevel
double m_confidenceLevel
minimum confidence level to accept fit calculated as f(chiSquared, NDF) -2: accept all 0: only accept...
Definition: TreeFitterModule.h:67
Belle2::TreeFitterModule::fitTree
bool fitTree(Particle *head)
this fits all particle candidates contained in the m_particleList
Definition: TreeFitterModule.cc:163
Belle2::TreeFitterModule::m_customOriginCovariance
std::vector< double > m_customOriginCovariance
covariance of the custom origin
Definition: TreeFitterModule.h:124
Belle2::TreeFitterModule::m_inflationFactorCovZ
int m_inflationFactorCovZ
inflate beamspot covariance of z by this number
Definition: TreeFitterModule.h:140
Belle2::TreeFitterModule::m_removeConstraintList
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
Definition: TreeFitterModule.h:129
Belle2::TreeFitterModule::m_fixedToMotherVertexListPDG
std::vector< int > m_fixedToMotherVertexListPDG
list of pdg codes of particles where we use thesame vertex for production and decay which is the vert...
Definition: TreeFitterModule.h:84
Belle2::TreeFitterModule::TreeFitterModule
TreeFitterModule()
constructor
Definition: TreeFitterModule.cc:33
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
Belle2::TreeFitterModule::m_updateDaughters
bool m_updateDaughters
flag if you want to update all particle momenta in the decay tree.
Definition: TreeFitterModule.h:111
Belle2::TreeFitterModule::plotFancyASCII
void plotFancyASCII()
plot ascii art and statistics
Definition: TreeFitterModule.cc:193
Belle2::TreeFitterModule::event
virtual void event() override
performed for each event
Definition: TreeFitterModule.cc:116
Belle2::TreeFitterModule::m_customOrigin
bool m_customOrigin
use a custom vertex as the production vertex of the highest hierarchy particle
Definition: TreeFitterModule.h:115
Belle2::TreeFitterModule::beginRun
virtual void beginRun() override
performed at the start of run
Definition: TreeFitterModule.cc:112