Belle II Software  release-05-02-19
VXDDedxLikelihood.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jake Bennett, Christian Pulvermacher
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef VXDDEDXLIKELIHOOD_H
12 #define VXDDEDXLIKELIHOOD_H
13 
14 #include <framework/datastore/RelationsObject.h>
15 #include <framework/gearbox/Const.h>
16 
17 #include <cmath>
18 
19 namespace Belle2 {
26  class VXDDedxLikelihood : public RelationsObject {
27  public:
30  {
31  //for all particles
32  for (unsigned int i = 0; i < Const::ChargedStable::c_SetSize; i++)
33  m_vxdLogl[i] = 0.0;
34  }
35 
37  explicit VXDDedxLikelihood(const double* vxdLogl): RelationsObject()
38  {
39  //for all particles
40  for (unsigned int i = 0; i < Const::ChargedStable::c_SetSize; i++)
41  m_vxdLogl[i] = vxdLogl[i];
42  }
43 
52  double getLogL(const Const::ChargedStable& type) const { return m_vxdLogl[type.getIndex()]; }
53 
55  double getVXDLikelihood(const Const::ChargedStable& type) const { return exp((double)m_vxdLogl[type.getIndex()]); }
56 
57  private:
61  };
63 }
64 #endif
Belle2::Const::ChargedStable::c_SetSize
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:491
Belle2::VXDDedxLikelihood::m_vxdLogl
double m_vxdLogl[Const::ChargedStable::c_SetSize]
SVD (and/or PXD) log likelihood for each particle, not including momentum prior.
Definition: VXDDedxLikelihood.h:66
Belle2::VXDDedxLikelihood::getLogL
double getLogL(const Const::ChargedStable &type) const
returns unnormalised log-likelihood value for a particle hypothesis using SVD (and/or PXD) informatio...
Definition: VXDDedxLikelihood.h:60
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDDedxLikelihood
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
Definition: VXDDedxLikelihood.h:34
Belle2::VXDDedxLikelihood::VXDDedxLikelihood
VXDDedxLikelihood()
default constructor
Definition: VXDDedxLikelihood.h:37
Belle2::VXDDedxLikelihood::ClassDef
ClassDef(VXDDedxLikelihood, 1)
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
Belle2::VXDDedxLikelihood::getVXDLikelihood
double getVXDLikelihood(const Const::ChargedStable &type) const
returns exp(getVXDLikelihood(type)) with sufficient precision.
Definition: VXDDedxLikelihood.h:63
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::RelationsInterface
Defines interface for accessing relations of objects in StoreArray.
Definition: RelationsObject.h:102