Belle II Software development
VXDDedxLikelihood.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
9#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12#include <framework/gearbox/Const.h>
13
14#include <cmath>
15
16namespace Belle2 {
24 public:
27 {
28 //for all particles
29 for (unsigned int i = 0; i < Const::ChargedStable::c_SetSize; i++)
30 m_vxdLogl[i] = 0.0;
31 }
32
34 explicit VXDDedxLikelihood(const double* vxdLogl): RelationsObject()
35 {
36 //for all particles
37 for (unsigned int i = 0; i < Const::ChargedStable::c_SetSize; i++)
38 m_vxdLogl[i] = vxdLogl[i];
39 }
40
49 double getLogL(const Const::ChargedStable& type) const { return m_vxdLogl[type.getIndex()]; }
50
52 double getVXDLikelihood(const Const::ChargedStable& type) const { return exp((double)m_vxdLogl[type.getIndex()]); }
53
54 private:
58 };
60}
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:589
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:615
Defines interface for accessing relations of objects in StoreArray.
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
VXDDedxLikelihood(const double *vxdLogl)
actually const double (&logl)[Const::ChargedStable::c_SetSize], but CINT complains.
VXDDedxLikelihood()
default constructor
ClassDef(VXDDedxLikelihood, 1)
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
double getVXDLikelihood(const Const::ChargedStable &type) const
returns exp(getVXDLikelihood(type)) with sufficient precision.
double getLogL(const Const::ChargedStable &type) const
returns unnormalised log-likelihood value for a particle hypothesis using SVD (and/or PXD) informatio...
double m_vxdLogl[Const::ChargedStable::c_SetSize]
SVD (and/or PXD) log likelihood for each particle, not including momentum prior.
Abstract base class for different kinds of events.