Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DiffractiveSplitableHadron Class Reference

#include <G4DiffractiveSplitableHadron.hh>

Inheritance diagram for G4DiffractiveSplitableHadron:
Collaboration diagram for G4DiffractiveSplitableHadron:

Public Member Functions

 G4DiffractiveSplitableHadron ()
 
 G4DiffractiveSplitableHadron (const G4ReactionProduct &aPrimary)
 
 G4DiffractiveSplitableHadron (const G4Nucleon &aNucleon)
 
 G4DiffractiveSplitableHadron (const G4VKineticNucleon *aNucleon)
 
 ~G4DiffractiveSplitableHadron ()
 
void SplitUp ()
 
G4PartonGetNextParton ()
 
G4PartonGetNextAntiParton ()
 
void SetFirstParton (G4int PDGcode)
 
void SetSecondParton (G4int PDGcode)
 
- Public Member Functions inherited from G4VSplitableHadron
 G4VSplitableHadron ()
 
 G4VSplitableHadron (const G4ReactionProduct &aPrimary)
 
 G4VSplitableHadron (const G4Nucleon &aNucleon)
 
 G4VSplitableHadron (const G4VKineticNucleon *aNucleon)
 
virtual ~G4VSplitableHadron ()
 
int operator== (const G4VSplitableHadron &right) const
 
int operator!= (const G4VSplitableHadron &right) const
 
void Set4Momentum (const G4LorentzVector &a4Momentum)
 
const G4LorentzVectorGet4Momentum () const
 
void SetDefinition (const G4ParticleDefinition *aDefinition)
 
const G4ParticleDefinitionGetDefinition () const
 
void IncrementCollisionCount (G4int aCount)
 
void SetCollisionCount (G4int aCount)
 
void SetTimeOfCreation (G4double aTime)
 
G4double GetTimeOfCreation ()
 
void SetPosition (const G4ThreeVector &aPosition)
 
const G4ThreeVectorGetPosition () const
 
void SetStatus (const G4int aStatus)
 
G4int GetStatus ()
 
G4bool IsSplit ()
 
G4int GetSoftCollisionCount ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSplitableHadron
void Splitting ()
 

Detailed Description

Definition at line 47 of file G4DiffractiveSplitableHadron.hh.

Constructor & Destructor Documentation

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( )

Definition at line 47 of file G4DiffractiveSplitableHadron.cc.

48 {
49  PartonIndex = -1;
50  Parton[0] = new G4Parton( 1 );
51  Parton[1] = new G4Parton(-1 );
52 }
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4ReactionProduct aPrimary)

Definition at line 57 of file G4DiffractiveSplitableHadron.cc.

57  :
58  G4VSplitableHadron( aPrimary )
59 {
60  PartonIndex = -2;
61  Parton[0] = NULL;
62 }
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4Nucleon aNucleon)

Definition at line 67 of file G4DiffractiveSplitableHadron.cc.

67  :
68  G4VSplitableHadron( aNucleon )
69 {
70  PartonIndex = -2;
71  Parton[0] = NULL;
72 }
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4VKineticNucleon aNucleon)

Definition at line 77 of file G4DiffractiveSplitableHadron.cc.

77  :
78  G4VSplitableHadron( aNucleon )
79 {
80  PartonIndex = -2;
81  Parton[0] = NULL;
82 }
G4DiffractiveSplitableHadron::~G4DiffractiveSplitableHadron ( )

Definition at line 87 of file G4DiffractiveSplitableHadron.cc.

87  {
88  //G4cout << "Destruct G4DiffractiveSplitableHadron" << Parton[0] << " " << Parton[1] << G4endl;
89  //if ( Parton[0] != NULL ) { delete Parton[0]; delete Parton[1]; }
90 }

Member Function Documentation

G4Parton * G4DiffractiveSplitableHadron::GetNextAntiParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 137 of file G4DiffractiveSplitableHadron.cc.

137  {
138  ++PartonIndex;
139  if ( PartonIndex > 1 || PartonIndex < 0 ) return NULL;
140  G4int PartonInd( PartonIndex );
141  if ( PartonIndex == 1 ) PartonIndex = -1;
142  return Parton[ PartonInd ];
143 }
int G4int
Definition: G4Types.hh:78
G4Parton * G4DiffractiveSplitableHadron::GetNextParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 126 of file G4DiffractiveSplitableHadron.cc.

126  {
127  ++PartonIndex;
128  if ( PartonIndex > 1 || PartonIndex < 0 ) return NULL;
129  G4int PartonInd( PartonIndex );
130  if ( PartonIndex == 1 ) PartonIndex = -1;
131  return Parton[ PartonInd ];
132 }
int G4int
Definition: G4Types.hh:78
void G4DiffractiveSplitableHadron::SetFirstParton ( G4int  PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 148 of file G4DiffractiveSplitableHadron.cc.

148  {
149  delete Parton[0];
150  Parton[0] = new G4Parton( PDGcode );
151 }
void G4DiffractiveSplitableHadron::SetSecondParton ( G4int  PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 156 of file G4DiffractiveSplitableHadron.cc.

156  {
157  delete Parton[1];
158  Parton[1] = new G4Parton( PDGcode );
159 }
void G4DiffractiveSplitableHadron::SplitUp ( )
virtual

Implements G4VSplitableHadron.

Definition at line 95 of file G4DiffractiveSplitableHadron.cc.

95  {
96  //G4cout << "SplitUp() IsSplit() Parton[0] " << IsSplit() << " " << Parton[0] << G4endl;
97  if ( IsSplit() ) return;
98  Splitting();
99  // Split once only...
100  if ( Parton[0] != NULL ) return;
101 
102  // flavours of quark ends
103  G4int PDGcode = GetDefinition()->GetPDGEncoding();
104  G4int stringStart, stringEnd;
105  ChooseStringEnds( PDGcode, &stringStart, &stringEnd );
106 
107  Parton[0] = new G4Parton( stringStart );
108  Parton[1] = new G4Parton( stringEnd );
109 
110  /* // Inversion of a string
111  if ( G4UniformRand() < 1.75 ) { //0.75
112  Parton[0] = new G4Parton( stringStart );
113  Parton[1] = new G4Parton( stringEnd );
114  } else {
115  Parton[0] = new G4Parton( stringEnd );
116  Parton[1] = new G4Parton( stringStart );
117  }
118  */
119 
120  PartonIndex = -1;
121 }
int G4int
Definition: G4Types.hh:78
const G4ParticleDefinition * GetDefinition() const

Here is the call graph for this function:


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