Belle II Software development
SrsensorSimHit.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 SrsensorSIMHIT_H
10#define SrsensorSIMHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
30 class SrsensorSimHit : public SimHitBase {
31 public:
32 //typedef std::vector<unsigned int>::iterator iterator;
33 //typedef std::vector<unsigned int>::const_iterator const_iterator;
34
37 m_tkMomDir() {}
38
39
51 SrsensorSimHit(float energyDep, float energyNiel, int tkPDG, float tkKEnergy, float detNb, float GlTime, const float* tkPos,
52 const float* tkMom, const float* tkMomDir):
53 SimHitBase(), m_energyDep(energyDep), m_energyNiel(energyNiel), m_tkPDG(tkPDG), m_tkKEnergy(tkKEnergy), m_detNb(detNb),
54 m_GlTime(GlTime)
55 {
56 std::copy(tkPos, tkPos + 3, m_tkPos);
57 std::copy(tkMom, tkMom + 3, m_tkMom);
58 std::copy(tkMomDir, tkMomDir + 3, m_tkMomDir);
59 }
60
62 float getEnergyDep() const { return m_energyDep; }
64 float getEnergyNiel() const { return m_energyNiel; }
66 int gettkPDG() const { return m_tkPDG; }
68 float gettkKEnergy() const { return m_tkKEnergy; }
70 float getdetNb() const { return m_detNb; }
72 float getGlTime() const { return m_GlTime; }
74 ROOT::Math::XYZVector gettkPos() const { return ROOT::Math::XYZVector(m_tkPos[0], m_tkPos[1], m_tkPos[2]); }
76 ROOT::Math::XYZVector gettkMom() const { return ROOT::Math::XYZVector(m_tkMom[0], m_tkMom[1], m_tkMom[2]); }
78 ROOT::Math::XYZVector gettkMomDir() const { return ROOT::Math::XYZVector(m_tkMomDir[0], m_tkMomDir[1], m_tkMomDir[2]); }
80 const float* gettkPosArray() const { return m_tkPos; }
82 const float* getrkDirArray() const { return m_tkMom; }
84 const float* getrkMomDirArray() const { return m_tkMomDir; }
85
86
87 private:
97 float m_detNb;
99 float m_GlTime;
101 float m_tkPos[3];
103 float m_tkMom[3];
105 float m_tkMomDir[3];
106
107
109 };
110
112} // end namespace Belle2
113
114#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
ClassSrsensorSimHit - Geant4 simulated hit for the Srsensor detector.
const float * getrkMomDirArray() const
Return track momentum direction as float array.
float m_energyDep
Deposited energy in electrons.
int m_tkPDG
PDG number of the track.
SrsensorSimHit()
default constructor for ROOT
float m_tkMomDir[3]
track momentum direction
float m_energyNiel
Non-ionization energy in electrons.
float m_detNb
detector number
float m_tkMom[3]
track momentum
float getEnergyDep() const
Return the energy deposition in electrons.
SrsensorSimHit(float energyDep, float energyNiel, int tkPDG, float tkKEnergy, float detNb, float GlTime, const float *tkPos, const float *tkMom, const float *tkMomDir)
Standard constructor.
float m_GlTime
global time
float m_tkKEnergy
kinetic energy of the track
const float * getrkDirArray() const
Return track momentum as float array.
float gettkKEnergy() const
Return the kinetic energy of the track.
ROOT::Math::XYZVector gettkMom() const
Return the track momentum.
ROOT::Math::XYZVector gettkPos() const
Return the track position.
const float * gettkPosArray() const
Return track position as float array.
float getdetNb() const
Return the TPC number.
float getEnergyNiel() const
Return the non-ionization energy in electrons.
ROOT::Math::XYZVector gettkMomDir() const
Return the track momentum direction.
int gettkPDG() const
Return the PDG number of the track.
float getGlTime() const
Return the global time.
float m_tkPos[3]
track position
Abstract base class for different kinds of events.