Belle II Software  release-08-01-10
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 <TVector3.h>
16 
17 namespace 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  TVector3 getProductionVertex() const { return TVector3(m_vtx[0], m_vtx[1], m_vtx[2]); }
63  TVector3 getMomentum() const { return TVector3(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:
71  int m_trackID;
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.
float m_vtx[3]
Vertex.
float getMass() const
Return mass.
TVector3 getMomentum() const
Return momentum.
TPCG4TrackInfo()
default constructor for ROOT
int getTrackID() const
Return track ID.
int getPDG() const
Return PDG.
float m_mom[3]
Momentum.
const float * getProductionVertexArray() const
Return production array as float array.
TVector3 getProductionVertex() const
Return production vertex.
const float * getMomentumArray() const
Return momentum as float array.
Abstract base class for different kinds of events.