Belle II Software  release-05-02-19
TOPBarHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric, Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/datastore/RelationsObject.h>
14 #include <TVector3.h>
15 
16 namespace Belle2 {
28  class TOPBarHit : public RelationsObject {
29  public:
30 
34  TOPBarHit()
35  {}
36 
50  TOPBarHit(
51  int moduleID,
52  int PDG,
53  TVector3 origin,
54  TVector3 impact,
55  TVector3 momentum,
56  double time,
57  double length,
58  TVector3 impactLoc,
59  double theta,
60  double phi
61  )
62  {
63  m_moduleID = moduleID;
64  m_pdg = PDG;
65  m_x0 = (float) origin.x();
66  m_y0 = (float) origin.y();
67  m_z0 = (float) origin.z();
68  m_x = (float) impact.x();
69  m_y = (float) impact.y();
70  m_z = (float) impact.z();
71  m_px = (float) momentum.x();
72  m_py = (float) momentum.y();
73  m_pz = (float) momentum.z();
74  m_time = (float) time;
75  m_length = (float) length;
76  m_xloc = (float) impactLoc.x();
77  m_yloc = (float) impactLoc.y();
78  m_zloc = (float) impactLoc.z();
79  m_theta = (float) theta;
80  m_phi = (float) phi;
81  }
82 
87  int getModuleID() const { return m_moduleID;}
88 
93  int getPDG() const { return m_pdg; }
94 
99  TVector3 getProductionPoint() const {return TVector3(m_x0, m_y0, m_z0);}
100 
105  TVector3 getPosition() const { return TVector3(m_x, m_y, m_z);}
106 
111  TVector3 getLocalPosition() const { return TVector3(m_xloc, m_yloc, m_zloc);}
112 
117  TVector3 getMomentum() const {return TVector3(m_px, m_py, m_pz); }
118 
123  double getLength() const { return m_length; }
124 
129  double getTime() const { return m_time; }
130 
135  double getTheta() const {return m_theta;}
136 
141  double getPhi() const {return m_phi;}
142 
143  private:
144 
145  int m_moduleID = 0;
146  int m_pdg = 0;
147  float m_x0 = 0;
148  float m_y0 = 0;
149  float m_z0 = 0;
150  float m_x = 0;
151  float m_y = 0;
152  float m_z = 0;
153  float m_px = 0;
154  float m_py = 0;
155  float m_pz = 0;
156  float m_time = 0;
157  float m_length = 0;
158  float m_xloc = 0;
159  float m_yloc = 0;
160  float m_zloc = 0;
161  float m_theta = 0;
162  float m_phi = 0;
166  };
167 
168 
170 } // end namespace Belle2
171 
172 
Belle2::TOPBarHit::m_py
float m_py
impact momentum, y component
Definition: TOPBarHit.h:162
Belle2::TOPBarHit::getLength
double getLength() const
Returns tract length from production to impact point.
Definition: TOPBarHit.h:131
Belle2::TOPBarHit::ClassDef
ClassDef(TOPBarHit, 3)
ClassDef.
Belle2::TOPBarHit::m_moduleID
int m_moduleID
TOP module ID.
Definition: TOPBarHit.h:153
Belle2::TOPBarHit::m_length
float m_length
length of particle trajectory to impact point
Definition: TOPBarHit.h:165
Belle2::TOPBarHit::m_pz
float m_pz
impact momentum, z component
Definition: TOPBarHit.h:163
Belle2::TOPBarHit::TOPBarHit
TOPBarHit()
Default constructor.
Definition: TOPBarHit.h:42
Belle2::TOPBarHit::m_theta
float m_theta
impact polar angle in local (bar) frame
Definition: TOPBarHit.h:169
Belle2::TOPBarHit::m_time
float m_time
impact time
Definition: TOPBarHit.h:164
Belle2::TOPBarHit::m_y0
float m_y0
production point, y component
Definition: TOPBarHit.h:156
Belle2::TOPBarHit::m_px
float m_px
impact momentum, x component
Definition: TOPBarHit.h:161
Belle2::TOPBarHit::m_x
float m_x
impact point, x component
Definition: TOPBarHit.h:158
Belle2::TOPBarHit::getTime
double getTime() const
Returns time of impact.
Definition: TOPBarHit.h:137
Belle2::TOPBarHit
Class to store track parameters of incoming MC particles relation to MCParticle filled in top/simulat...
Definition: TOPBarHit.h:36
Belle2::TOPBarHit::m_zloc
float m_zloc
impact point, z component in local (bar) frame
Definition: TOPBarHit.h:168
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPBarHit::getPhi
double getPhi() const
Returns azimuthal angle in local (bar) frame.
Definition: TOPBarHit.h:149
Belle2::TOPBarHit::getTheta
double getTheta() const
Returns polar angle in local (bar) frame.
Definition: TOPBarHit.h:143
Belle2::TOPBarHit::getLocalPosition
TVector3 getLocalPosition() const
Returns impact point.
Definition: TOPBarHit.h:119
Belle2::TOPBarHit::m_xloc
float m_xloc
impact point, x component in local (bar) frame
Definition: TOPBarHit.h:166
Belle2::TOPBarHit::getPosition
TVector3 getPosition() const
Returns impact point.
Definition: TOPBarHit.h:113
Belle2::TOPBarHit::m_x0
float m_x0
production point, x component
Definition: TOPBarHit.h:155
Belle2::TOPBarHit::getModuleID
int getModuleID() const
Returns module ID.
Definition: TOPBarHit.h:95
Belle2::TOPBarHit::m_z
float m_z
impact point, z component
Definition: TOPBarHit.h:160
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TOPBarHit::m_phi
float m_phi
impact azimuthal angle in local (bar) frame
Definition: TOPBarHit.h:170
Belle2::TOPBarHit::m_z0
float m_z0
production point, z component
Definition: TOPBarHit.h:157
Belle2::TOPBarHit::getPDG
int getPDG() const
Returns PDG code of particle.
Definition: TOPBarHit.h:101
Belle2::TOPBarHit::m_yloc
float m_yloc
impact point, y component in local (bar) frame
Definition: TOPBarHit.h:167
Belle2::TOPBarHit::m_y
float m_y
impact point, y component
Definition: TOPBarHit.h:159
Belle2::TOPBarHit::getMomentum
TVector3 getMomentum() const
Returns impact momentum.
Definition: TOPBarHit.h:125
Belle2::TOPBarHit::getProductionPoint
TVector3 getProductionPoint() const
Returns production point.
Definition: TOPBarHit.h:107
Belle2::TOPBarHit::m_pdg
int m_pdg
PDG code of particle.
Definition: TOPBarHit.h:154