Belle II Software  release-05-02-19
CLAWSSimHit.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 CLAWSSIMHIT_H
12 #define CLAWSSIMHIT_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 CLAWSSimHit : public SimHitBase {
31  public:
34  m_length(0), m_PDG(0), m_ladder(0), m_sensor(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_posExit, 3, 0.0);
39  }
40 
44  CLAWSSimHit(int ladder, int sensor, int pdg, float time, float energyDep, float energyVisble,
45  float length, const float* posEntry, const float* posExit, const float* momEntry):
46  SimHitBase(), m_time(time), m_energyDep(energyDep), m_energyVisible(energyVisble),
47  m_length(length), m_PDG(pdg), m_ladder(ladder), m_sensor(sensor)
48  {
49  std::copy_n(momEntry, 3, m_momEntry);
50  std::copy_n(posEntry, 3, m_posEntry);
51  std::copy_n(posExit, 3, m_posExit);
52  }
53 
55  int getLadder() const { return m_ladder; }
57  int getSensor() const { return m_sensor; }
59  int getPDG() const { return m_PDG; }
61  float getTime() const { return m_time; }
63  float getEnergyDep() const { return m_energyDep; }
65  float getEnergyVisible() const { return m_energyVisible; }
67  TVector3 getPosEntry() const { return TVector3(m_posEntry[0], m_posEntry[1], m_posEntry[2]); }
69  TVector3 getPosExit() const { return TVector3(m_posExit[0], m_posExit[1], m_posExit[2]); }
71  TVector3 getMomEntry() const { return TVector3(m_momEntry[0], m_momEntry[1], m_momEntry[2]); }
73  const float* getPosEntryArray() const { return m_posEntry; }
75  const float* getPosExitArray() const { return m_posExit; }
77  const float* getMomEntryArray() const { return m_momEntry; }
78 
79  private:
81  float m_time;
83  float m_energyDep;
87  float m_posEntry[3];
89  float m_posExit[3];
91  float m_momEntry[3];
93  float m_length;
95  int m_PDG;
97  uint8_t m_ladder;
99  uint8_t m_sensor;
100 
102  };
103 
105 } // end namespace Belle2
106 
107 #endif
Belle2::CLAWSSimHit::getPosExitArray
const float * getPosExitArray() const
Return track position as float array.
Definition: CLAWSSimHit.h:83
Belle2::CLAWSSimHit::m_posExit
float m_posExit[3]
exit position, global coordinates
Definition: CLAWSSimHit.h:97
Belle2::CLAWSSimHit::m_length
float m_length
track length
Definition: CLAWSSimHit.h:101
Belle2::CLAWSSimHit::m_momEntry
float m_momEntry[3]
momentum at entry, global coordinates
Definition: CLAWSSimHit.h:99
Belle2::CLAWSSimHit::m_ladder
uint8_t m_ladder
Ladder id.
Definition: CLAWSSimHit.h:105
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::CLAWSSimHit::getMomEntryArray
const float * getMomEntryArray() const
Return track momentum as float array.
Definition: CLAWSSimHit.h:85
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::CLAWSSimHit
Class CLAWSSimHit - Geant4 simulated hit for the CLAWS detector.
Definition: CLAWSSimHit.h:38
Belle2::CLAWSSimHit::getEnergyVisible
float getEnergyVisible() const
Return the non-ionization energy in electrons.
Definition: CLAWSSimHit.h:73
Belle2::CLAWSSimHit::getTime
float getTime() const
Return the global time.
Definition: CLAWSSimHit.h:69
Belle2::CLAWSSimHit::m_PDG
int m_PDG
PDG number of the track.
Definition: CLAWSSimHit.h:103
Belle2::CLAWSSimHit::getMomEntry
TVector3 getMomEntry() const
Return the track momentum.
Definition: CLAWSSimHit.h:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CLAWSSimHit::m_time
float m_time
global time
Definition: CLAWSSimHit.h:89
Belle2::CLAWSSimHit::m_posEntry
float m_posEntry[3]
entry position, global coordinates
Definition: CLAWSSimHit.h:95
Belle2::CLAWSSimHit::m_energyVisible
float m_energyVisible
Visible energy deposition according to Birks Law (in GeV)
Definition: CLAWSSimHit.h:93
Belle2::CLAWSSimHit::getSensor
int getSensor() const
Return the Sensor number (starting at 1, increasing with decreasing z)
Definition: CLAWSSimHit.h:65
Belle2::CLAWSSimHit::m_energyDep
float m_energyDep
Deposited energy in GeV.
Definition: CLAWSSimHit.h:91
Belle2::CLAWSSimHit::getPDG
int getPDG() const
Return the PDG number of the track.
Definition: CLAWSSimHit.h:67
Belle2::CLAWSSimHit::getPosEntryArray
const float * getPosEntryArray() const
Return track position as float array.
Definition: CLAWSSimHit.h:81
Belle2::CLAWSSimHit::getEnergyDep
float getEnergyDep() const
Return the energy deposition in electrons.
Definition: CLAWSSimHit.h:71
Belle2::CLAWSSimHit::getPosEntry
TVector3 getPosEntry() const
Return the entry track position.
Definition: CLAWSSimHit.h:75
Belle2::CLAWSSimHit::getLadder
int getLadder() const
Return the Ladder number (starting at 1, increasing with phi)
Definition: CLAWSSimHit.h:63
Belle2::CLAWSSimHit::CLAWSSimHit
CLAWSSimHit()
default constructor for ROOT
Definition: CLAWSSimHit.h:41
Belle2::CLAWSSimHit::m_sensor
uint8_t m_sensor
Sensor id.
Definition: CLAWSSimHit.h:107
Belle2::CLAWSSimHit::getPosExit
TVector3 getPosExit() const
Return the exit track position.
Definition: CLAWSSimHit.h:77