Belle II Software development
ExporterHitInfo Class Reference

Bundles information for a single hit to be stored by EventInfo (needed for HitExporter, which is needed by NonRootDataExportModule) More...

#include <ExporterHitInfo.h>

Public Types

typedef unsigned short int uShort
 shortcut for unsigned int short
 
typedef unsigned int uInt
 shortcut for unsigned int
 

Public Member Functions

 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.
 
 ~ExporterHitInfo ()
 Destructor.
 
std::string getPositionFormatted ()
 Output of position in a string file: it is a line with Xpos[empty space]Ypos[empty space]Zpos.
 
std::string getSimpleHitFormatted ()
 Output of simple hit info in a string file:
 
std::string getCovValuesFormatted ()
 Output of covValues in a string file: it is a line with CovUU[empty space]CovUV[empty space]CovVV.
 
std::string getAdditionalInfoFormatted ()
 Output of additional information in a string file: it is a line with layerID[empty space]hitID[empty space]sensorAngle.
 
int getType () const
 returns type of hit.
 
int getHitID () const
 returns modified index number of truehit attahed to this hit (means that the iD is unique, so pxd and svd can be stored without overlap)
 
int getParticleID () const
 returns particleID of linked particle for recognition.
 
uShort getVxdID ()
 returns vxdID of hit
 
uInt getSectorID ()
 returns sectorID of hit (this is NOT a FullSecID but only a part of it!)
 

Protected Attributes

B2Vector3D m_hitPos
 global coordinates of hit
 
B2Vector3D m_covVal
 carries relevant values of the covariance matrix for the hit.
 
int m_layerID
 layerID, for PXD, this is normally 1 or 2, for SVD its typically 3-6
 
uShort m_vxdID
 vxdID for sensor-identification
 
uInt m_sectorID
 stores the sector ID on current sensor for current hit
 
double m_sensorAngle
 the angle between the orthogonal vector of the sensor plane of the hit and the x-axis.
 
int m_hitID
 an event wise unique ID for the hit, which is a modified index number of truehit attached to this hit (means that the iD is unique, so pxd and svd can be stored without overlap)
 
int m_hitType
 defines whether it is a truehit (0=PXDTrueHit, 1=SVDTrueHit) or a cluster (2=PXDCluster, 3=SVDCluster)
 
int m_classification
 defines whether the particle is primary = 0, secondary=1 (background) or ghost=2 (only for SVDClusters), if unknown, it is -1
 
int m_particleID
 attaches the hit to a particle for recognition.
 
int m_pdg
 pdgCode of particle causing hit
 

Detailed Description

Bundles information for a single hit to be stored by EventInfo (needed for HitExporter, which is needed by NonRootDataExportModule)

Definition at line 23 of file ExporterHitInfo.h.

Member Typedef Documentation

◆ uInt

typedef unsigned int uInt

shortcut for unsigned int

Definition at line 28 of file ExporterHitInfo.h.

◆ uShort

typedef unsigned short int uShort

shortcut for unsigned int short

Definition at line 26 of file ExporterHitInfo.h.

Constructor & Destructor Documentation

◆ ExporterHitInfo()

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 
)
inline

Standard constructor.

Definition at line 31 of file ExporterHitInfo.h.

33 :
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) {}
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
int m_pdg
pdgCode of particle causing hit
uInt m_sectorID
stores the sector ID on current sensor for current hit
B2Vector3D m_covVal
carries relevant values of the covariance matrix for the hit.
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

◆ ~ExporterHitInfo()

~ExporterHitInfo ( )
inline

Destructor.

Definition at line 48 of file ExporterHitInfo.h.

48{}

Member Function Documentation

◆ getAdditionalInfoFormatted()

std::string getAdditionalInfoFormatted ( )

Output of additional information in a string file: it is a line with layerID[empty space]hitID[empty space]sensorAngle.

Output of additional information in a std::string file: it is a line with layerID[empty space]hitID[empty space]sensorAngle.

Definition at line 49 of file ExporterHitInfo.cc.

50{
51 std::string output = lexical_cast<std::string>(m_layerID) + " " + lexical_cast<std::string>(m_hitID) + " " +
52 lexical_cast<std::string>
53 (m_sensorAngle) + "\n";
54 return output;
55}

◆ getCovValuesFormatted()

std::string getCovValuesFormatted ( )

Output of covValues in a string file: it is a line with CovUU[empty space]CovUV[empty space]CovVV.

Output of covValues in a std::string file: it is a line with CovUU[empty space]CovUV[empty space]CovVV.

Definition at line 39 of file ExporterHitInfo.cc.

40{
41 std::string output = lexical_cast<std::string>(m_covVal.X()) + " " + lexical_cast<std::string>
42 (m_covVal.Y()) + " " + lexical_cast<std::string>
43 (m_covVal.Z()) + "\n";
44 return output;
45}
DataType Z() const
access variable Z (= .at(2) without boundary check)
Definition: B2Vector3.h:435
DataType X() const
access variable X (= .at(0) without boundary check)
Definition: B2Vector3.h:431
DataType Y() const
access variable Y (= .at(1) without boundary check)
Definition: B2Vector3.h:433

◆ getHitID()

int getHitID ( ) const
inline

returns modified index number of truehit attahed to this hit (means that the iD is unique, so pxd and svd can be stored without overlap)

Definition at line 74 of file ExporterHitInfo.h.

74{ return m_hitID; }

◆ getParticleID()

int getParticleID ( ) const
inline

returns particleID of linked particle for recognition.

It's -1 if particle ID is unknown

Definition at line 78 of file ExporterHitInfo.h.

78{ return m_particleID; }

◆ getPositionFormatted()

std::string getPositionFormatted ( )

Output of position in a string file: it is a line with Xpos[empty space]Ypos[empty space]Zpos.

Output of position in a std::string file: it is a line with Xpos[empty space]Ypos[empty space]Zpos.

Definition at line 19 of file ExporterHitInfo.cc.

20{
21 std::string output = lexical_cast<std::string>(m_hitPos.X()) + " " + lexical_cast<std::string>
22 (m_hitPos.Y()) + " " + lexical_cast<std::string>
23 (m_hitPos.Z()) + "\n";
24 return output;
25}

◆ getSectorID()

uInt getSectorID ( )
inline

returns sectorID of hit (this is NOT a FullSecID but only a part of it!)

Definition at line 86 of file ExporterHitInfo.h.

86{ return m_sectorID; }

◆ getSimpleHitFormatted()

std::string getSimpleHitFormatted ( )

Output of simple hit info in a string file:

it is a line with particleID[empty space]Xpos[empty space]Ypos[empty space]Zpos[empty space]fullSecID.

Definition at line 28 of file ExporterHitInfo.cc.

29{
30 std::string output = lexical_cast<std::string>(getParticleID()) + " " + lexical_cast<std::string>(float(m_hitPos.X())) + " " +
31 lexical_cast<std::string>(float(m_hitPos.Y())) + " " + lexical_cast<std::string>(float(m_hitPos.Z())) + " " +
32 lexical_cast<std::string>(FullSecID(
33 m_sectorID)) + "\n";
34 return output;
35}
int getParticleID() const
returns particleID of linked particle for recognition.
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:33

◆ getType()

int getType ( ) const
inline

returns type of hit.

(0=PXDTrueHit, 1=SVDTrueHit), (2=PXDCluster, 3=SVDCluster)

Definition at line 70 of file ExporterHitInfo.h.

70{ return m_hitType; }

◆ getVxdID()

uShort getVxdID ( )
inline

returns vxdID of hit

Definition at line 82 of file ExporterHitInfo.h.

82{ return m_vxdID; }

Member Data Documentation

◆ m_classification

int m_classification
protected

defines whether the particle is primary = 0, secondary=1 (background) or ghost=2 (only for SVDClusters), if unknown, it is -1

Definition at line 101 of file ExporterHitInfo.h.

◆ m_covVal

B2Vector3D m_covVal
protected

carries relevant values of the covariance matrix for the hit.

entries are (CovUU, CovUV, CoVV)

Definition at line 93 of file ExporterHitInfo.h.

◆ m_hitID

int m_hitID
protected

an event wise unique ID for the hit, which is a modified index number of truehit attached to this hit (means that the iD is unique, so pxd and svd can be stored without overlap)

Definition at line 98 of file ExporterHitInfo.h.

◆ m_hitPos

B2Vector3D m_hitPos
protected

global coordinates of hit

Definition at line 92 of file ExporterHitInfo.h.

◆ m_hitType

int m_hitType
protected

defines whether it is a truehit (0=PXDTrueHit, 1=SVDTrueHit) or a cluster (2=PXDCluster, 3=SVDCluster)

Definition at line 100 of file ExporterHitInfo.h.

◆ m_layerID

int m_layerID
protected

layerID, for PXD, this is normally 1 or 2, for SVD its typically 3-6

Definition at line 94 of file ExporterHitInfo.h.

◆ m_particleID

int m_particleID
protected

attaches the hit to a particle for recognition.

It's -1 if particle ID is unknown

Definition at line 102 of file ExporterHitInfo.h.

◆ m_pdg

int m_pdg
protected

pdgCode of particle causing hit

Definition at line 103 of file ExporterHitInfo.h.

◆ m_sectorID

uInt m_sectorID
protected

stores the sector ID on current sensor for current hit

Definition at line 96 of file ExporterHitInfo.h.

◆ m_sensorAngle

double m_sensorAngle
protected

the angle between the orthogonal vector of the sensor plane of the hit and the x-axis.

It is measured clockwise 0-2pi

Definition at line 97 of file ExporterHitInfo.h.

◆ m_vxdID

uShort m_vxdID
protected

vxdID for sensor-identification

Definition at line 95 of file ExporterHitInfo.h.


The documentation for this class was generated from the following files: