Belle II Software  release-05-01-25
FANGSSimHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2015 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 FANGSSIMHIT_H
12 #define FANGSSIMHIT_H
13 
14 #include <simulation/dataobjects/SimHitBase.h>
15 #include <stdint.h>
16 
17 #include <TVector3.h>
18 #include <algorithm>
19 
20 namespace Belle2 {
30  class FANGSSimHit : public SimHitBase {
31  public:
34  m_PDG(0), m_time(0), m_energyDep(0), m_length(0)
35  {
36  std::fill_n(m_momEntry, 3, 0.0);
37  std::fill_n(m_posEntry, 3, 0.0);
38  std::fill_n(m_localposEntry, 3, 0.0);
39  std::fill_n(m_posExit, 3, 0.0);
40  }
41 
45  FANGSSimHit(int trkID, int ladder, int sensor, int pdg, float time, float energyDep,
46  float length, const float* posEntry, const float* localposEntry,
47  const float* posExit, const float* momEntry):
48  SimHitBase(), m_trkID(trkID), m_ladder(ladder), m_sensor(sensor), m_PDG(pdg),
49  m_time(time), m_energyDep(energyDep), m_length(length)
50  {
51  std::copy_n(momEntry, 3, m_momEntry);
52  std::copy_n(posEntry, 3, m_posEntry);
53  std::copy_n(localposEntry, 3, m_localposEntry);
54  std::copy_n(posExit, 3, m_posExit);
55  }
56 
58  int gettrkID() const { return m_trkID; }
60  int getLadder() const { return m_ladder; }
62  int getSensor() const { return m_sensor; }
64  int getPDG() const { return m_PDG; }
66  float getTime() const { return m_time; }
68  float getEnergyDep() const { return m_energyDep; }
70  TVector3 getPosEntry() const { return TVector3(m_posEntry[0], m_posEntry[1], m_posEntry[2]); }
72  TVector3 getLocalPosEntry() const { return TVector3(m_localposEntry[0], m_localposEntry[1], m_localposEntry[2]); }
74  TVector3 getPosExit() const { return TVector3(m_posExit[0], m_posExit[1], m_posExit[2]); }
76  TVector3 getMomEntry() const { return TVector3(m_momEntry[0], m_momEntry[1], m_momEntry[2]); }
78  const float* getPosEntryArray() const { return m_posEntry; }
80  const float* getPosExitArray() const { return m_posExit; }
82  const float* getMomEntryArray() const { return m_momEntry; }
83 
84  private:
86  int m_trkID;
88  uint8_t m_ladder;
90  uint8_t m_sensor;
92  int m_PDG;
94  float m_time;
96  float m_energyDep;
98  float m_posEntry[3];
100  float m_localposEntry[3];
102  float m_posExit[3];
104  float m_momEntry[3];
106  float m_length;
107 
108 
109 
111  };
112 
114 } // end namespace Belle2
115 
116 #endif
Belle2::FANGSSimHit::m_energyDep
float m_energyDep
Deposited energy in GeV.
Definition: FANGSSimHit.h:104
Belle2::FANGSSimHit::m_posExit
float m_posExit[3]
exit position, global coordinates
Definition: FANGSSimHit.h:110
Belle2::FANGSSimHit
Class FANGSSimHit - Geant4 simulated hit for the FANGS detector.
Definition: FANGSSimHit.h:38
Belle2::FANGSSimHit::getPosEntryArray
const float * getPosEntryArray() const
Return track position as float array.
Definition: FANGSSimHit.h:86
Belle2::FANGSSimHit::m_trkID
int m_trkID
Track ID number.
Definition: FANGSSimHit.h:94
Belle2::FANGSSimHit::m_ladder
uint8_t m_ladder
Ladder id.
Definition: FANGSSimHit.h:96
Belle2::FANGSSimHit::m_time
float m_time
global time
Definition: FANGSSimHit.h:102
Belle2::FANGSSimHit::gettrkID
int gettrkID() const
Return track ID.
Definition: FANGSSimHit.h:66
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::FANGSSimHit::getPosExit
TVector3 getPosExit() const
Return the exit track position.
Definition: FANGSSimHit.h:82
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::FANGSSimHit::getPosExitArray
const float * getPosExitArray() const
Return track position as float array.
Definition: FANGSSimHit.h:88
Belle2::FANGSSimHit::getMomEntry
TVector3 getMomEntry() const
Return the track momentum.
Definition: FANGSSimHit.h:84
Belle2::FANGSSimHit::m_localposEntry
float m_localposEntry[3]
entry position, local coordinates
Definition: FANGSSimHit.h:108
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::FANGSSimHit::m_posEntry
float m_posEntry[3]
entry position, global coordinates
Definition: FANGSSimHit.h:106
Belle2::FANGSSimHit::getMomEntryArray
const float * getMomEntryArray() const
Return track momentum as float array.
Definition: FANGSSimHit.h:90
Belle2::FANGSSimHit::getSensor
int getSensor() const
Return the Sensor number (starting at 1, increasing with decreasing z)
Definition: FANGSSimHit.h:70
Belle2::FANGSSimHit::getLocalPosEntry
TVector3 getLocalPosEntry() const
Return the local entry track position.
Definition: FANGSSimHit.h:80
Belle2::FANGSSimHit::getEnergyDep
float getEnergyDep() const
Return the energy deposition in electrons.
Definition: FANGSSimHit.h:76
Belle2::FANGSSimHit::getPosEntry
TVector3 getPosEntry() const
Return the entry track position.
Definition: FANGSSimHit.h:78
Belle2::FANGSSimHit::getLadder
int getLadder() const
Return the Ladder number (starting at 1, increasing with phi)
Definition: FANGSSimHit.h:68
Belle2::FANGSSimHit::getPDG
int getPDG() const
Return the PDG number of the track.
Definition: FANGSSimHit.h:72
Belle2::FANGSSimHit::m_sensor
uint8_t m_sensor
Sensor id.
Definition: FANGSSimHit.h:98
Belle2::FANGSSimHit::getTime
float getTime() const
Return the global time.
Definition: FANGSSimHit.h:74
Belle2::FANGSSimHit::m_length
float m_length
track length
Definition: FANGSSimHit.h:114
Belle2::FANGSSimHit::m_PDG
int m_PDG
PDG number of the track.
Definition: FANGSSimHit.h:100
Belle2::FANGSSimHit::m_momEntry
float m_momEntry[3]
momentum at entry, global coordinates
Definition: FANGSSimHit.h:112
Belle2::FANGSSimHit::FANGSSimHit
FANGSSimHit()
default constructor for ROOT
Definition: FANGSSimHit.h:41