Belle II Software development
ExporterHitInfo.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
10#pragma once
11
12#include <string>
13#include <framework/geometry/B2Vector3.h>
14
15
16namespace Belle2 {
21
24 public:
26 typedef unsigned short int uShort;
28 typedef unsigned int uInt;
29
31 ExporterHitInfo(const B2Vector3D& globalHitPosition, const B2Vector3D& covValues, int layerID, uShort vID, uInt sID,
32 double angleOfSensor,
33 int hitID,
34 int hitType, int classification = -1, int particleID = -1, int pdg = -1):
35 m_hitPos(globalHitPosition),
36 m_covVal(covValues),
37 m_layerID(layerID - 1), // they start at layer 0!
38 m_vxdID(vID),
39 m_sectorID(sID),
40 m_sensorAngle(angleOfSensor),
41 m_hitID(hitID),
42 m_hitType(hitType),
43 m_classification(classification),
44 m_particleID(particleID),
45 m_pdg(pdg) {}
46
47
50
51
53 std::string getPositionFormatted();
54
55
59 std::string getSimpleHitFormatted();
60
61
63 std::string getCovValuesFormatted();
64
65
67 std::string getAdditionalInfoFormatted();
68
69
71 int getType() const { return m_hitType; }
72
73
75 int getHitID() const { return m_hitID; }
76
77
79 int getParticleID() const { return m_particleID; }
80
81
83 uShort getVxdID() { return m_vxdID; }
84
85
88
89
90 protected:
91
92
99 int m_hitID;
100// int m_2ndHitID; /**< dummy value, eventually needed later for SVDClusters */
104 int m_pdg;
105 }; //end class ExporterHitInfo
106
107} //end namespace Belle2
ExporterHitInfo(const B2Vector3D &globalHitPosition, const B2Vector3D &covValues, int layerID, uShort vID, uInt sID, double angleOfSensor, int hitID, int hitType, int classification=-1, int particleID=-1, int pdg=-1)
Standard constructor.
unsigned short int uShort
shortcut for unsigned int short
std::string getPositionFormatted()
Output of position in a string file: it is a line with Xpos[empty space]Ypos[empty space]Zpos.
int getHitID() const
returns modified index number of truehit attahed to this hit (means that the iD is unique,...
int m_particleID
attaches the hit to a particle for recognition.
int m_hitType
defines whether it is a truehit (0=PXDTrueHit, 1=SVDTrueHit) or a cluster (2=PXDCluster,...
int m_hitID
an event wise unique ID for the hit, which is a modified index number of truehit attached to this hit...
uShort m_vxdID
vxdID for sensor-identification
double m_sensorAngle
the angle between the orthogonal vector of the sensor plane of the hit and the x-axis.
int m_layerID
layerID, for PXD, this is normally 1 or 2, for SVD its typically 3-6
std::string getSimpleHitFormatted()
Output of simple hit info in a string file:
int m_pdg
pdgCode of particle causing hit
uInt getSectorID()
returns sectorID of hit (this is NOT a FullSecID but only a part of it!)
uInt m_sectorID
stores the sector ID on current sensor for current hit
unsigned int uInt
shortcut for unsigned int
B2Vector3D m_covVal
carries relevant values of the covariance matrix for the hit.
std::string getAdditionalInfoFormatted()
Output of additional information in a string file: it is a line with layerID[empty space]hitID[empty ...
uShort getVxdID()
returns vxdID of hit
int getType() const
returns type of hit.
int getParticleID() const
returns particleID of linked particle for recognition.
std::string getCovValuesFormatted()
Output of covValues in a string file: it is a line with CovUU[empty space]CovUV[empty space]CovVV.
int m_classification
defines whether the particle is primary = 0, secondary=1 (background) or ghost=2 (only for SVDCluster...
B2Vector3D m_hitPos
global coordinates of hit
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition B2Vector3.h:522
Abstract base class for different kinds of events.