Belle II Software development
TPCG4TrackInfo.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#ifndef TPCTRACKINFO_H
10#define TPCTRACKINFO_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
30 class TPCG4TrackInfo : public SimHitBase {
31 public:
32
35
36
45 TPCG4TrackInfo(int trackID, int PDG, float Mass, float Energy, const float* vtx, const float* mom):
46 SimHitBase(), m_trackID(trackID), m_PDG(PDG), m_Mass(Mass), m_Energy(Energy)
47 {
48 std::copy(vtx, vtx + 3, m_vtx);
49 std::copy(mom, mom + 3, m_mom);
50 }
51
53 int getTrackID() const { return m_trackID; }
55 int getPDG() const { return m_PDG; }
57 float getMass() const { return m_Mass; }
59 float getEnergy() const { return m_Energy; }
61 ROOT::Math::XYZVector getProductionVertex() const { return ROOT::Math::XYZVector(m_vtx[0], m_vtx[1], m_vtx[2]); }
63 ROOT::Math::XYZVector getMomentum() const { return ROOT::Math::XYZVector(m_mom[0], m_mom[1], m_mom[2]); }
65 const float* getProductionVertexArray() const { return m_vtx; }
67 const float* getMomentumArray() const { return m_mom; }
68
69 private:
73 int m_PDG;
75 float m_Mass;
77 float m_Energy;
79 float m_vtx[3];
81 float m_mom[3];
82
84 };
85
87} // end namespace Belle2
88
89#endif
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Class TPCG4TrackInfo - Geant4 simulated hit for the Microtpc detector.
TPCG4TrackInfo(int trackID, int PDG, float Mass, float Energy, const float *vtx, const float *mom)
Standard constructor.
float getEnergy() const
Return energy.
const float * getProductionVertexArray() const
Return production array as float array.
float m_vtx[3]
Vertex.
float getMass() const
Return mass.
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex.
TPCG4TrackInfo()
default constructor for ROOT
int getTrackID() const
Return track ID.
int getPDG() const
Return PDG.
float m_mom[3]
Momentum.
ROOT::Math::XYZVector getMomentum() const
Return momentum.
const float * getMomentumArray() const
Return momentum as float array.
Abstract base class for different kinds of events.