9#include <analysis/modules/PseudoVertexFitter/PseudoVertexFitterModule.h> 
   11#include <analysis/dataobjects/Particle.h> 
   12#include <analysis/dataobjects/ParticleList.h> 
   14#include <framework/datastore/StoreObjPtr.h> 
   32  setDescription(
"Pseudo fitter adds a covariance matrix which is sum of the daughter covariance matrices.");
 
 
   42    B2ERROR(
"No list name specified! Please enter the list name of the particle you want to add a covariance matrix to.");
 
   45  B2INFO(
"PseudoVertexFitter: adding covariance matrix to " << 
m_listName);
 
 
   53    B2ERROR(
"ParticleList " << 
m_listName << 
" not found");
 
   57  unsigned int n = plist->getListSize();
 
   58  for (
unsigned i = 0; i < n; i++) {
 
   59    Particle* particle = plist->getParticle(i);
 
 
   74  const std::vector<Particle*> daughters = mother->
getDaughters();
 
   75  std::vector<TMatrixFSym> daughter_matrices;
 
   76  daughter_matrices.reserve(daughters.size());
 
   77  for (
auto daughter : daughters) {
 
   78    daughter_matrices.push_back(daughter->getMomentumVertexErrorMatrix());
 
   81  TMatrixFSym mother_errMatrix(7);
 
   82  for (
int i = 0; i < 7; i++) {
 
   83    for (
int j = 0; j < 7; j++) {
 
   84      for (
unsigned int k = 0; k < daughters.size(); k++) {
 
   85        mother_errMatrix[i][j] += daughter_matrices[k][i][j];
 
   94  if (!ok) 
return false;
 
 
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class to store reconstructed particles.
unsigned getNDaughters(void) const
Returns number of daughter particles.
std::vector< Belle2::Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
void setMomentumVertexErrorMatrix(const TMatrixFSym &errMatrix)
Sets 7x7 error matrix.
void setPValue(double pValue)
Sets chi^2 probability of fit.
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
std::string m_listName
particle list name
bool add_matrix(Particle *p)
Main steering routine.
PseudoVertexFitterModule()
Constructor.
Type-safe access to single objects in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.