Belle II Software development
TpcMCParticle.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 TPCMCPARTICLE_H
10#define TPCMCPARTICLE_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
30 class TpcMCParticle : public SimHitBase {
31 public:
32
35
36
44 TpcMCParticle(int PDG, float Mass, float Energy, const float* vtx, const float* mom):
45 SimHitBase(), m_PDG(PDG), m_Mass(Mass), m_Energy(Energy)
46 {
47 std::copy(vtx, vtx + 3, m_vtx);
48 std::copy(mom, mom + 3, m_mom);
49 }
50
52 int getPDG() const { return m_PDG; }
54 float getMass() const { return m_Mass; }
56 float getEnergy() const { return m_Energy; }
58 ROOT::Math::XYZVector getProductionVertex() const { return ROOT::Math::XYZVector(m_vtx[0], m_vtx[1], m_vtx[2]); }
60 ROOT::Math::XYZVector getMomentum() const { return ROOT::Math::XYZVector(m_mom[0], m_mom[1], m_mom[2]); }
62 const float* getProductionVertexArray() const { return m_vtx; }
64 const float* getMomentumArray() const { return m_mom; }
65
66 private:
68 int m_PDG;
70 float m_Mass;
72 float m_Energy;
74 float m_vtx[3];
76 float m_mom[3];
77
79 };
80
82} // end namespace Belle2
83
84#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 TpcMCParticle - Geant4 simulated hit for the Microtpc detector.
Definition: TpcMCParticle.h:30
float getEnergy() const
Return energy.
Definition: TpcMCParticle.h:56
const float * getProductionVertexArray() const
Return production array as float array.
Definition: TpcMCParticle.h:62
float m_vtx[3]
Vertex.
Definition: TpcMCParticle.h:74
float getMass() const
Return mass.
Definition: TpcMCParticle.h:54
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex.
Definition: TpcMCParticle.h:58
TpcMCParticle(int PDG, float Mass, float Energy, const float *vtx, const float *mom)
Standard constructor.
Definition: TpcMCParticle.h:44
int getPDG() const
Return PDG.
Definition: TpcMCParticle.h:52
float m_mom[3]
Momentum.
Definition: TpcMCParticle.h:76
ROOT::Math::XYZVector getMomentum() const
Return momentum.
Definition: TpcMCParticle.h:60
float m_Energy
Energy.
Definition: TpcMCParticle.h:72
TpcMCParticle()
default constructor for ROOT
Definition: TpcMCParticle.h:34
const float * getMomentumArray() const
Return momentum as float array.
Definition: TpcMCParticle.h:64
Abstract base class for different kinds of events.