Belle II Software  release-05-02-19
TOPAssociatedPDF.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/datastore/RelationsObject.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  class TOPAssociatedPDF : public RelationsObject {
26 
27  public:
28 
32  struct PDFPeak {
33  float position = 0;
34  float width = 0;
35  float numPhotons = 0;
36  float fic = 0;
37  float e = 0;
38  float sige = 0;
39  int nx = 0;
40  int ny = 0;
41  int nxm = 0;
42  int nym = 0;
43  int nxe = 0;
44  int nye = 0;
45  float xd = 0;
46  float yd = 0;
47  int type = 0;
48  float kxe = 0;
49  float kye = 0;
50  float kze = 0;
51  float kxd = 0;
52  float kyd = 0;
53  float kzd = 0;
54  };
55 
60 
64  explicit TOPAssociatedPDF(int PDG): m_PDG(PDG)
65  {}
66 
70  void appendPeak(const PDFPeak& peak, float weight)
71  {
72  m_peaks.push_back(peak);
73  m_weights.push_back(weight);
74  }
75 
79  void setBackgroundWeight(float weight)
80  {
81  m_BGWeight = weight;
82  }
83 
87  int getPDGHypothesis() const {return m_PDG;}
88 
92  const std::vector<PDFPeak>& getPeaks() const {return m_peaks;}
93 
97  const std::vector<float>& getWeights() const {return m_weights;}
98 
102  float getBGWeight() const {return m_BGWeight;}
103 
108  const PDFPeak* getSinglePeak() const;
109 
110  private:
111 
112  int m_PDG = 0;
113  std::vector<PDFPeak> m_peaks;
114  std::vector<float> m_weights;
115  float m_BGWeight = 0;
119  };
120 
122 }
Belle2::TOPAssociatedPDF::PDFPeak::kyd
float kyd
reconstructed photon direction in y at detection
Definition: TOPAssociatedPDF.h:60
Belle2::TOPAssociatedPDF::m_PDG
int m_PDG
PDG code of a particle hypothesis used to construct PDF.
Definition: TOPAssociatedPDF.h:120
Belle2::TOPAssociatedPDF::m_BGWeight
float m_BGWeight
background weight
Definition: TOPAssociatedPDF.h:123
Belle2::TOPAssociatedPDF::getPeaks
const std::vector< PDFPeak > & getPeaks() const
Returns a collection of associated PDF peaks.
Definition: TOPAssociatedPDF.h:100
Belle2::TOPAssociatedPDF::PDFPeak::width
float width
width (sigma)
Definition: TOPAssociatedPDF.h:42
Belle2::TOPAssociatedPDF::getSinglePeak
const PDFPeak * getSinglePeak() const
Returns a PDF peak selected randomly according to weights.
Definition: TOPAssociatedPDF.cc:30
Belle2::TOPAssociatedPDF::getPDGHypothesis
int getPDGHypothesis() const
Returns PDG code of a particle hypothesis used to construct PDF.
Definition: TOPAssociatedPDF.h:95
Belle2::TOPAssociatedPDF::m_peaks
std::vector< PDFPeak > m_peaks
collection of associated PDF peaks
Definition: TOPAssociatedPDF.h:121
Belle2::TOPAssociatedPDF::PDFPeak::kye
float kye
reconstructed photon direction in y at emission
Definition: TOPAssociatedPDF.h:57
Belle2::TOPAssociatedPDF::getBGWeight
float getBGWeight() const
Returns background weight.
Definition: TOPAssociatedPDF.h:110
Belle2::TOPAssociatedPDF::PDFPeak
parameters of a PDF peak
Definition: TOPAssociatedPDF.h:40
Belle2::TOPAssociatedPDF::m_weights
std::vector< float > m_weights
corresponding weights
Definition: TOPAssociatedPDF.h:122
Belle2::TOPAssociatedPDF::PDFPeak::xd
float xd
unfolded x coordinate of a pixel
Definition: TOPAssociatedPDF.h:53
Belle2::TOPAssociatedPDF::PDFPeak::nxm
int nxm
number of reflections in x before mirror
Definition: TOPAssociatedPDF.h:49
Belle2::TOPAssociatedPDF::appendPeak
void appendPeak(const PDFPeak &peak, float weight)
Append PDF peak.
Definition: TOPAssociatedPDF.h:78
Belle2::TOPAssociatedPDF::TOPAssociatedPDF
TOPAssociatedPDF()
Default constructor.
Definition: TOPAssociatedPDF.h:67
Belle2::TOPAssociatedPDF::PDFPeak::nye
int nye
number of reflections in y in prism
Definition: TOPAssociatedPDF.h:52
Belle2::TOPAssociatedPDF::PDFPeak::nxe
int nxe
number of reflections in x in prism
Definition: TOPAssociatedPDF.h:51
Belle2::TOPAssociatedPDF::setBackgroundWeight
void setBackgroundWeight(float weight)
Set background weight.
Definition: TOPAssociatedPDF.h:87
Belle2::TOPAssociatedPDF::PDFPeak::nx
int nx
total number of reflections in x
Definition: TOPAssociatedPDF.h:47
Belle2::TOPAssociatedPDF::getWeights
const std::vector< float > & getWeights() const
Returns weights of associated PDF peaks.
Definition: TOPAssociatedPDF.h:105
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPAssociatedPDF::PDFPeak::fic
float fic
Cerenkov azimuthal angle phi.
Definition: TOPAssociatedPDF.h:44
Belle2::TOPAssociatedPDF::PDFPeak::position
float position
position in time
Definition: TOPAssociatedPDF.h:41
Belle2::TOPAssociatedPDF::PDFPeak::ny
int ny
total number of reflections in y
Definition: TOPAssociatedPDF.h:48
Belle2::TOPAssociatedPDF::PDFPeak::type
int type
0 unknown, 1 direct photon, 2 reflected photon
Definition: TOPAssociatedPDF.h:55
Belle2::TOPAssociatedPDF::ClassDefOverride
ClassDefOverride(TOPAssociatedPDF, 1)
ClassDef.
Belle2::TOPAssociatedPDF::PDFPeak::e
float e
mean photon energy [eV]
Definition: TOPAssociatedPDF.h:45
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TOPAssociatedPDF::PDFPeak::numPhotons
float numPhotons
number of photons
Definition: TOPAssociatedPDF.h:43
Belle2::TOPAssociatedPDF::PDFPeak::kzd
float kzd
reconstructed photon direction in z at detection
Definition: TOPAssociatedPDF.h:61
Belle2::TOPAssociatedPDF::PDFPeak::kze
float kze
reconstructed photon direction in z at emission
Definition: TOPAssociatedPDF.h:58
Belle2::TOPAssociatedPDF::PDFPeak::yd
float yd
unfolded y coordinate of a pixel
Definition: TOPAssociatedPDF.h:54
Belle2::TOPAssociatedPDF::PDFPeak::sige
float sige
photon energy sigma squared [eV^2]
Definition: TOPAssociatedPDF.h:46
Belle2::TOPAssociatedPDF::PDFPeak::nym
int nym
number of reflections in y before mirror
Definition: TOPAssociatedPDF.h:50
Belle2::TOPAssociatedPDF::PDFPeak::kxd
float kxd
reconstructed photon direction in x at detection
Definition: TOPAssociatedPDF.h:59
Belle2::TOPAssociatedPDF
Class to store analytic PDF associated with a photon.
Definition: TOPAssociatedPDF.h:33
Belle2::TOPAssociatedPDF::PDFPeak::kxe
float kxe
reconstructed photon direction in x at emission
Definition: TOPAssociatedPDF.h:56