Belle II Software  release-05-02-19
ParticleProperties.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Michael Ziegler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef PARTICLEPROPERTIES_H_
12 #define PARTICLEPROPERTIES_H_
13 
14 namespace Belle2 {
22  struct ParticleProperties {
23 
24  ParticleProperties() = default;
27  explicit ParticleProperties(double value)
28  {
29  setAllTo(value);
30  }
31 
32  static const int maxNweights = 160;
34  double mass;
35  double px;
36  double py;
37  double pz;
38  double pt;
39  double ptot;
40  double cosTheta;
41  double phi;
42  double x;
43  double y;
44  double z;
46  int nPXDhits;
47  int nSVDhits;
48  int nCDChits;
50  int nWeights;
53  int pdg_gen;
54  double mass_gen;
55  double px_gen;
56  double py_gen;
57  double pz_gen;
58  double pt_gen;
59  double ptot_gen;
60  double cosTheta_gen;
61  double phi_gen;
62  double x_gen;
63  double y_gen;
64  double z_gen;
70  void setAllTo(double value)
71  {
72  mass = value;
73  px = value;
74  py = value;
75  pz = value;
76  pt = value;
77  ptot = value;
78  cosTheta = value;
79  phi = value;
80  x = value;
81  y = value;
82  z = value;
83 
84  nPXDhits = (int)value;
85  nSVDhits = (int)value;
86  nCDChits = (int)value;
87 
88  nWeights = 0;
89  for (int i = 0; i < maxNweights; ++i)
90  weights[i] = 0;
91 
92  pdg_gen = 0;
93  mass_gen = value;
94  px_gen = value;
95  py_gen = value;
96  pz_gen = value;
97  pt_gen = value;
98  ptot_gen = value;
99  cosTheta_gen = value;
100  phi_gen = value;
101  x_gen = value;
102  y_gen = value;
103  z_gen = value;
104  }
105 
109  void operator=(double value)
110  {
111  setAllTo(value);
112  }
113  };
114 
116 }
117 
118 
119 #endif /* PARTICLEPROPERTIES_H_ */
Belle2::ParticleProperties::operator=
void operator=(double value)
Same as setAllTo but usable as C++ assignment operator.
Definition: ParticleProperties.h:117
Belle2::ParticleProperties::weights
float weights[maxNweights]
Weights of the hits in sequence
Definition: ParticleProperties.h:59
Belle2::ParticleProperties::py
double py
measured momentum in y direction
Definition: ParticleProperties.h:44
Belle2::ParticleProperties::ptot_gen
double ptot_gen
generated total momentum
Definition: ParticleProperties.h:67
Belle2::ParticleProperties::px
double px
measured momentum in x direction
Definition: ParticleProperties.h:43
Belle2::ParticleProperties::phi_gen
double phi_gen
azimuthal angle of generated momentum vector
Definition: ParticleProperties.h:69
Belle2::ParticleProperties::nWeights
int nWeights
Number of entries in weights array
Definition: ParticleProperties.h:58
Belle2::ParticleProperties::py_gen
double py_gen
generated momentum in y direction
Definition: ParticleProperties.h:64
Belle2::ParticleProperties::mass
double mass
measured mass
Definition: ParticleProperties.h:42
Belle2::ParticleProperties::pz_gen
double pz_gen
generated momentum in z direction
Definition: ParticleProperties.h:65
Belle2::ParticleProperties::mass_gen
double mass_gen
generated mass
Definition: ParticleProperties.h:62
Belle2::ParticleProperties::px_gen
double px_gen
generated momentum in x direction
Definition: ParticleProperties.h:63
Belle2::ParticleProperties::pt
double pt
measured transverse momentum
Definition: ParticleProperties.h:46
Belle2::ParticleProperties::nSVDhits
int nSVDhits
Number of SVD hits in reconstructed track
Definition: ParticleProperties.h:55
Belle2::ParticleProperties::cosTheta
double cosTheta
polar angle of measured momentum vector
Definition: ParticleProperties.h:48
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ParticleProperties::y
double y
measured y value of position
Definition: ParticleProperties.h:51
Belle2::ParticleProperties::nCDChits
int nCDChits
Number of CDC hits in reconstructed track
Definition: ParticleProperties.h:56
Belle2::ParticleProperties::pdg_gen
int pdg_gen
PDG code of generated particle.
Definition: ParticleProperties.h:61
Belle2::ParticleProperties::y_gen
double y_gen
y value of generated position
Definition: ParticleProperties.h:71
Belle2::ParticleProperties::setAllTo
void setAllTo(double value)
Set all the values of the data structure to one value for initialization.
Definition: ParticleProperties.h:78
Belle2::ParticleProperties::pt_gen
double pt_gen
generated transverse momentum
Definition: ParticleProperties.h:66
Belle2::ParticleProperties::nPXDhits
int nPXDhits
Number of PXD hits in reconstructed track
Definition: ParticleProperties.h:54
Belle2::ParticleProperties::cosTheta_gen
double cosTheta_gen
polar angle of generated momentum vector
Definition: ParticleProperties.h:68
Belle2::ParticleProperties::phi
double phi
azimuthal angle of measured momentum vector
Definition: ParticleProperties.h:49
Belle2::ParticleProperties::maxNweights
static const int maxNweights
the maximum number of stored weights
Definition: ParticleProperties.h:40
Belle2::ParticleProperties::ParticleProperties
ParticleProperties()=default
default constructor
Belle2::ParticleProperties::x
double x
measured x value of position
Definition: ParticleProperties.h:50
Belle2::ParticleProperties::z_gen
double z_gen
z value of generated position
Definition: ParticleProperties.h:72
Belle2::ParticleProperties::ptot
double ptot
measured total momentum
Definition: ParticleProperties.h:47
Belle2::ParticleProperties::x_gen
double x_gen
x value of generated position
Definition: ParticleProperties.h:70
Belle2::ParticleProperties::pz
double pz
measured momentum in z direction
Definition: ParticleProperties.h:45
Belle2::ParticleProperties::z
double z
measured z value of position
Definition: ParticleProperties.h:52