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#ifndef VXD_DATAOBJECTS_VXDTRUEHIT_H
11#define VXD_DATAOBJECTS_VXDTRUEHIT_H
12
13#include <vxd/dataobjects/VxdID.h>
14#include <framework/datastore/RelationsObject.h>
15#include <Math/Vector3D.h>
16#include <algorithm>
17
18namespace Belle2 {
36 class VXDTrueHit : public RelationsObject {
37
38 public:
43 {}
44
57 VxdID sensorID, float* posEntry, float* posMidPoint, float* posExit,
58 float* momEntry, float* momMidPoint, float* momExit, float energyDep, float globalTime):
59 RelationsObject(), m_sensorID(sensorID), m_energyDep(energyDep), m_globalTime(globalTime)
60 {
61 std::copy_n(posEntry, 3, m_positionEntry);
62 std::copy_n(posMidPoint, 3, m_positionMidPoint);
63 std::copy_n(posExit, 3, m_positionExit);
64 std::copy_n(momEntry, 3, m_momentumEntry);
65 std::copy_n(momMidPoint, 3, m_momentumMidPoint);
66 std::copy_n(momExit, 3, m_momentumExit);
67 }
68
70 VxdID getSensorID() const { return m_sensorID; }
72 unsigned int getRawSensorID() const {return m_sensorID; }
74 float getU() const { return m_positionMidPoint[0]; }
76 float getV() const { return m_positionMidPoint[1]; }
78 float getW() const { return m_positionMidPoint[2]; }
80 float getEntryU() const { return m_positionEntry[0]; }
82 float getEntryV() const { return m_positionEntry[1]; }
84 float getEntryW() const { return m_positionEntry[2]; }
86 float getExitU() const { return m_positionExit[0]; }
88 float getExitV() const { return m_positionExit[1]; }
90 float getExitW() const { return m_positionExit[2]; }
92 float getEnergyDep() const { return m_energyDep; }
94 float getGlobalTime() const { return m_globalTime; }
96 ROOT::Math::XYZVector getMomentum() const { return ROOT::Math::XYZVector(m_momentumMidPoint[0], m_momentumMidPoint[1], m_momentumMidPoint[2]); }
98 ROOT::Math::XYZVector getEntryMomentum() const { return ROOT::Math::XYZVector(m_momentumEntry[0], m_momentumEntry[1], m_momentumEntry[2]);}
100 ROOT::Math::XYZVector getExitMomentum() const { return ROOT::Math::XYZVector(m_momentumExit[0], m_momentumExit[1], m_momentumExit[2]); }
101
105 virtual void shiftInTime(float delta) { m_globalTime += delta; }
106
107 protected:
126
128 };
129
131} // end namespace Belle2
132
133#endif
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: VXDTrueHit.h:36
ROOT::Math::XYZVector getExitMomentum() const
Return momentum at the endpoint of the track.
Definition: VXDTrueHit.h:100
float m_globalTime
time when the midpoint of the track was reached
Definition: VXDTrueHit.h:125
float getV() const
Return local v coordinate of hit.
Definition: VXDTrueHit.h:76
float getGlobalTime() const
Return the time when the track reached its midpoint.
Definition: VXDTrueHit.h:94
float m_positionExit[3]
local coordinates of the end of the track inside the volume
Definition: VXDTrueHit.h:115
float getEntryU() const
Return local u coordinate of hit when entering silicon.
Definition: VXDTrueHit.h:80
float m_energyDep
energy deposited by the track in the sensor volume
Definition: VXDTrueHit.h:123
float getEnergyDep() const
Return energy deposited during traversal of sensor.
Definition: VXDTrueHit.h:92
float m_momentumMidPoint[3]
local momentum of the midpoint of the track inside the volume
Definition: VXDTrueHit.h:119
virtual void shiftInTime(float delta)
Shift the TrueHit in time (for backgorund mixing)
Definition: VXDTrueHit.h:105
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:90
float m_positionMidPoint[3]
local coordinates of the midpoint of the track inside the volume
Definition: VXDTrueHit.h:113
VXDTrueHit()
Default constructor for ROOT IO.
Definition: VXDTrueHit.h:40
float m_momentumExit[3]
local momentum of the end of the track inside the volume
Definition: VXDTrueHit.h:121
unsigned int getRawSensorID() const
Return raw Sensor ID.
Definition: VXDTrueHit.h:72
float m_momentumEntry[3]
local momentum of the start of the track inside the volume
Definition: VXDTrueHit.h:117
float m_positionEntry[3]
local coordinates of the start of the track inside the volume
Definition: VXDTrueHit.h:111
float getEntryW() const
Return local w coordinate of the start point of the track.
Definition: VXDTrueHit.h:84
VXDTrueHit(VxdID sensorID, float *posEntry, float *posMidPoint, float *posExit, float *momEntry, float *momMidPoint, float *momExit, float energyDep, float globalTime)
Constructor.
Definition: VXDTrueHit.h:56
float getW() const
Return local w coordinate of hit.
Definition: VXDTrueHit.h:78
int m_sensorID
ID of the sensor.
Definition: VXDTrueHit.h:109
ROOT::Math::XYZVector getEntryMomentum() const
Return momentum at the start point of the track.
Definition: VXDTrueHit.h:98
VxdID getSensorID() const
Return the Sensor ID.
Definition: VXDTrueHit.h:70
ROOT::Math::XYZVector getMomentum() const
Return momentum at the midpoint of the track.
Definition: VXDTrueHit.h:96
float getU() const
Return local u coordinate of hit.
Definition: VXDTrueHit.h:74
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:86
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:88
float getEntryV() const
Return local v coordinate of the start point of the track.
Definition: VXDTrueHit.h:82
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.