Belle II Software development
VXDTrueHit.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#pragma once
10
11#include <vxd/dataobjects/VxdID.h>
12#include <framework/datastore/RelationsObject.h>
13#include <Math/Vector3D.h>
14#include <algorithm>
15
16namespace Belle2 {
34 class VXDTrueHit : public RelationsObject {
35
36 public:
42
55 VxdID sensorID, float* posEntry, float* posMidPoint, float* posExit,
56 float* momEntry, float* momMidPoint, float* momExit, float energyDep, float globalTime):
57 RelationsObject(), m_energyDep(energyDep), m_globalTime(globalTime), m_sensorID(sensorID)
58 {
59 std::copy_n(posEntry, 3, m_positionEntry);
60 std::copy_n(posMidPoint, 3, m_positionMidPoint);
61 std::copy_n(posExit, 3, m_positionExit);
62 std::copy_n(momEntry, 3, m_momentumEntry);
63 std::copy_n(momMidPoint, 3, m_momentumMidPoint);
64 std::copy_n(momExit, 3, m_momentumExit);
65 }
66
68 VxdID getSensorID() const { return m_sensorID; }
70 unsigned int getRawSensorID() const {return m_sensorID; }
72 float getU() const { return m_positionMidPoint[0]; }
74 float getV() const { return m_positionMidPoint[1]; }
76 float getW() const { return m_positionMidPoint[2]; }
78 float getEntryU() const { return m_positionEntry[0]; }
80 float getEntryV() const { return m_positionEntry[1]; }
82 float getEntryW() const { return m_positionEntry[2]; }
84 float getExitU() const { return m_positionExit[0]; }
86 float getExitV() const { return m_positionExit[1]; }
88 float getExitW() const { return m_positionExit[2]; }
90 float getEnergyDep() const { return m_energyDep; }
92 float getGlobalTime() const { return m_globalTime; }
94 ROOT::Math::XYZVector getMomentum() const { return ROOT::Math::XYZVector(m_momentumMidPoint[0], m_momentumMidPoint[1], m_momentumMidPoint[2]); }
96 ROOT::Math::XYZVector getEntryMomentum() const { return ROOT::Math::XYZVector(m_momentumEntry[0], m_momentumEntry[1], m_momentumEntry[2]);}
98 ROOT::Math::XYZVector getExitMomentum() const { return ROOT::Math::XYZVector(m_momentumExit[0], m_momentumExit[1], m_momentumExit[2]); }
99
103 virtual void shiftInTime(float delta) { m_globalTime += delta; }
104
105 protected:
124
126 };
127
129} // end namespace Belle2
ROOT::Math::XYZVector getExitMomentum() const
Return momentum at the endpoint of the track.
Definition VXDTrueHit.h:98
float m_globalTime
time when the midpoint of the track was reached
Definition VXDTrueHit.h:121
float getV() const
Return local v coordinate of hit.
Definition VXDTrueHit.h:74
float getGlobalTime() const
Return the time when the track reached its midpoint.
Definition VXDTrueHit.h:92
float m_positionExit[3]
local coordinates of the end of the track inside the volume
Definition VXDTrueHit.h:111
float getEntryU() const
Return local u coordinate of hit when entering silicon.
Definition VXDTrueHit.h:78
float m_energyDep
energy deposited by the track in the sensor volume
Definition VXDTrueHit.h:119
float getEnergyDep() const
Return energy deposited during traversal of sensor.
Definition VXDTrueHit.h:90
float m_momentumMidPoint[3]
local momentum of the midpoint of the track inside the volume
Definition VXDTrueHit.h:115
virtual void shiftInTime(float delta)
Shift the TrueHit in time (for background mixing)
Definition VXDTrueHit.h:103
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
Definition VXDTrueHit.h:88
float m_positionMidPoint[3]
local coordinates of the midpoint of the track inside the volume
Definition VXDTrueHit.h:109
VXDTrueHit()
Default constructor for ROOT IO.
Definition VXDTrueHit.h:38
float m_momentumExit[3]
local momentum of the end of the track inside the volume
Definition VXDTrueHit.h:117
unsigned int getRawSensorID() const
Return raw Sensor ID.
Definition VXDTrueHit.h:70
float m_momentumEntry[3]
local momentum of the start of the track inside the volume
Definition VXDTrueHit.h:113
float m_positionEntry[3]
local coordinates of the start of the track inside the volume
Definition VXDTrueHit.h:107
float getEntryW() const
Return local w coordinate of the start point of the track.
Definition VXDTrueHit.h:82
VXDTrueHit(VxdID sensorID, float *posEntry, float *posMidPoint, float *posExit, float *momEntry, float *momMidPoint, float *momExit, float energyDep, float globalTime)
Constructor.
Definition VXDTrueHit.h:54
float getW() const
Return local w coordinate of hit.
Definition VXDTrueHit.h:76
int m_sensorID
ID of the sensor.
Definition VXDTrueHit.h:123
ROOT::Math::XYZVector getEntryMomentum() const
Return momentum at the start point of the track.
Definition VXDTrueHit.h:96
VxdID getSensorID() const
Return the Sensor ID.
Definition VXDTrueHit.h:68
ROOT::Math::XYZVector getMomentum() const
Return momentum at the midpoint of the track.
Definition VXDTrueHit.h:94
float getU() const
Return local u coordinate of hit.
Definition VXDTrueHit.h:72
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
Definition VXDTrueHit.h:84
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
Definition VXDTrueHit.h:86
float getEntryV() const
Return local v coordinate of the start point of the track.
Definition VXDTrueHit.h:80
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.