Belle II Software  release-05-02-19
MicrotpcSimHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter, Igal Jaegle *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef MicrotpcSIMHIT_H
12 #define MicrotpcSIMHIT_H
13 
14 #include <simulation/dataobjects/SimHitBase.h>
15 
16 // ROOT
17 #include <TVector3.h>
18 
19 namespace Belle2 {
32  class MicrotpcSimHit : public SimHitBase {
33  public:
34  //typedef std::vector<unsigned int>::iterator iterator;
35  //typedef std::vector<unsigned int>::const_iterator const_iterator;
36 
39  m_tkMom(), m_tkMomDir() {}
40 
41 
45  MicrotpcSimHit(int tkID, float energyDep, float energyNiel, int tkPDG, float tkKEnergy, float detNb, float GlTime,
46  const float* tkPos, const float* tkMom, const float* tkMomDir):
47  SimHitBase(), m_tkID(tkID), m_energyDep(energyDep), m_energyNiel(energyNiel), m_tkPDG(tkPDG), m_tkKEnergy(tkKEnergy),
48  m_detNb(detNb), m_GlTime(GlTime)
49  {
50  std::copy(tkPos, tkPos + 3, m_tkPos);
51  std::copy(tkMom, tkMom + 3, m_tkMom);
52  std::copy(tkMomDir, tkMomDir + 3, m_tkMomDir);
53  }
54 
56  int gettkID() const { return m_tkID; }
58  float getEnergyDep() const { return m_energyDep; }
60  float getEnergyNiel() const { return m_energyNiel; }
62  int gettkPDG() const { return m_tkPDG; }
64  float gettkKEnergy() const { return m_tkKEnergy; }
66  float getdetNb() const { return m_detNb; }
68  float getGlTime() const { return m_GlTime; }
70  TVector3 gettkPos() const { return TVector3(m_tkPos[0], m_tkPos[1], m_tkPos[2]); }
72  TVector3 gettkMom() const { return TVector3(m_tkMom[0], m_tkMom[1], m_tkMom[2]); }
74  TVector3 gettkMomDir() const { return TVector3(m_tkMomDir[0], m_tkMomDir[1], m_tkMomDir[2]); }
76  const float* gettkPosArray() const { return m_tkPos; }
78  const float* getrkDirArray() const { return m_tkMom; }
80  const float* getrkMomDirArray() const { return m_tkMomDir; }
81 
82 
83  private:
85  int m_tkID;
87  float m_energyDep;
89  float m_energyNiel;
91  int m_tkPDG;
93  float m_tkKEnergy;
95  float m_detNb;
97  float m_GlTime;
99  float m_tkPos[3];
101  float m_tkMom[3];
103  float m_tkMomDir[3];
104 
105 
107  };
108 
110 } // end namespace Belle2
111 
112 #endif
Belle2::MicrotpcSimHit::gettkMomDir
TVector3 gettkMomDir() const
Return the track momentum direction.
Definition: MicrotpcSimHit.h:82
Belle2::MicrotpcSimHit::gettkPosArray
const float * gettkPosArray() const
Return track position as float array.
Definition: MicrotpcSimHit.h:84
Belle2::MicrotpcSimHit::gettkMom
TVector3 gettkMom() const
Return the track momentum.
Definition: MicrotpcSimHit.h:80
Belle2::MicrotpcSimHit::getrkMomDirArray
const float * getrkMomDirArray() const
Return track momentum direction as float array.
Definition: MicrotpcSimHit.h:88
Belle2::MicrotpcSimHit::gettkPos
TVector3 gettkPos() const
Return the track position.
Definition: MicrotpcSimHit.h:78
Belle2::MicrotpcSimHit::getGlTime
float getGlTime() const
Return the global time.
Definition: MicrotpcSimHit.h:76
Belle2::MicrotpcSimHit::m_tkMom
float m_tkMom[3]
track momentum
Definition: MicrotpcSimHit.h:109
Belle2::MicrotpcSimHit::m_tkPDG
int m_tkPDG
PDG number of the track.
Definition: MicrotpcSimHit.h:99
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::MicrotpcSimHit::getEnergyNiel
float getEnergyNiel() const
Return the non-ionization energy in electrons.
Definition: MicrotpcSimHit.h:68
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::MicrotpcSimHit
ClassMicrotpcSimHit - Geant4 simulated hit for the Microtpc detector.
Definition: MicrotpcSimHit.h:40
Belle2::MicrotpcSimHit::m_GlTime
float m_GlTime
global time
Definition: MicrotpcSimHit.h:105
Belle2::MicrotpcSimHit::m_detNb
float m_detNb
detector number
Definition: MicrotpcSimHit.h:103
Belle2::MicrotpcSimHit::getEnergyDep
float getEnergyDep() const
Return the energy deposition in electrons.
Definition: MicrotpcSimHit.h:66
Belle2::MicrotpcSimHit::gettkID
int gettkID() const
Return track ID.
Definition: MicrotpcSimHit.h:64
Belle2::MicrotpcSimHit::MicrotpcSimHit
MicrotpcSimHit()
default constructor for ROOT
Definition: MicrotpcSimHit.h:46
Belle2::MicrotpcSimHit::m_energyNiel
float m_energyNiel
Non-ionization energy in electrons.
Definition: MicrotpcSimHit.h:97
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MicrotpcSimHit::getdetNb
float getdetNb() const
Return the TPC number.
Definition: MicrotpcSimHit.h:74
Belle2::MicrotpcSimHit::m_tkKEnergy
float m_tkKEnergy
kinetic energy of the track
Definition: MicrotpcSimHit.h:101
Belle2::MicrotpcSimHit::m_tkPos
float m_tkPos[3]
track position
Definition: MicrotpcSimHit.h:107
Belle2::MicrotpcSimHit::getrkDirArray
const float * getrkDirArray() const
Return track momentum as float array.
Definition: MicrotpcSimHit.h:86
Belle2::MicrotpcSimHit::gettkKEnergy
float gettkKEnergy() const
Return the kinetic energy of the track.
Definition: MicrotpcSimHit.h:72
Belle2::MicrotpcSimHit::m_energyDep
float m_energyDep
Deposited energy in electrons.
Definition: MicrotpcSimHit.h:95
Belle2::MicrotpcSimHit::m_tkID
int m_tkID
Track ID.
Definition: MicrotpcSimHit.h:93
Belle2::MicrotpcSimHit::gettkPDG
int gettkPDG() const
Return the PDG number of the track.
Definition: MicrotpcSimHit.h:70
Belle2::MicrotpcSimHit::m_tkMomDir
float m_tkMomDir[3]
track momentum direction
Definition: MicrotpcSimHit.h:111