Belle II Software development
ParticleProperties.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
11namespace Belle2 {
20
21 ParticleProperties() = default;
24 explicit ParticleProperties(double value)
25 {
26 setAllTo(value);
27 }
28
29 static const int maxNweights = 160;
31 double mass;
32 double px;
33 double py;
34 double pz;
35 double pt;
36 double ptot;
37 double cosTheta;
38 double phi;
39 double x;
40 double y;
41 double z;
50 int pdg_gen;
51 double mass_gen;
52 double px_gen;
53 double py_gen;
54 double pz_gen;
55 double pt_gen;
56 double ptot_gen;
57 double cosTheta_gen;
58 double phi_gen;
59 double x_gen;
60 double y_gen;
61 double z_gen;
67 void setAllTo(double value)
68 {
69 mass = value;
70 px = value;
71 py = value;
72 pz = value;
73 pt = value;
74 ptot = value;
75 cosTheta = value;
76 phi = value;
77 x = value;
78 y = value;
79 z = value;
80
81 nPXDhits = (int)value;
82 nSVDhits = (int)value;
83 nCDChits = (int)value;
84
85 nWeights = 0;
86 for (int i = 0; i < maxNweights; ++i)
87 weights[i] = 0;
88
89 pdg_gen = 0;
90 mass_gen = value;
91 px_gen = value;
92 py_gen = value;
93 pz_gen = value;
94 pt_gen = value;
95 ptot_gen = value;
96 cosTheta_gen = value;
97 phi_gen = value;
98 x_gen = value;
99 y_gen = value;
100 z_gen = value;
101 }
102
106 void operator=(double value)
107 {
108 setAllTo(value);
109 }
110 };
111
113}
Abstract base class for different kinds of events.
This struct is used by the StandardTrackingPerformanceModule to save information of reconstructed tra...
double pt
measured transverse momentum
void operator=(double value)
Same as setAllTo but usable as C++ assignment operator.
int nCDChits
Number of CDC hits in reconstructed track
double pz
measured momentum in z direction
double x_gen
x value of generated position
double phi_gen
azimuthal angle of generated momentum vector
float weights[maxNweights]
Weights of the hits in sequence
int pdg_gen
PDG code of generated particle.
ParticleProperties()=default
default constructor
double pt_gen
generated transverse momentum
double mass_gen
generated mass
double y_gen
y value of generated position
int nPXDhits
Number of PXD hits in reconstructed track
int nSVDhits
Number of SVD hits in reconstructed track
ParticleProperties(double value)
constructor which sets all members to the given value
double px
measured momentum in x direction
static const int maxNweights
the maximum number of stored weights
double z
measured z value of position
int nWeights
Number of entries in weights array
double y
measured y value of position
double ptot_gen
generated total momentum
double py
measured momentum in y direction
double phi
azimuthal angle of measured momentum vector
double cosTheta
polar angle of measured momentum vector
void setAllTo(double value)
Set all the values of the data structure to one value for initialization.
double pz_gen
generated momentum in z direction
double py_gen
generated momentum in y direction
double cosTheta_gen
polar angle of generated momentum vector
double px_gen
generated momentum in x direction
double z_gen
z value of generated position
double x
measured x value of position
double ptot
measured total momentum