Belle II Software  release-06-01-15
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 <TVector3.h>
14 
15 
16 namespace Belle2 {
24  public:
26  typedef unsigned short int uShort;
28  typedef unsigned int uInt;
29 
31  ExporterHitInfo(TVector3 globalHitPosition, TVector3 covValues, int layerID, uShort vID, uInt sID, double angleOfSensor, int hitID,
32  int hitType, int classification = -1, int particleID = -1, int pdg = -1):
33  m_hitPos(globalHitPosition),
34  m_covVal(covValues),
35  m_layerID(layerID - 1), // they start at layer 0!
36  m_vxdID(vID),
37  m_sectorID(sID),
38  m_sensorAngle(angleOfSensor),
39  m_hitID(hitID),
40  m_hitType(hitType),
41  m_classification(classification),
42  m_particleID(particleID),
43  m_pdg(pdg) {}
44 
45 
48 
49 
51  std::string getPositionFormatted();
52 
53 
57  std::string getSimpleHitFormatted();
58 
59 
61  std::string getCovValuesFormatted();
62 
63 
65  std::string getAdditionalInfoFormatted();
66 
67 
69  int getType() const { return m_hitType; }
70 
71 
73  int getHitID() const { return m_hitID; }
74 
75 
77  int getParticleID() const { return m_particleID; }
78 
79 
81  uShort getVxdID() { return m_vxdID; }
82 
83 
85  uInt getSectorID() { return m_sectorID; }
86 
87 
88  protected:
89 
90 
91  TVector3 m_hitPos;
92  TVector3 m_covVal;
93  int m_layerID;
96  double m_sensorAngle;
97  int m_hitID;
98 // int m_2ndHitID; /**< dummy value, eventually needed later for SVDClusters */
99  int m_hitType;
102  int m_pdg;
103  }; //end class ExporterHitInfo
105 } //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.
TVector3 m_hitPos
global coordinates of hit
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:
TVector3 m_covVal
carries relevant values of the covariance matrix for the hit.
int m_pdg
pdgCode of particle causing hit
ExporterHitInfo(TVector3 globalHitPosition, TVector3 covValues, int layerID, uShort vID, uInt sID, double angleOfSensor, int hitID, int hitType, int classification=-1, int particleID=-1, int pdg=-1)
Standard constructor.
~ExporterHitInfo()
Destructor.
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
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...
Abstract base class for different kinds of events.