Belle II Software  release-06-02-00
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 <TVector3.h>
13 
14 namespace Belle2 {
26  class TOPBarHit : public RelationsObject {
27  public:
28 
33  {}
34 
49  int moduleID,
50  int PDG,
51  TVector3 origin,
52  TVector3 impact,
53  TVector3 momentum,
54  double time,
55  double length,
56  TVector3 impactLoc,
57  double theta,
58  double phi
59  )
60  {
61  m_moduleID = moduleID;
62  m_pdg = PDG;
63  m_x0 = (float) origin.x();
64  m_y0 = (float) origin.y();
65  m_z0 = (float) origin.z();
66  m_x = (float) impact.x();
67  m_y = (float) impact.y();
68  m_z = (float) impact.z();
69  m_px = (float) momentum.x();
70  m_py = (float) momentum.y();
71  m_pz = (float) momentum.z();
72  m_time = (float) time;
73  m_length = (float) length;
74  m_xloc = (float) impactLoc.x();
75  m_yloc = (float) impactLoc.y();
76  m_zloc = (float) impactLoc.z();
77  m_theta = (float) theta;
78  m_phi = (float) phi;
79  }
80 
85  int getModuleID() const { return m_moduleID;}
86 
91  int getPDG() const { return m_pdg; }
92 
97  TVector3 getProductionPoint() const {return TVector3(m_x0, m_y0, m_z0);}
98 
103  TVector3 getPosition() const { return TVector3(m_x, m_y, m_z);}
104 
109  TVector3 getLocalPosition() const { return TVector3(m_xloc, m_yloc, m_zloc);}
110 
115  TVector3 getMomentum() const {return TVector3(m_px, m_py, m_pz); }
116 
121  double getLength() const { return m_length; }
122 
127  double getTime() const { return m_time; }
128 
133  double getTheta() const {return m_theta;}
134 
139  double getPhi() const {return m_phi;}
140 
141  private:
142 
143  int m_moduleID = 0;
144  int m_pdg = 0;
145  float m_x0 = 0;
146  float m_y0 = 0;
147  float m_z0 = 0;
148  float m_x = 0;
149  float m_y = 0;
150  float m_z = 0;
151  float m_px = 0;
152  float m_py = 0;
153  float m_pz = 0;
154  float m_time = 0;
155  float m_length = 0;
156  float m_xloc = 0;
157  float m_yloc = 0;
158  float m_zloc = 0;
159  float m_theta = 0;
160  float m_phi = 0;
164  };
165 
166 
168 } // end namespace Belle2
169 
170 
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:26
float m_z0
production point, z component
Definition: TOPBarHit.h:147
float m_time
impact time
Definition: TOPBarHit.h:154
float m_xloc
impact point, x component in local (bar) frame
Definition: TOPBarHit.h:156
float m_zloc
impact point, z component in local (bar) frame
Definition: TOPBarHit.h:158
TOPBarHit(int moduleID, int PDG, TVector3 origin, TVector3 impact, TVector3 momentum, double time, double length, TVector3 impactLoc, double theta, double phi)
Full constructor.
Definition: TOPBarHit.h:48
double getPhi() const
Returns azimuthal angle in local (bar) frame.
Definition: TOPBarHit.h:139
TVector3 getLocalPosition() const
Returns impact point.
Definition: TOPBarHit.h:109
float m_phi
impact azimuthal angle in local (bar) frame
Definition: TOPBarHit.h:160
TVector3 getMomentum() const
Returns impact momentum.
Definition: TOPBarHit.h:115
int m_moduleID
TOP module ID.
Definition: TOPBarHit.h:143
int m_pdg
PDG code of particle.
Definition: TOPBarHit.h:144
float m_py
impact momentum, y component
Definition: TOPBarHit.h:152
float m_y0
production point, y component
Definition: TOPBarHit.h:146
TOPBarHit()
Default constructor.
Definition: TOPBarHit.h:32
int getModuleID() const
Returns module ID.
Definition: TOPBarHit.h:85
float m_pz
impact momentum, z component
Definition: TOPBarHit.h:153
int getPDG() const
Returns PDG code of particle.
Definition: TOPBarHit.h:91
TVector3 getPosition() const
Returns impact point.
Definition: TOPBarHit.h:103
float m_x0
production point, x component
Definition: TOPBarHit.h:145
float m_px
impact momentum, x component
Definition: TOPBarHit.h:151
ClassDef(TOPBarHit, 3)
ClassDef.
float m_y
impact point, y component
Definition: TOPBarHit.h:149
TVector3 getProductionPoint() const
Returns production point.
Definition: TOPBarHit.h:97
float m_length
length of particle trajectory to impact point
Definition: TOPBarHit.h:155
float m_yloc
impact point, y component in local (bar) frame
Definition: TOPBarHit.h:157
float m_z
impact point, z component
Definition: TOPBarHit.h:150
float m_x
impact point, x component
Definition: TOPBarHit.h:148
double getTheta() const
Returns polar angle in local (bar) frame.
Definition: TOPBarHit.h:133
double getLength() const
Returns tract length from production to impact point.
Definition: TOPBarHit.h:121
double getTime() const
Returns time of impact.
Definition: TOPBarHit.h:127
float m_theta
impact polar angle in local (bar) frame
Definition: TOPBarHit.h:159
Abstract base class for different kinds of events.