Belle II Software development
ParticleConstraint.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * Forked from https://github.com/iLCSoft/MarlinKinfit *
6 * *
7 * Further information about the fit engine and the user interface *
8 * provided in MarlinKinfit can be found at *
9 * https://www.desy.de/~blist/kinfit/doc/html/ *
10 * and in the LCNotes LC-TOOL-2009-001 and LC-TOOL-2009-004 available *
11 * from http://www-flc.desy.de/lcnotes/ *
12 * *
13 * See git log for contributors and copyright holders. *
14 * This file is licensed under LGPL-3.0, see LICENSE.md. *
15 **************************************************************************/
16
17#ifndef __PARTICLECONSTRAINT_H
18#define __PARTICLECONSTRAINT_H
19
20#include<vector>
21#include<cassert>
22#include "analysis/OrcaKinFit/BaseHardConstraint.h"
23
24namespace Belle2 {
30 namespace OrcaKinFit {
31
32 class ParticleFitObject;
33
34// Class ParticleConstraint:
36
74 public:
76 inline ParticleConstraint();
78 virtual ~ParticleConstraint() {};
79
81 virtual void setFOList(std::vector <ParticleFitObject*>* fitobjects_
82 )
83 {
84 for (int i = 0; i < (int) fitobjects_->size(); i++) {
85 fitobjects.push_back(reinterpret_cast < BaseFitObject* >((*fitobjects_)[i]));
86 flags.push_back(1);
87 }
88 };
90 virtual void addToFOList(ParticleFitObject& fitobject, int flag = 1
91 )
92 {
93 fitobjects.push_back(reinterpret_cast < BaseFitObject* >(&fitobject));
94 flags.push_back(flag);
95 };
97 virtual void resetFOList()
98 {
99 fitobjects.resize(0);
100 flags.resize(0);
101 };
102
104 virtual void invalidateCache() const
105 {}
106
107 protected:
108
109 };
110
112
113 }// end OrcaKinFit namespace
115} // end Belle2 namespace
116
117#endif // __PARTICLECONSTRAINT_H
Abstract base class for constraints of kinematic fits.
FitObjectContainer fitobjects
The FitObjectContainer.
std::vector< int > flags
The flags can be used to divide the FitObjectContainer into several subsets used for example to imple...
Abstract base class for constraints of kinematic fits.
virtual void invalidateCache() const
Invalidates any cached values for the next event.
ParticleConstraint()
Creates an empty ParticleConstraint object.
virtual void addToFOList(ParticleFitObject &fitobject, int flag=1)
Adds one ParticleFitObject objects to the list.
virtual ~ParticleConstraint()
Virtual destructor.
virtual void setFOList(std::vector< ParticleFitObject * > *fitobjects_)
Adds several ParticleFitObject objects to the list.
virtual void resetFOList()
Resests ParticleFitObject list.
Abstract base class for different kinds of events.