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

#include <BesTruthTrack.hh>

Public Types

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)
 

Friends

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

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

◆ anonymous enum

anonymous enum
Enumerator
unassigned 

Definition at line 33 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

33{ unassigned = -1 };

Constructor & Destructor Documentation

◆ BesTruthTrack() [1/2]

BesTruthTrack::BesTruthTrack ( )

Definition at line 17 of file BesTruthTrack.cc.

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

◆ ~BesTruthTrack() [1/2]

BesTruthTrack::~BesTruthTrack ( )
inline

Definition at line 28 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

28{};

◆ BesTruthTrack() [2/2]

BesTruthTrack::BesTruthTrack ( )

◆ ~BesTruthTrack() [2/2]

BesTruthTrack::~BesTruthTrack ( )
inline

Member Function Documentation

◆ AddDaughterIndex() [1/2]

void BesTruthTrack::AddDaughterIndex ( G4int  index)
inline

Definition at line 80 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

80{m_daughterIndexes.push_back(index);}

Referenced by BesSensitiveManager::MakeNewTrack().

◆ AddDaughterIndex() [2/2]

void BesTruthTrack::AddDaughterIndex ( G4int  index)
inline

Definition at line 80 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

80{m_daughterIndexes.push_back(index);}

◆ Found() [1/2]

void BesTruthTrack::Found ( )
inline

◆ Found() [2/2]

void BesTruthTrack::Found ( )
inline

Definition at line 85 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

85{m_found = true;}

◆ GetBarcodeEndVtx() [1/2]

G4int BesTruthTrack::GetBarcodeEndVtx ( )
inline

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

55{return m_barcodeEndVtx;}

Referenced by BesSensitiveManager::SaveParticlesFromGenerator().

◆ GetBarcodeEndVtx() [2/2]

G4int BesTruthTrack::GetBarcodeEndVtx ( )
inline

Definition at line 55 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

55{return m_barcodeEndVtx;}

◆ GetDaughterIndexes() [1/2]

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

◆ GetDaughterIndexes() [2/2]

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

Definition at line 83 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

83{return m_daughterIndexes;}

◆ GetG4TrackId() [1/2]

G4int BesTruthTrack::GetG4TrackId ( ) const
inline

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

68{return m_g4TrackId;}

Referenced by BesSensitiveManager::CheckDecayTrack().

◆ GetG4TrackId() [2/2]

G4int BesTruthTrack::GetG4TrackId ( ) const
inline

Definition at line 68 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

68{return m_g4TrackId;}

◆ GetIndex() [1/2]

◆ GetIndex() [2/2]

G4int BesTruthTrack::GetIndex ( ) const
inline

Definition at line 64 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

64{return m_index;}

◆ GetP4() [1/2]

HepLorentzVector BesTruthTrack::GetP4 ( ) const
inline

◆ GetP4() [2/2]

HepLorentzVector BesTruthTrack::GetP4 ( ) const
inline

Definition at line 36 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

36{ return m_fourMomentum; }

◆ GetParentTrack() [1/2]

BesTruthTrack * BesTruthTrack::GetParentTrack ( )
inline

Definition at line 73 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

74 {
75 if (m_vertex == 0) return 0;
76 return m_vertex->GetParentTrack();
77 }

◆ GetParentTrack() [2/2]

BesTruthTrack * BesTruthTrack::GetParentTrack ( )
inline

Definition at line 73 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

74 {
75 if (m_vertex == 0) return 0;
76 return m_vertex->GetParentTrack();
77 }

◆ GetParticleName() [1/2]

G4String BesTruthTrack::GetParticleName ( ) const
inline

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

48{return m_particleName;}

Referenced by BesEmcSD::ProcessHits().

◆ GetParticleName() [2/2]

G4String BesTruthTrack::GetParticleName ( ) const
inline

Definition at line 48 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

48{return m_particleName;}

◆ GetPDGCharge() [1/2]

G4double BesTruthTrack::GetPDGCharge ( ) const
inline

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

44{return m_PDGCharge;}

Referenced by BesEmcSD::ProcessHits(), and BesAsciiIO::SaveTrackTruth().

◆ GetPDGCharge() [2/2]

G4double BesTruthTrack::GetPDGCharge ( ) const
inline

Definition at line 44 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

44{return m_PDGCharge;}

◆ GetPDGCode() [1/2]

◆ GetPDGCode() [2/2]

G4int BesTruthTrack::GetPDGCode ( ) const
inline

Definition at line 40 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

40{return m_PDGCode;}

◆ GetSource() [1/2]

G4String BesTruthTrack::GetSource ( )
inline

Definition at line 88 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

88{return m_source;}

Referenced by BesMcTruthWriter::SaveMcParticle().

◆ GetSource() [2/2]

G4String BesTruthTrack::GetSource ( )
inline

Definition at line 88 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

88{return m_source;}

◆ GetTerminalVertex() [1/2]

◆ GetTerminalVertex() [2/2]

BesTruthVertex * BesTruthTrack::GetTerminalVertex ( ) const
inline

Definition at line 60 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

60{return m_terminalVertex;}

◆ GetVertex() [1/2]

◆ GetVertex() [2/2]

BesTruthVertex * BesTruthTrack::GetVertex ( ) const
inline

Definition at line 52 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

52{return m_vertex;}

◆ NotFound() [1/2]

G4bool BesTruthTrack::NotFound ( )
inline

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

86{return !m_found;}

Referenced by BesSensitiveManager::UpdatePrimaryTrack().

◆ NotFound() [2/2]

G4bool BesTruthTrack::NotFound ( )
inline

Definition at line 86 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

86{return !m_found;}

◆ SetBarcodeEndVtx() [1/2]

void BesTruthTrack::SetBarcodeEndVtx ( G4int  vtx)
inline

Definition at line 56 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

56{m_barcodeEndVtx = vtx;}

Referenced by BesSensitiveManager::SaveParticlesFromGenerator().

◆ SetBarcodeEndVtx() [2/2]

void BesTruthTrack::SetBarcodeEndVtx ( G4int  vtx)
inline

Definition at line 56 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

56{m_barcodeEndVtx = vtx;}

◆ SetG4TrackId() [1/2]

void BesTruthTrack::SetG4TrackId ( G4int  trackId)
inline

◆ SetG4TrackId() [2/2]

void BesTruthTrack::SetG4TrackId ( G4int  trackId)
inline

Definition at line 69 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

69{m_g4TrackId = trackId;}

◆ SetIndex() [1/2]

void BesTruthTrack::SetIndex ( G4int  index)
inline

◆ SetIndex() [2/2]

void BesTruthTrack::SetIndex ( G4int  index)
inline

Definition at line 65 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

65{m_index=index;}

◆ SetP4() [1/2]

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

◆ SetP4() [2/2]

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

Definition at line 37 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

37{ m_fourMomentum = p4; }

◆ SetParticleName() [1/2]

void BesTruthTrack::SetParticleName ( G4String  name)
inline

◆ SetParticleName() [2/2]

void BesTruthTrack::SetParticleName ( G4String  name)
inline

Definition at line 49 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

49{m_particleName=name;}

◆ SetPDGCharge() [1/2]

void BesTruthTrack::SetPDGCharge ( G4double  charge)
inline

◆ SetPDGCharge() [2/2]

void BesTruthTrack::SetPDGCharge ( G4double  charge)
inline

Definition at line 45 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

45{m_PDGCharge = charge;}

◆ SetPDGCode() [1/2]

void BesTruthTrack::SetPDGCode ( G4int  code)
inline

◆ SetPDGCode() [2/2]

void BesTruthTrack::SetPDGCode ( G4int  code)
inline

Definition at line 41 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

41{m_PDGCode=code;}

◆ SetSource() [1/2]

void BesTruthTrack::SetSource ( G4String  source)
inline

◆ SetSource() [2/2]

void BesTruthTrack::SetSource ( G4String  source)
inline

Definition at line 89 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

89{m_source=source;}

◆ SetTerminalVertex() [1/2]

void BesTruthTrack::SetTerminalVertex ( BesTruthVertex vertex)
inline

Definition at line 61 of file InstallArea/include/TruSim/TruSim/BesTruthTrack.hh.

61{m_terminalVertex=vertex;}

Referenced by BesSensitiveManager::SaveParticlesFromGenerator().

◆ SetTerminalVertex() [2/2]

void BesTruthTrack::SetTerminalVertex ( BesTruthVertex vertex)
inline

Definition at line 61 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

61{m_terminalVertex=vertex;}

◆ SetVertex() [1/2]

void BesTruthTrack::SetVertex ( BesTruthVertex vertex)
inline

◆ SetVertex() [2/2]

void BesTruthTrack::SetVertex ( BesTruthVertex vertex)
inline

Definition at line 53 of file Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesTruthTrack.hh.

53{m_vertex=vertex;}

Friends And Related Function Documentation

◆ operator<< [1/4]

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

Definition at line 33 of file BesTruthTrack.cc.

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

◆ operator<< [2/4]

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

Definition at line 33 of file BesTruthTrack.cc.

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

◆ operator<< [3/4]

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

Definition at line 83 of file BesTruthTrack.cc.

84{
85 stream << *track;
86 return stream;
87}

◆ operator<< [4/4]

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

Definition at line 83 of file BesTruthTrack.cc.

84{
85 stream << *track;
86 return stream;
87}

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