Belle II Software development
TOPAssociatedPDF.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 <vector>
13
14namespace Belle2 {
24
25 public:
26
30 struct PDFPeak {
31 float position = 0;
32 float width = 0;
33 float numPhotons = 0;
34 float fic = 0;
35 float e = 0;
36 float sige = 0;
37 int nx = 0;
38 int ny = 0;
39 int nxm = 0;
40 int nym = 0;
41 int nxe = 0;
42 int nye = 0;
43 float xd = 0;
44 float yd = 0;
45 int type = 0;
46 float kxe = 0;
47 float kye = 0;
48 float kze = 0;
49 float kxd = 0;
50 float kyd = 0;
51 float kzd = 0;
52 };
53
58
62 explicit TOPAssociatedPDF(int PDG): m_PDG(PDG)
63 {}
64
68 void appendPeak(const PDFPeak& peak, float weight)
69 {
70 m_peaks.push_back(peak);
71 m_weights.push_back(weight);
72 }
73
77 void setBackgroundWeight(float weight)
78 {
79 m_BGWeight = weight;
80 }
81
85 void setDeltaRayWeight(float weight)
86 {
87 m_deltaRayWeight = weight;
88 }
89
93 int getPDGHypothesis() const {return m_PDG;}
94
98 const std::vector<PDFPeak>& getPeaks() const {return m_peaks;}
99
103 const std::vector<float>& getWeights() const {return m_weights;}
104
108 float getBGWeight() const {return m_BGWeight;}
109
113 float getDeltaRayWeight() const {return m_deltaRayWeight;}
114
119 const PDFPeak* getSinglePeak() const;
120
121 private:
122
123 int m_PDG = 0;
124 std::vector<PDFPeak> m_peaks;
125 std::vector<float> m_weights;
126 float m_BGWeight = 0;
131 };
132
134}
Defines interface for accessing relations of objects in StoreArray.
Class to store analytic PDF associated with a photon.
std::vector< float > m_weights
corresponding weights
void setBackgroundWeight(float weight)
Set background weight.
const std::vector< PDFPeak > & getPeaks() const
Returns a collection of associated PDF peaks.
void setDeltaRayWeight(float weight)
Set delta-ray weight.
float getDeltaRayWeight() const
Returns delta-ray weight.
float getBGWeight() const
Returns background weight.
int m_PDG
PDG code of a particle hypothesis used to construct PDF.
float m_deltaRayWeight
delta-ray weight
std::vector< PDFPeak > m_peaks
collection of associated PDF peaks
void appendPeak(const PDFPeak &peak, float weight)
Append PDF peak.
const std::vector< float > & getWeights() const
Returns weights of associated PDF peaks.
TOPAssociatedPDF(int PDG)
Useful constructor.
int getPDGHypothesis() const
Returns PDG code of a particle hypothesis used to construct PDF.
float m_BGWeight
background weight
TOPAssociatedPDF()
Default constructor.
ClassDefOverride(TOPAssociatedPDF, 2)
ClassDef.
const PDFPeak * getSinglePeak() const
Returns a PDF peak selected randomly according to weights.
Abstract base class for different kinds of events.
parameters of a PDF peak
int nx
total number of reflections in x
float kxd
reconstructed photon direction in x at detection
float fic
Cerenkov azimuthal angle phi.
float kze
reconstructed photon direction in z at emission
float e
mean photon energy [eV]
float xd
unfolded x coordinate of a pixel
int nym
number of reflections in y before mirror
int nxe
number of reflections in x in prism
int nye
number of reflections in y in prism
int nxm
number of reflections in x before mirror
float kzd
reconstructed photon direction in z at detection
float sige
photon energy sigma squared [eV^2]
int ny
total number of reflections in y
float numPhotons
number of photons
float kyd
reconstructed photon direction in y at detection
int type
0 unknown, 1 direct photon, 2 reflected photon
float yd
unfolded y coordinate of a pixel
float kxe
reconstructed photon direction in x at emission
float kye
reconstructed photon direction in y at emission