Belle II Software  release-05-01-25
ExporterHitInfo.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jakob Lettenbichler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 
12 #pragma once
13 
14 #include <string>
15 #include <TVector3.h>
16 
17 
18 namespace Belle2 {
25  class ExporterHitInfo {
26  public:
28  typedef unsigned short int uShort;
30  typedef unsigned int uInt;
31 
33  ExporterHitInfo(TVector3 globalHitPosition, TVector3 covValues, int layerID, uShort vID, uInt sID, double angleOfSensor, 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 
49  ~ExporterHitInfo() {}
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 
87  uInt getSectorID() { return m_sectorID; }
88 
89 
90  protected:
91 
92 
93  TVector3 m_hitPos;
94  TVector3 m_covVal;
95  int m_layerID;
96  uShort m_vxdID;
98  double m_sensorAngle;
99  int m_hitID;
100 // int m_2ndHitID; /**< dummy value, eventually needed later for SVDClusters */
101  int m_hitType;
104  int m_pdg;
105  }; //end class ExporterHitInfo
107 } //end namespace Belle2
Belle2::ExporterHitInfo::getType
int getType() const
returns type of hit.
Definition: ExporterHitInfo.h:79
Belle2::ExporterHitInfo::getPositionFormatted
std::string getPositionFormatted()
Output of position in a string file: it is a line with Xpos[empty space]Ypos[empty space]Zpos.
Definition: ExporterHitInfo.cc:22
Belle2::ExporterHitInfo::getSectorID
uInt getSectorID()
returns sectorID of hit (this is NOT a FullSecID but only a part of it!)
Definition: ExporterHitInfo.h:95
Belle2::ExporterHitInfo::getVxdID
uShort getVxdID()
returns vxdID of hit
Definition: ExporterHitInfo.h:91
Belle2::ExporterHitInfo::m_classification
int m_classification
defines whether the particle is primary = 0, secondary=1 (background) or ghost=2 (only for SVDCluster...
Definition: ExporterHitInfo.h:110
Belle2::ExporterHitInfo::m_particleID
int m_particleID
attaches the hit to a particle for recognition.
Definition: ExporterHitInfo.h:111
Belle2::ExporterHitInfo::uShort
unsigned short int uShort
shortcut for unsigned int short
Definition: ExporterHitInfo.h:36
Belle2::ExporterHitInfo::m_sectorID
uInt m_sectorID
stores the sector ID on current sensor for current hit
Definition: ExporterHitInfo.h:105
Belle2::ExporterHitInfo::m_covVal
TVector3 m_covVal
carries relevant values of the covariance matrix for the hit.
Definition: ExporterHitInfo.h:102
Belle2::ExporterHitInfo::getSimpleHitFormatted
std::string getSimpleHitFormatted()
Output of simple hit info in a string file:
Definition: ExporterHitInfo.cc:30
Belle2::ExporterHitInfo::getHitID
int getHitID() const
returns modified index number of truehit attahed to this hit (means that the iD is unique,...
Definition: ExporterHitInfo.h:83
Belle2::ExporterHitInfo::m_hitPos
TVector3 m_hitPos
global coordinates of hit
Definition: ExporterHitInfo.h:101
Belle2::ExporterHitInfo::m_layerID
int m_layerID
layerID, for PXD, this is normally 1 or 2, for SVD its typically 3-6
Definition: ExporterHitInfo.h:103
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ExporterHitInfo::uInt
unsigned int uInt
shortcut for unsigned int
Definition: ExporterHitInfo.h:38
Belle2::ExporterHitInfo::getCovValuesFormatted
std::string getCovValuesFormatted()
Output of covValues in a string file: it is a line with CovUU[empty space]CovUV[empty space]CovVV.
Definition: ExporterHitInfo.cc:40
Belle2::ExporterHitInfo::m_pdg
int m_pdg
pdgCode of particle causing hit
Definition: ExporterHitInfo.h:112
Belle2::ExporterHitInfo::m_sensorAngle
double m_sensorAngle
the angle between the orthogonal vector of the sensor plane of the hit and the x-axis.
Definition: ExporterHitInfo.h:106
Belle2::ExporterHitInfo::getAdditionalInfoFormatted
std::string getAdditionalInfoFormatted()
Output of additional information in a string file: it is a line with layerID[empty space]hitID[empty ...
Definition: ExporterHitInfo.cc:49
Belle2::ExporterHitInfo::m_hitType
int m_hitType
defines whether it is a truehit (0=PXDTrueHit, 1=SVDTrueHit) or a cluster (2=PXDCluster,...
Definition: ExporterHitInfo.h:109
Belle2::ExporterHitInfo::getParticleID
int getParticleID() const
returns particleID of linked particle for recognition.
Definition: ExporterHitInfo.h:87
Belle2::ExporterHitInfo::m_hitID
int m_hitID
an event wise unique ID for the hit, which is a modified index number of truehit attached to this hit...
Definition: ExporterHitInfo.h:107
Belle2::ExporterHitInfo::ExporterHitInfo
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.
Definition: ExporterHitInfo.h:41
Belle2::ExporterHitInfo::m_vxdID
uShort m_vxdID
vxdID for sensor-identification
Definition: ExporterHitInfo.h:104
Belle2::ExporterHitInfo::~ExporterHitInfo
~ExporterHitInfo()
Destructor.
Definition: ExporterHitInfo.h:57