Belle II Software development
TOPBarHit.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
15namespace Belle2 {
27 class TOPBarHit : public RelationsObject {
28 public:
29
34 {}
35
50 int moduleID,
51 int PDG,
52 ROOT::Math::XYZPoint origin,
53 ROOT::Math::XYZPoint impact,
54 ROOT::Math::XYZVector momentum,
55 double time,
56 double length,
57 ROOT::Math::XYZPoint impactLoc,
58 double theta,
59 double phi
60 )
61 {
62 m_moduleID = moduleID;
63 m_pdg = PDG;
64 m_x0 = (float) origin.X();
65 m_y0 = (float) origin.Y();
66 m_z0 = (float) origin.Z();
67 m_x = (float) impact.X();
68 m_y = (float) impact.Y();
69 m_z = (float) impact.Z();
70 m_px = (float) momentum.X();
71 m_py = (float) momentum.Y();
72 m_pz = (float) momentum.Z();
73 m_time = (float) time;
74 m_length = (float) length;
75 m_xloc = (float) impactLoc.X();
76 m_yloc = (float) impactLoc.Y();
77 m_zloc = (float) impactLoc.Z();
78 m_theta = (float) theta;
79 m_phi = (float) phi;
80 }
81
86 int getModuleID() const { return m_moduleID;}
87
92 int getPDG() const { return m_pdg; }
93
98 ROOT::Math::XYZPoint getProductionPoint() const {return ROOT::Math::XYZPoint(m_x0, m_y0, m_z0);}
99
104 ROOT::Math::XYZPoint getPosition() const { return ROOT::Math::XYZPoint(m_x, m_y, m_z);}
105
110 ROOT::Math::XYZPoint getLocalPosition() const { return ROOT::Math::XYZPoint(m_xloc, m_yloc, m_zloc);}
111
116 ROOT::Math::XYZVector getMomentum() const {return ROOT::Math::XYZVector(m_px, m_py, m_pz);}
117
122 double getLength() const { return m_length; }
123
128 double getTime() const { return m_time; }
129
134 double getTheta() const {return m_theta;}
135
140 double getPhi() const {return m_phi;}
141
142 private:
143
144 int m_moduleID = 0;
145 int m_pdg = 0;
146 float m_x0 = 0;
147 float m_y0 = 0;
148 float m_z0 = 0;
149 float m_x = 0;
150 float m_y = 0;
151 float m_z = 0;
152 float m_px = 0;
153 float m_py = 0;
154 float m_pz = 0;
155 float m_time = 0;
156 float m_length = 0;
157 float m_xloc = 0;
158 float m_yloc = 0;
159 float m_zloc = 0;
160 float m_theta = 0;
161 float m_phi = 0;
165 };
166
167
169} // end namespace Belle2
170
171
Defines interface for accessing relations of objects in StoreArray.
Class to store track parameters of incoming MC particles relation to MCParticle filled in top/simulat...
Definition: TOPBarHit.h:27
float m_z0
production point, z component
Definition: TOPBarHit.h:148
float m_time
impact time
Definition: TOPBarHit.h:155
float m_xloc
impact point, x component in local (bar) frame
Definition: TOPBarHit.h:157
ROOT::Math::XYZPoint getLocalPosition() const
Returns impact point.
Definition: TOPBarHit.h:110
float m_zloc
impact point, z component in local (bar) frame
Definition: TOPBarHit.h:159
double getPhi() const
Returns azimuthal angle in local (bar) frame.
Definition: TOPBarHit.h:140
float m_phi
impact azimuthal angle in local (bar) frame
Definition: TOPBarHit.h:161
ROOT::Math::XYZPoint getPosition() const
Returns impact point.
Definition: TOPBarHit.h:104
int m_moduleID
TOP module ID.
Definition: TOPBarHit.h:144
int m_pdg
PDG code of particle.
Definition: TOPBarHit.h:145
float m_py
impact momentum, y component
Definition: TOPBarHit.h:153
float m_y0
production point, y component
Definition: TOPBarHit.h:147
TOPBarHit()
Default constructor.
Definition: TOPBarHit.h:33
int getModuleID() const
Returns module ID.
Definition: TOPBarHit.h:86
ROOT::Math::XYZPoint getProductionPoint() const
Returns production point.
Definition: TOPBarHit.h:98
float m_pz
impact momentum, z component
Definition: TOPBarHit.h:154
TOPBarHit(int moduleID, int PDG, ROOT::Math::XYZPoint origin, ROOT::Math::XYZPoint impact, ROOT::Math::XYZVector momentum, double time, double length, ROOT::Math::XYZPoint impactLoc, double theta, double phi)
Full constructor.
Definition: TOPBarHit.h:49
int getPDG() const
Returns PDG code of particle.
Definition: TOPBarHit.h:92
float m_x0
production point, x component
Definition: TOPBarHit.h:146
float m_px
impact momentum, x component
Definition: TOPBarHit.h:152
ClassDef(TOPBarHit, 3)
ClassDef.
float m_y
impact point, y component
Definition: TOPBarHit.h:150
ROOT::Math::XYZVector getMomentum() const
Returns impact momentum.
Definition: TOPBarHit.h:116
float m_length
length of particle trajectory to impact point
Definition: TOPBarHit.h:156
float m_yloc
impact point, y component in local (bar) frame
Definition: TOPBarHit.h:158
float m_z
impact point, z component
Definition: TOPBarHit.h:151
float m_x
impact point, x component
Definition: TOPBarHit.h:149
double getTheta() const
Returns polar angle in local (bar) frame.
Definition: TOPBarHit.h:134
double getLength() const
Returns tract length from production to impact point.
Definition: TOPBarHit.h:122
double getTime() const
Returns time of impact.
Definition: TOPBarHit.h:128
float m_theta
impact polar angle in local (bar) frame
Definition: TOPBarHit.h:160
Abstract base class for different kinds of events.