Belle II Software development
TOPSimPhoton.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 <Math/Vector3D.h>
13#include <Math/Point3D.h>
14
15
16namespace Belle2 {
21
27
29 public:
30
35 {}
36
50 int moduleID,
51 ROOT::Math::XYZPoint emissionPoint,
52 ROOT::Math::XYZVector emissionMom,
53 double emissionTime,
54 ROOT::Math::XYZPoint detectionPoint,
55 ROOT::Math::XYZVector detectionMom,
56 double detectionTime,
57 double length,
58 double energy_eV
59 )
60 {
61 m_moduleID = moduleID;
62 m_xe = (float) emissionPoint.X();
63 m_ye = (float) emissionPoint.Y();
64 m_ze = (float) emissionPoint.Z();
65 m_pxe = (float) emissionMom.X();
66 m_pye = (float) emissionMom.Y();
67 m_pze = (float) emissionMom.Z();
68 m_te = (float) emissionTime;
69 m_xd = (float) detectionPoint.X();
70 m_yd = (float) detectionPoint.Y();
71 m_zd = (float) detectionPoint.Z();
72 m_pxd = (float) detectionMom.X();
73 m_pyd = (float) detectionMom.Y();
74 m_pzd = (float) detectionMom.Z();
75 m_td = (float) detectionTime;
76 m_length = (float) length;
77 m_energy = (float) energy_eV;
78 }
79
84 int getModuleID() const { return m_moduleID; }
85
90 ROOT::Math::XYZPoint getEmissionPoint() const {return ROOT::Math::XYZPoint(m_xe, m_ye, m_ze);}
91
96 ROOT::Math::XYZVector getEmissionDir() const {return ROOT::Math::XYZVector(m_pxe, m_pye, m_pze).Unit();}
97
102 double getEmissionTime() const { return m_te; }
103
108 ROOT::Math::XYZPoint getDetectionPoint() const {return ROOT::Math::XYZPoint(m_xd, m_yd, m_zd);}
109
114 ROOT::Math::XYZVector getDetectionDir() const {return ROOT::Math::XYZVector(m_pxd, m_pyd, m_pzd).Unit();}
115
120 double getDetectionTime() const { return m_td; }
121
126 double getLength() const { return m_length; }
127
132 double getEnergy() const { return m_energy; }
133
134 private:
135 int m_moduleID = 0;
136 float m_xe = 0;
137 float m_ye = 0;
138 float m_ze = 0;
139 float m_pxe = 0;
140 float m_pye = 0;
141 float m_pze = 0;
142 float m_te = 0;
143 float m_xd = 0;
144 float m_yd = 0;
145 float m_zd = 0;
146 float m_pxd = 0;
147 float m_pyd = 0;
148 float m_pzd = 0;
149 float m_td = 0;
150 float m_length = 0;
151 float m_energy = 0;
152
154
155 };
156
157
159} // end namespace Belle2
160
161
float m_zd
detection point, z component
double getDetectionTime() const
Returns detection time.
ROOT::Math::XYZPoint getEmissionPoint() const
Returns emission point.
float m_ye
emission point, y component
float m_pxd
detection momentum (direction), x component
float m_xe
emission point, x component
float m_td
detection time
float m_energy
photon energy in [eV]
double getEnergy() const
Returns photon energy.
TOPSimPhoton(int moduleID, ROOT::Math::XYZPoint emissionPoint, ROOT::Math::XYZVector emissionMom, double emissionTime, ROOT::Math::XYZPoint detectionPoint, ROOT::Math::XYZVector detectionMom, double detectionTime, double length, double energy_eV)
Full constructor.
float m_pze
emission momentum (direction), z component
int m_moduleID
TOP module ID.
ClassDef(TOPSimPhoton, 2)
ClassDef.
float m_pzd
detection momentum (direction), z component
int getModuleID() const
Returns module ID.
TOPSimPhoton()
Default constructor.
float m_pye
emission momentum (direction), y component
float m_pyd
detection momentum (direction), y component
float m_yd
detection point, y component
float m_te
emission time
ROOT::Math::XYZPoint getDetectionPoint() const
Returns detection point.
ROOT::Math::XYZVector getDetectionDir() const
Returns detection momentum direction (unit vector)
double getEmissionTime() const
Returns emission time.
float m_ze
emission point, z component
ROOT::Math::XYZVector getEmissionDir() const
Returns emission momentum direction (unit vector)
float m_xd
detection point, x component
float m_length
propagation length
float m_pxe
emission momentum (direction), x component
double getLength() const
Returns propagation length.
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.