Belle II Software  release-08-01-10
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 
16 namespace Belle2 {
28  class TOPSimPhoton : public RelationsObject {
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;
155  };
156 
157 
159 } // end namespace Belle2
160 
161 
Defines interface for accessing relations of objects in StoreArray.
Class to store Cherenkov photons at emission and at detection relation to TOPSimHit filled in top/sim...
Definition: TOPSimPhoton.h:28
float m_zd
detection point, z component
Definition: TOPSimPhoton.h:145
double getDetectionTime() const
Returns detection time.
Definition: TOPSimPhoton.h:120
ROOT::Math::XYZPoint getEmissionPoint() const
Returns emission point.
Definition: TOPSimPhoton.h:90
float m_ye
emission point, y component
Definition: TOPSimPhoton.h:137
float m_pxd
detection momentum (direction), x component
Definition: TOPSimPhoton.h:146
float m_xe
emission point, x component
Definition: TOPSimPhoton.h:136
float m_td
detection time
Definition: TOPSimPhoton.h:149
float m_energy
photon energy in [eV]
Definition: TOPSimPhoton.h:151
double getEnergy() const
Returns photon energy.
Definition: TOPSimPhoton.h:132
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.
Definition: TOPSimPhoton.h:49
float m_pze
emission momentum (direction), z component
Definition: TOPSimPhoton.h:141
int m_moduleID
TOP module ID.
Definition: TOPSimPhoton.h:135
ClassDef(TOPSimPhoton, 2)
ClassDef.
float m_pzd
detection momentum (direction), z component
Definition: TOPSimPhoton.h:148
int getModuleID() const
Returns module ID.
Definition: TOPSimPhoton.h:84
TOPSimPhoton()
Default constructor.
Definition: TOPSimPhoton.h:34
float m_pye
emission momentum (direction), y component
Definition: TOPSimPhoton.h:140
float m_pyd
detection momentum (direction), y component
Definition: TOPSimPhoton.h:147
float m_yd
detection point, y component
Definition: TOPSimPhoton.h:144
float m_te
emission time
Definition: TOPSimPhoton.h:142
ROOT::Math::XYZPoint getDetectionPoint() const
Returns detection point.
Definition: TOPSimPhoton.h:108
ROOT::Math::XYZVector getDetectionDir() const
Returns detection momentum direction (unit vector)
Definition: TOPSimPhoton.h:114
double getEmissionTime() const
Returns emission time.
Definition: TOPSimPhoton.h:102
float m_ze
emission point, z component
Definition: TOPSimPhoton.h:138
ROOT::Math::XYZVector getEmissionDir() const
Returns emission momentum direction (unit vector)
Definition: TOPSimPhoton.h:96
float m_xd
detection point, x component
Definition: TOPSimPhoton.h:143
float m_length
propagation length
Definition: TOPSimPhoton.h:150
float m_pxe
emission momentum (direction), x component
Definition: TOPSimPhoton.h:139
double getLength() const
Returns propagation length.
Definition: TOPSimPhoton.h:126
Abstract base class for different kinds of events.