BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTruthTrack Class Reference

#include <BesTruthTrack.hh>

Public Types

enum  { unassigned = -1 }
enum  { unassigned = -1 }
enum  { unassigned = -1 }

Public Member Functions

 BesTruthTrack ()
 ~BesTruthTrack ()
HepLorentzVector GetP4 () const
void SetP4 (const HepLorentzVector &p4)
G4int GetPDGCode () const
void SetPDGCode (G4int code)
G4double GetPDGCharge () const
void SetPDGCharge (G4double charge)
G4String GetParticleName () const
void SetParticleName (G4String name)
BesTruthVertexGetVertex () const
void SetVertex (BesTruthVertex *vertex)
G4int GetBarcodeEndVtx ()
void SetBarcodeEndVtx (G4int vtx)
BesTruthVertexGetTerminalVertex () const
void SetTerminalVertex (BesTruthVertex *vertex)
G4int GetIndex () const
void SetIndex (G4int index)
G4int GetG4TrackId () const
void SetG4TrackId (G4int trackId)
BesTruthTrackGetParentTrack ()
void AddDaughterIndex (G4int index)
vector< int > GetDaughterIndexes () const
void Found ()
G4bool NotFound ()
G4String GetSource ()
void SetSource (G4String source)
 BesTruthTrack ()
 ~BesTruthTrack ()
HepLorentzVector GetP4 () const
void SetP4 (const HepLorentzVector &p4)
G4int GetPDGCode () const
void SetPDGCode (G4int code)
G4double GetPDGCharge () const
void SetPDGCharge (G4double charge)
G4String GetParticleName () const
void SetParticleName (G4String name)
BesTruthVertexGetVertex () const
void SetVertex (BesTruthVertex *vertex)
G4int GetBarcodeEndVtx ()
void SetBarcodeEndVtx (G4int vtx)
BesTruthVertexGetTerminalVertex () const
void SetTerminalVertex (BesTruthVertex *vertex)
G4int GetIndex () const
void SetIndex (G4int index)
G4int GetG4TrackId () const
void SetG4TrackId (G4int trackId)
BesTruthTrackGetParentTrack ()
void AddDaughterIndex (G4int index)
vector< int > GetDaughterIndexes () const
void Found ()
G4bool NotFound ()
G4String GetSource ()
void SetSource (G4String source)
 BesTruthTrack ()
 ~BesTruthTrack ()
HepLorentzVector GetP4 () const
void SetP4 (const HepLorentzVector &p4)
G4int GetPDGCode () const
void SetPDGCode (G4int code)
G4double GetPDGCharge () const
void SetPDGCharge (G4double charge)
G4String GetParticleName () const
void SetParticleName (G4String name)
BesTruthVertexGetVertex () const
void SetVertex (BesTruthVertex *vertex)
G4int GetBarcodeEndVtx ()
void SetBarcodeEndVtx (G4int vtx)
BesTruthVertexGetTerminalVertex () const
void SetTerminalVertex (BesTruthVertex *vertex)
G4int GetIndex () const
void SetIndex (G4int index)
G4int GetG4TrackId () const
void SetG4TrackId (G4int trackId)
BesTruthTrackGetParentTrack ()
void AddDaughterIndex (G4int index)
vector< int > GetDaughterIndexes () const
void Found ()
G4bool NotFound ()
G4String GetSource ()
void SetSource (G4String source)

Friends

ostream & operator<< (ostream &stream, const BesTruthTrack &track)
ostream & operator<< (ostream &stream, const BesTruthTrack *track)
ostream & operator<< (ostream &stream, const BesTruthTrack &track)
ostream & operator<< (ostream &stream, const BesTruthTrack *track)
ostream & operator<< (ostream &stream, const BesTruthTrack &track)
ostream & operator<< (ostream &stream, const BesTruthTrack *track)

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

◆ anonymous enum

anonymous enum
Enumerator
unassigned 

Definition at line 32 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

32{ unassigned = -1 };

◆ anonymous enum

anonymous enum
Enumerator
unassigned 

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

32{ unassigned = -1 };

Constructor & Destructor Documentation

◆ BesTruthTrack() [1/3]

BesTruthTrack::BesTruthTrack ( )

Definition at line 17 of file BesTruthTrack.cc.

17 : m_fourMomentum( 0 ), m_daughterIndexes( 0 ) {
18 // m_fourMomentum;
19 m_vertex = 0;
20 m_terminalVertex = 0;
21 m_PDGCode = 0;
22 m_PDGCharge = -99;
23 m_particleName = "";
24 m_index = unassigned;
25 m_g4TrackId = -99;
26 // m_daughterIndexes=0;
27 m_found = false;
28 m_source = "";
29}

Referenced by GetParentTrack(), operator<<, and operator<<.

◆ ~BesTruthTrack() [1/3]

BesTruthTrack::~BesTruthTrack ( )
inline

◆ BesTruthTrack() [2/3]

BesTruthTrack::BesTruthTrack ( )

◆ ~BesTruthTrack() [2/3]

BesTruthTrack::~BesTruthTrack ( )
inline

◆ BesTruthTrack() [3/3]

BesTruthTrack::BesTruthTrack ( )

◆ ~BesTruthTrack() [3/3]

BesTruthTrack::~BesTruthTrack ( )
inline

Member Function Documentation

◆ AddDaughterIndex() [1/3]

void BesTruthTrack::AddDaughterIndex ( G4int index)
inline

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

78{ m_daughterIndexes.push_back( index ); }

Referenced by BesSensitiveManager::MakeNewTrack().

◆ AddDaughterIndex() [2/3]

void BesTruthTrack::AddDaughterIndex ( G4int index)
inline

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

78{ m_daughterIndexes.push_back( index ); }

◆ AddDaughterIndex() [3/3]

void BesTruthTrack::AddDaughterIndex ( G4int index)
inline

Definition at line 78 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

78{ m_daughterIndexes.push_back( index ); }

◆ Found() [1/3]

void BesTruthTrack::Found ( )
inline

◆ Found() [2/3]

void BesTruthTrack::Found ( )
inline

Definition at line 83 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

83{ m_found = true; }

◆ Found() [3/3]

void BesTruthTrack::Found ( )
inline

Definition at line 83 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

83{ m_found = true; }

◆ GetBarcodeEndVtx() [1/3]

G4int BesTruthTrack::GetBarcodeEndVtx ( )
inline

Definition at line 54 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

54{ return m_barcodeEndVtx; }

Referenced by BesSensitiveManager::SaveParticlesFromGenerator().

◆ GetBarcodeEndVtx() [2/3]

G4int BesTruthTrack::GetBarcodeEndVtx ( )
inline

Definition at line 54 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

54{ return m_barcodeEndVtx; }

◆ GetBarcodeEndVtx() [3/3]

G4int BesTruthTrack::GetBarcodeEndVtx ( )
inline

Definition at line 54 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

54{ return m_barcodeEndVtx; }

◆ GetDaughterIndexes() [1/3]

◆ GetDaughterIndexes() [2/3]

vector< int > BesTruthTrack::GetDaughterIndexes ( ) const
inline

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

81{ return m_daughterIndexes; }

◆ GetDaughterIndexes() [3/3]

vector< int > BesTruthTrack::GetDaughterIndexes ( ) const
inline

Definition at line 81 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

81{ return m_daughterIndexes; }

◆ GetG4TrackId() [1/3]

G4int BesTruthTrack::GetG4TrackId ( ) const
inline

Definition at line 67 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

67{ return m_g4TrackId; }

Referenced by BesSensitiveManager::CheckDecayTrack().

◆ GetG4TrackId() [2/3]

G4int BesTruthTrack::GetG4TrackId ( ) const
inline

Definition at line 67 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

67{ return m_g4TrackId; }

◆ GetG4TrackId() [3/3]

G4int BesTruthTrack::GetG4TrackId ( ) const
inline

Definition at line 67 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

67{ return m_g4TrackId; }

◆ GetIndex() [1/3]

◆ GetIndex() [2/3]

G4int BesTruthTrack::GetIndex ( ) const
inline

Definition at line 63 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

63{ return m_index; }

◆ GetIndex() [3/3]

G4int BesTruthTrack::GetIndex ( ) const
inline

Definition at line 63 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

63{ return m_index; }

◆ GetP4() [1/3]

◆ GetP4() [2/3]

HepLorentzVector BesTruthTrack::GetP4 ( ) const
inline

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

35{ return m_fourMomentum; }

◆ GetP4() [3/3]

HepLorentzVector BesTruthTrack::GetP4 ( ) const
inline

Definition at line 35 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

35{ return m_fourMomentum; }

◆ GetParentTrack() [1/3]

BesTruthTrack * BesTruthTrack::GetParentTrack ( )
inline

Definition at line 72 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

72 {
73 if ( m_vertex == 0 ) return 0;
74 return m_vertex->GetParentTrack();
75 }

Referenced by GetParentTrack().

◆ GetParentTrack() [2/3]

BesTruthTrack * BesTruthTrack::GetParentTrack ( )
inline

Definition at line 72 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

72 {
73 if ( m_vertex == 0 ) return 0;
74 return m_vertex->GetParentTrack();
75 }

◆ GetParentTrack() [3/3]

BesTruthTrack * BesTruthTrack::GetParentTrack ( )
inline

Definition at line 72 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

72 {
73 if ( m_vertex == 0 ) return 0;
74 return m_vertex->GetParentTrack();
75 }

◆ GetParticleName() [1/3]

G4String BesTruthTrack::GetParticleName ( ) const
inline

Definition at line 47 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

47{ return m_particleName; }

Referenced by operator<<, and BesEmcSD::ProcessHits().

◆ GetParticleName() [2/3]

G4String BesTruthTrack::GetParticleName ( ) const
inline

Definition at line 47 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

47{ return m_particleName; }

◆ GetParticleName() [3/3]

G4String BesTruthTrack::GetParticleName ( ) const
inline

Definition at line 47 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

47{ return m_particleName; }

◆ GetPDGCharge() [1/3]

G4double BesTruthTrack::GetPDGCharge ( ) const
inline

◆ GetPDGCharge() [2/3]

G4double BesTruthTrack::GetPDGCharge ( ) const
inline

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

43{ return m_PDGCharge; }

◆ GetPDGCharge() [3/3]

G4double BesTruthTrack::GetPDGCharge ( ) const
inline

Definition at line 43 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

43{ return m_PDGCharge; }

◆ GetPDGCode() [1/3]

◆ GetPDGCode() [2/3]

G4int BesTruthTrack::GetPDGCode ( ) const
inline

Definition at line 39 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

39{ return m_PDGCode; }

◆ GetPDGCode() [3/3]

G4int BesTruthTrack::GetPDGCode ( ) const
inline

Definition at line 39 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

39{ return m_PDGCode; }

◆ GetSource() [1/3]

G4String BesTruthTrack::GetSource ( )
inline

Definition at line 86 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

86{ return m_source; }

Referenced by BesMcTruthWriter::SaveMcParticle().

◆ GetSource() [2/3]

G4String BesTruthTrack::GetSource ( )
inline

Definition at line 86 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

86{ return m_source; }

◆ GetSource() [3/3]

G4String BesTruthTrack::GetSource ( )
inline

Definition at line 86 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

86{ return m_source; }

◆ GetTerminalVertex() [1/3]

◆ GetTerminalVertex() [2/3]

BesTruthVertex * BesTruthTrack::GetTerminalVertex ( ) const
inline

Definition at line 59 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

59{ return m_terminalVertex; }

◆ GetTerminalVertex() [3/3]

BesTruthVertex * BesTruthTrack::GetTerminalVertex ( ) const
inline

Definition at line 59 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

59{ return m_terminalVertex; }

◆ GetVertex() [1/3]

◆ GetVertex() [2/3]

BesTruthVertex * BesTruthTrack::GetVertex ( ) const
inline

Definition at line 51 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

51{ return m_vertex; }

◆ GetVertex() [3/3]

BesTruthVertex * BesTruthTrack::GetVertex ( ) const
inline

Definition at line 51 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

51{ return m_vertex; }

◆ NotFound() [1/3]

G4bool BesTruthTrack::NotFound ( )
inline

Definition at line 84 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

84{ return !m_found; }

◆ NotFound() [2/3]

G4bool BesTruthTrack::NotFound ( )
inline

Definition at line 84 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

84{ return !m_found; }

◆ NotFound() [3/3]

G4bool BesTruthTrack::NotFound ( )
inline

Definition at line 84 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

84{ return !m_found; }

◆ SetBarcodeEndVtx() [1/3]

void BesTruthTrack::SetBarcodeEndVtx ( G4int vtx)
inline

◆ SetBarcodeEndVtx() [2/3]

void BesTruthTrack::SetBarcodeEndVtx ( G4int vtx)
inline

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

55{ m_barcodeEndVtx = vtx; }

◆ SetBarcodeEndVtx() [3/3]

void BesTruthTrack::SetBarcodeEndVtx ( G4int vtx)
inline

Definition at line 55 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

55{ m_barcodeEndVtx = vtx; }

◆ SetG4TrackId() [1/3]

void BesTruthTrack::SetG4TrackId ( G4int trackId)
inline

◆ SetG4TrackId() [2/3]

void BesTruthTrack::SetG4TrackId ( G4int trackId)
inline

Definition at line 68 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

68{ m_g4TrackId = trackId; }

◆ SetG4TrackId() [3/3]

void BesTruthTrack::SetG4TrackId ( G4int trackId)
inline

Definition at line 68 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

68{ m_g4TrackId = trackId; }

◆ SetIndex() [1/3]

void BesTruthTrack::SetIndex ( G4int index)
inline

◆ SetIndex() [2/3]

void BesTruthTrack::SetIndex ( G4int index)
inline

Definition at line 64 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

64{ m_index = index; }

◆ SetIndex() [3/3]

void BesTruthTrack::SetIndex ( G4int index)
inline

Definition at line 64 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

64{ m_index = index; }

◆ SetP4() [1/3]

void BesTruthTrack::SetP4 ( const HepLorentzVector & p4)
inline

◆ SetP4() [2/3]

void BesTruthTrack::SetP4 ( const HepLorentzVector & p4)
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

36{ m_fourMomentum = p4; }

◆ SetP4() [3/3]

void BesTruthTrack::SetP4 ( const HepLorentzVector & p4)
inline

Definition at line 36 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

36{ m_fourMomentum = p4; }

◆ SetParticleName() [1/3]

◆ SetParticleName() [2/3]

void BesTruthTrack::SetParticleName ( G4String name)
inline

Definition at line 48 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

48{ m_particleName = name; }

◆ SetParticleName() [3/3]

void BesTruthTrack::SetParticleName ( G4String name)
inline

Definition at line 48 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

48{ m_particleName = name; }

◆ SetPDGCharge() [1/3]

◆ SetPDGCharge() [2/3]

void BesTruthTrack::SetPDGCharge ( G4double charge)
inline

Definition at line 44 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

44{ m_PDGCharge = charge; }

◆ SetPDGCharge() [3/3]

void BesTruthTrack::SetPDGCharge ( G4double charge)
inline

Definition at line 44 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

44{ m_PDGCharge = charge; }

◆ SetPDGCode() [1/3]

void BesTruthTrack::SetPDGCode ( G4int code)
inline

◆ SetPDGCode() [2/3]

void BesTruthTrack::SetPDGCode ( G4int code)
inline

Definition at line 40 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

40{ m_PDGCode = code; }

◆ SetPDGCode() [3/3]

void BesTruthTrack::SetPDGCode ( G4int code)
inline

Definition at line 40 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

40{ m_PDGCode = code; }

◆ SetSource() [1/3]

void BesTruthTrack::SetSource ( G4String source)
inline

◆ SetSource() [2/3]

void BesTruthTrack::SetSource ( G4String source)
inline

Definition at line 87 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

87{ m_source = source; }

◆ SetSource() [3/3]

void BesTruthTrack::SetSource ( G4String source)
inline

Definition at line 87 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

87{ m_source = source; }

◆ SetTerminalVertex() [1/3]

void BesTruthTrack::SetTerminalVertex ( BesTruthVertex * vertex)
inline

Definition at line 60 of file InstallArea/x86_64-el9-gcc13-dbg/include/TruSim/BesTruthTrack.hh.

60{ m_terminalVertex = vertex; }

Referenced by BesSensitiveManager::SaveParticlesFromGenerator().

◆ SetTerminalVertex() [2/3]

void BesTruthTrack::SetTerminalVertex ( BesTruthVertex * vertex)
inline

Definition at line 60 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

60{ m_terminalVertex = vertex; }

◆ SetTerminalVertex() [3/3]

void BesTruthTrack::SetTerminalVertex ( BesTruthVertex * vertex)
inline

Definition at line 60 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

60{ m_terminalVertex = vertex; }

◆ SetVertex() [1/3]

void BesTruthTrack::SetVertex ( BesTruthVertex * vertex)
inline

◆ SetVertex() [2/3]

void BesTruthTrack::SetVertex ( BesTruthVertex * vertex)
inline

Definition at line 52 of file InstallArea/x86_64-el9-gcc13-opt/include/TruSim/BesTruthTrack.hh.

52{ m_vertex = vertex; }

◆ SetVertex() [3/3]

void BesTruthTrack::SetVertex ( BesTruthVertex * vertex)
inline

Definition at line 52 of file Simulation/BOOST/TruSim/include/TruSim/BesTruthTrack.hh.

52{ m_vertex = vertex; }

◆ operator<< [1/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack & track )
friend

Definition at line 31 of file BesTruthTrack.cc.

31 {
32 // track index
33 if ( track.GetIndex() == BesTruthTrack::unassigned ) stream << " --";
34 else stream << setw( 4 ) << track.GetIndex() << " ";
35
36 // PDGcode
37 if ( track.GetPDGCode() ) stream << setw( 4 ) << track.GetPDGCode() << " ";
38 else stream << " --";
39
40 // particle name
41 if ( track.GetParticleName() ) stream << setw( 10 ) << track.GetParticleName() << " ";
42 else stream << " --";
43
44 // original vertex index
45 if ( track.GetVertex() ) stream << setw( 4 ) << track.GetVertex()->GetIndex();
46 else stream << " --";
47
48 // terminal vertex index
49 if ( track.GetTerminalVertex() )
50 stream << setw( 4 ) << track.GetTerminalVertex()->GetIndex();
51 else stream << " --";
52
53 // four momentum
54 stream << " " << setiosflags( ios::fixed ) << setprecision( 4 ) << setw( 11 )
55 << track.GetP4().x() << setprecision( 4 ) << setw( 11 ) << track.GetP4().y()
56 << setprecision( 4 ) << setw( 11 ) << track.GetP4().z() << setprecision( 4 )
57 << setw( 11 ) << track.GetP4().e();
58
59 // daughter indexes
60 if ( track.GetDaughterIndexes().size() > 0 )
61 {
62 G4int nDaughter = track.GetDaughterIndexes().size();
63 for ( G4int i = 0; i < nDaughter; i++ )
64 stream << " " << ( track.GetDaughterIndexes() )[i] << " ";
65 }
66 return stream;
67}

◆ operator<< [2/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack & track )
friend

Definition at line 31 of file BesTruthTrack.cc.

31 {
32 // track index
33 if ( track.GetIndex() == BesTruthTrack::unassigned ) stream << " --";
34 else stream << setw( 4 ) << track.GetIndex() << " ";
35
36 // PDGcode
37 if ( track.GetPDGCode() ) stream << setw( 4 ) << track.GetPDGCode() << " ";
38 else stream << " --";
39
40 // particle name
41 if ( track.GetParticleName() ) stream << setw( 10 ) << track.GetParticleName() << " ";
42 else stream << " --";
43
44 // original vertex index
45 if ( track.GetVertex() ) stream << setw( 4 ) << track.GetVertex()->GetIndex();
46 else stream << " --";
47
48 // terminal vertex index
49 if ( track.GetTerminalVertex() )
50 stream << setw( 4 ) << track.GetTerminalVertex()->GetIndex();
51 else stream << " --";
52
53 // four momentum
54 stream << " " << setiosflags( ios::fixed ) << setprecision( 4 ) << setw( 11 )
55 << track.GetP4().x() << setprecision( 4 ) << setw( 11 ) << track.GetP4().y()
56 << setprecision( 4 ) << setw( 11 ) << track.GetP4().z() << setprecision( 4 )
57 << setw( 11 ) << track.GetP4().e();
58
59 // daughter indexes
60 if ( track.GetDaughterIndexes().size() > 0 )
61 {
62 G4int nDaughter = track.GetDaughterIndexes().size();
63 for ( G4int i = 0; i < nDaughter; i++ )
64 stream << " " << ( track.GetDaughterIndexes() )[i] << " ";
65 }
66 return stream;
67}

◆ operator<< [3/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack & track )
friend

Definition at line 31 of file BesTruthTrack.cc.

31 {
32 // track index
33 if ( track.GetIndex() == BesTruthTrack::unassigned ) stream << " --";
34 else stream << setw( 4 ) << track.GetIndex() << " ";
35
36 // PDGcode
37 if ( track.GetPDGCode() ) stream << setw( 4 ) << track.GetPDGCode() << " ";
38 else stream << " --";
39
40 // particle name
41 if ( track.GetParticleName() ) stream << setw( 10 ) << track.GetParticleName() << " ";
42 else stream << " --";
43
44 // original vertex index
45 if ( track.GetVertex() ) stream << setw( 4 ) << track.GetVertex()->GetIndex();
46 else stream << " --";
47
48 // terminal vertex index
49 if ( track.GetTerminalVertex() )
50 stream << setw( 4 ) << track.GetTerminalVertex()->GetIndex();
51 else stream << " --";
52
53 // four momentum
54 stream << " " << setiosflags( ios::fixed ) << setprecision( 4 ) << setw( 11 )
55 << track.GetP4().x() << setprecision( 4 ) << setw( 11 ) << track.GetP4().y()
56 << setprecision( 4 ) << setw( 11 ) << track.GetP4().z() << setprecision( 4 )
57 << setw( 11 ) << track.GetP4().e();
58
59 // daughter indexes
60 if ( track.GetDaughterIndexes().size() > 0 )
61 {
62 G4int nDaughter = track.GetDaughterIndexes().size();
63 for ( G4int i = 0; i < nDaughter; i++ )
64 stream << " " << ( track.GetDaughterIndexes() )[i] << " ";
65 }
66 return stream;
67}

◆ operator<< [4/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack * track )
friend

Definition at line 69 of file BesTruthTrack.cc.

69 {
70 stream << *track;
71 return stream;
72}

◆ operator<< [5/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack * track )
friend

Definition at line 69 of file BesTruthTrack.cc.

69 {
70 stream << *track;
71 return stream;
72}

◆ operator<< [6/6]

ostream & operator<< ( ostream & stream,
const BesTruthTrack * track )
friend

Definition at line 69 of file BesTruthTrack.cc.

69 {
70 stream << *track;
71 return stream;
72}

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