Belle II Software development
CLAWSSimHit.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 CLAWSSIMHIT_H
10#define CLAWSSIMHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13#include <stdint.h>
14
15#include <Math/Vector3D.h>
16#include <algorithm>
17
18namespace Belle2 {
28 class CLAWSSimHit : public SimHitBase {
29 public:
32 m_length(0), m_PDG(0), m_ladder(0), m_sensor(0)
33 {
34 std::fill_n(m_momEntry, 3, 0.0);
35 std::fill_n(m_posEntry, 3, 0.0);
36 std::fill_n(m_posExit, 3, 0.0);
37 }
38
51 CLAWSSimHit(int ladder, int sensor, int pdg, float time, float energyDep, float energyVisble,
52 float length, const float* posEntry, const float* posExit, const float* momEntry):
53 SimHitBase(), m_time(time), m_energyDep(energyDep), m_energyVisible(energyVisble),
54 m_length(length), m_PDG(pdg), m_ladder(ladder), m_sensor(sensor)
55 {
56 std::copy_n(momEntry, 3, m_momEntry);
57 std::copy_n(posEntry, 3, m_posEntry);
58 std::copy_n(posExit, 3, m_posExit);
59 }
60
62 int getLadder() const { return m_ladder; }
64 int getSensor() const { return m_sensor; }
66 int getPDG() const { return m_PDG; }
68 float getTime() const { return m_time; }
70 float getEnergyDep() const { return m_energyDep; }
72 float getEnergyVisible() const { return m_energyVisible; }
74 ROOT::Math::XYZVector getPosEntry() const { return ROOT::Math::XYZVector(m_posEntry[0], m_posEntry[1], m_posEntry[2]); }
76 ROOT::Math::XYZVector getPosExit() const { return ROOT::Math::XYZVector(m_posExit[0], m_posExit[1], m_posExit[2]); }
78 ROOT::Math::XYZVector getMomEntry() const { return ROOT::Math::XYZVector(m_momEntry[0], m_momEntry[1], m_momEntry[2]); }
80 const float* getPosEntryArray() const { return m_posEntry; }
82 const float* getPosExitArray() const { return m_posExit; }
84 const float* getMomEntryArray() const { return m_momEntry; }
85
86 private:
88 float m_time;
94 float m_posEntry[3];
96 float m_posExit[3];
98 float m_momEntry[3];
100 float m_length;
102 int m_PDG;
104 uint8_t m_ladder;
106 uint8_t m_sensor;
107
109 };
110
112} // end namespace Belle2
113
114#endif
Class CLAWSSimHit - Geant4 simulated hit for the CLAWS detector.
Definition: CLAWSSimHit.h:28
float m_posEntry[3]
entry position, global coordinates
Definition: CLAWSSimHit.h:94
float m_time
global time
Definition: CLAWSSimHit.h:88
uint8_t m_sensor
Sensor id.
Definition: CLAWSSimHit.h:106
CLAWSSimHit(int ladder, int sensor, int pdg, float time, float energyDep, float energyVisble, float length, const float *posEntry, const float *posExit, const float *momEntry)
Standard constructor.
Definition: CLAWSSimHit.h:51
CLAWSSimHit()
default constructor for ROOT
Definition: CLAWSSimHit.h:31
float m_energyVisible
Visible energy deposition according to Birks Law (in GeV)
Definition: CLAWSSimHit.h:92
float m_energyDep
Deposited energy in GeV.
Definition: CLAWSSimHit.h:90
ROOT::Math::XYZVector getPosEntry() const
Return the entry track position.
Definition: CLAWSSimHit.h:74
const float * getPosExitArray() const
Return track position as float array.
Definition: CLAWSSimHit.h:82
int m_PDG
PDG number of the track.
Definition: CLAWSSimHit.h:102
float getTime() const
Return the global time.
Definition: CLAWSSimHit.h:68
float getEnergyVisible() const
Return the non-ionization energy in electrons.
Definition: CLAWSSimHit.h:72
float getEnergyDep() const
Return the energy deposition in electrons.
Definition: CLAWSSimHit.h:70
int getLadder() const
Return the Ladder number (starting at 1, increasing with phi)
Definition: CLAWSSimHit.h:62
const float * getMomEntryArray() const
Return track momentum as float array.
Definition: CLAWSSimHit.h:84
ROOT::Math::XYZVector getPosExit() const
Return the exit track position.
Definition: CLAWSSimHit.h:76
int getSensor() const
Return the Sensor number (starting at 1, increasing with decreasing z)
Definition: CLAWSSimHit.h:64
int getPDG() const
Return the PDG number of the track.
Definition: CLAWSSimHit.h:66
const float * getPosEntryArray() const
Return track position as float array.
Definition: CLAWSSimHit.h:80
ROOT::Math::XYZVector getMomEntry() const
Return the track momentum.
Definition: CLAWSSimHit.h:78
float m_momEntry[3]
momentum at entry, global coordinates
Definition: CLAWSSimHit.h:98
float m_length
track length
Definition: CLAWSSimHit.h:100
float m_posExit[3]
exit position, global coordinates
Definition: CLAWSSimHit.h:96
uint8_t m_ladder
Ladder id.
Definition: CLAWSSimHit.h:104
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.