Belle II Software  release-05-02-19
VXDTrueHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2014 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Peter Kvasnicka, Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #ifndef VXD_DATAOBJECTS_VXDTRUEHIT_H
13 #define VXD_DATAOBJECTS_VXDTRUEHIT_H
14 
15 #include <vxd/dataobjects/VxdID.h>
16 #include <framework/datastore/RelationsObject.h>
17 #include <TVector3.h>
18 #include <algorithm>
19 
20 namespace Belle2 {
38  class VXDTrueHit : public RelationsObject {
39 
40  public:
45  {}
46 
60  VxdID sensorID, float* posEntry, float* posMidPoint, float* posExit,
61  float* momEntry, float* momMidPoint, float* momExit, float energyDep, float globalTime):
62  RelationsObject(), m_sensorID(sensorID), m_energyDep(energyDep), m_globalTime(globalTime) {
63  std::copy_n(posEntry, 3, m_positionEntry);
64  std::copy_n(posMidPoint, 3, m_positionMidPoint);
65  std::copy_n(posExit, 3, m_positionExit);
66  std::copy_n(momEntry, 3, m_momentumEntry);
67  std::copy_n(momMidPoint, 3, m_momentumMidPoint);
68  std::copy_n(momExit, 3, m_momentumExit);
69  }
70 
72  VxdID getSensorID() const { return m_sensorID; }
74  unsigned int getRawSensorID() const {return m_sensorID; }
76  float getU() const { return m_positionMidPoint[0]; }
78  float getV() const { return m_positionMidPoint[1]; }
80  float getW() const { return m_positionMidPoint[2]; }
82  float getEntryU() const { return m_positionEntry[0]; }
84  float getEntryV() const { return m_positionEntry[1]; }
86  float getEntryW() const { return m_positionEntry[2]; }
88  float getExitU() const { return m_positionExit[0]; }
90  float getExitV() const { return m_positionExit[1]; }
92  float getExitW() const { return m_positionExit[2]; }
94  float getEnergyDep() const { return m_energyDep; }
96  float getGlobalTime() const { return m_globalTime; }
98  TVector3 getMomentum() const { return TVector3(m_momentumMidPoint[0], m_momentumMidPoint[1], m_momentumMidPoint[2]); }
100  TVector3 getEntryMomentum() const { return TVector3(m_momentumEntry[0], m_momentumEntry[1], m_momentumEntry[2]);}
102  TVector3 getExitMomentum() const { return TVector3(m_momentumExit[0], m_momentumExit[1], m_momentumExit[2]); }
103 
107  virtual void shiftInTime(float delta) { m_globalTime += delta; }
108 
109  protected:
113  float m_positionEntry[3];
117  float m_positionExit[3];
119  float m_momentumEntry[3];
123  float m_momentumExit[3];
125  float m_energyDep;
128 
129  ClassDef(VXDTrueHit, 6)
130  };
131 
133 } // end namespace Belle2
134 
135 #endif
Belle2::VXDTrueHit::getRawSensorID
unsigned int getRawSensorID() const
Return raw Sensor ID.
Definition: VXDTrueHit.h:74
Belle2::VXDTrueHit::m_energyDep
float m_energyDep
energy deposited by the track in the sensor volume
Definition: VXDTrueHit.h:125
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::VXDTrueHit::getExitU
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:88
Belle2::VXDTrueHit::getSensorID
VxdID getSensorID() const
Return the Sensor ID.
Definition: VXDTrueHit.h:72
Belle2::VXDTrueHit::getEntryV
float getEntryV() const
Return local v coordinate of the start point of the track.
Definition: VXDTrueHit.h:84
Belle2::VXDTrueHit::shiftInTime
virtual void shiftInTime(float delta)
Shift the TrueHit in time (for backgorund mixing)
Definition: VXDTrueHit.h:107
Belle2::VXDTrueHit::m_positionEntry
float m_positionEntry[3]
local coordinates of the start of the track inside the volume
Definition: VXDTrueHit.h:113
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::VXDTrueHit
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: VXDTrueHit.h:38
Belle2::VXDTrueHit::getEntryW
float getEntryW() const
Return local w coordinate of the start point of the track.
Definition: VXDTrueHit.h:86
Belle2::VXDTrueHit::VXDTrueHit
VXDTrueHit(VxdID sensorID, float *posEntry, float *posMidPoint, float *posExit, float *momEntry, float *momMidPoint, float *momExit, float energyDep, float globalTime)
Constructor.
Definition: VXDTrueHit.h:59
Belle2::VXDTrueHit::m_globalTime
float m_globalTime
time when the midpoint of the track was reached
Definition: VXDTrueHit.h:127
Belle2::VXDTrueHit::m_momentumMidPoint
float m_momentumMidPoint[3]
local momentum of the midpoint of the track inside the volume
Definition: VXDTrueHit.h:121
Belle2::VXDTrueHit::m_momentumEntry
float m_momentumEntry[3]
local momentum of the start of the track inside the volume
Definition: VXDTrueHit.h:119
Belle2::VXDTrueHit::m_positionExit
float m_positionExit[3]
local coordinates of the end of the track inside the volume
Definition: VXDTrueHit.h:117
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDTrueHit::getV
float getV() const
Return local v coordinate of hit.
Definition: VXDTrueHit.h:78
Belle2::VXDTrueHit::getW
float getW() const
Return local w coordinate of hit.
Definition: VXDTrueHit.h:80
Belle2::VXDTrueHit::getExitV
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:90
Belle2::VXDTrueHit::m_sensorID
int m_sensorID
ID of the sensor.
Definition: VXDTrueHit.h:111
Belle2::VXDTrueHit::getEntryMomentum
TVector3 getEntryMomentum() const
Return momentum at the start point of the track.
Definition: VXDTrueHit.h:100
Belle2::VXDTrueHit::m_momentumExit
float m_momentumExit[3]
local momentum of the end of the track inside the volume
Definition: VXDTrueHit.h:123
Belle2::VXDTrueHit::getEntryU
float getEntryU() const
Return local u coordinate of hit when entering silicon.
Definition: VXDTrueHit.h:82
Belle2::VXDTrueHit::VXDTrueHit
VXDTrueHit()
Default constructor for ROOT IO.
Definition: VXDTrueHit.h:42
Belle2::VXDTrueHit::getEnergyDep
float getEnergyDep() const
Return energy deposited during traversal of sensor.
Definition: VXDTrueHit.h:94
Belle2::VXDTrueHit::m_positionMidPoint
float m_positionMidPoint[3]
local coordinates of the midpoint of the track inside the volume
Definition: VXDTrueHit.h:115
Belle2::VXDTrueHit::getExitMomentum
TVector3 getExitMomentum() const
Return momentum at the endpoint of the track.
Definition: VXDTrueHit.h:102
Belle2::VXDTrueHit::getU
float getU() const
Return local u coordinate of hit.
Definition: VXDTrueHit.h:76
Belle2::VXDTrueHit::getExitW
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:92
Belle2::VXDTrueHit::getGlobalTime
float getGlobalTime() const
Return the time when the track reached its midpoint.
Definition: VXDTrueHit.h:96
Belle2::VXDTrueHit::getMomentum
TVector3 getMomentum() const
Return momentum at the midpoint of the track.
Definition: VXDTrueHit.h:98
Belle2::RelationsInterface
Defines interface for accessing relations of objects in StoreArray.
Definition: RelationsObject.h:102