Belle II Software  release-08-01-10
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 
16 namespace Belle2 {
24  public:
26  typedef unsigned short int uShort;
28  typedef unsigned int uInt;
29 
31  ExporterHitInfo(B2Vector3D globalHitPosition, B2Vector3D covValues, int layerID, uShort vID, uInt sID, double angleOfSensor,
32  int hitID,
33  int hitType, int classification = -1, int particleID = -1, int pdg = -1):
34  m_hitPos(globalHitPosition),
35  m_covVal(covValues),
36  m_layerID(layerID - 1), // they start at layer 0!
37  m_vxdID(vID),
38  m_sectorID(sID),
39  m_sensorAngle(angleOfSensor),
40  m_hitID(hitID),
41  m_hitType(hitType),
42  m_classification(classification),
43  m_particleID(particleID),
44  m_pdg(pdg) {}
45 
46 
49 
50 
52  std::string getPositionFormatted();
53 
54 
58  std::string getSimpleHitFormatted();
59 
60 
62  std::string getCovValuesFormatted();
63 
64 
66  std::string getAdditionalInfoFormatted();
67 
68 
70  int getType() const { return m_hitType; }
71 
72 
74  int getHitID() const { return m_hitID; }
75 
76 
78  int getParticleID() const { return m_particleID; }
79 
80 
82  uShort getVxdID() { return m_vxdID; }
83 
84 
86  uInt getSectorID() { return m_sectorID; }
87 
88 
89  protected:
90 
91 
94  int m_layerID;
97  double m_sensorAngle;
98  int m_hitID;
99 // int m_2ndHitID; /**< dummy value, eventually needed later for SVDClusters */
100  int m_hitType;
103  int m_pdg;
104  }; //end class ExporterHitInfo
106 } //end namespace Belle2
Bundles information for a single hit to be stored by EventInfo (needed for HitExporter,...
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
~ExporterHitInfo()
Destructor.
uInt getSectorID()
returns sectorID of hit (this is NOT a FullSecID but only a part of it!)
ExporterHitInfo(B2Vector3D globalHitPosition, 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.
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
Abstract base class for different kinds of events.