#include <G4QMDSystem.hh>
Inheritance diagram for G4QMDSystem:
Public Member Functions | |
G4QMDSystem () | |
~G4QMDSystem () | |
void | SetParticipant (G4QMDParticipant *particle) |
void | SetSystem (G4QMDSystem *, G4ThreeVector, G4ThreeVector) |
void | SubtractSystem (G4QMDSystem *) |
G4QMDParticipant * | EraseParticipant (G4int i) |
void | DeleteParticipant (G4int i) |
void | InsertParticipant (G4QMDParticipant *particle, G4int j) |
G4int | GetTotalNumberOfParticipant () |
G4QMDParticipant * | GetParticipant (G4int i) |
void | IncrementCollisionCounter () |
G4int | GetNOCollision () |
void | ShowParticipants () |
void | Clear () |
Protected Attributes | |
std::vector< G4QMDParticipant * > | participants |
Definition at line 45 of file G4QMDSystem.hh.
G4QMDSystem::G4QMDSystem | ( | ) |
Definition at line 31 of file G4QMDSystem.cc.
References participants.
00032 { 00033 participants.clear(); 00034 numberOfCollision = 0; 00035 }
G4QMDSystem::~G4QMDSystem | ( | ) |
Definition at line 39 of file G4QMDSystem.cc.
References Clear().
00040 { 00041 this->Clear(); 00042 }
void G4QMDSystem::Clear | ( | ) |
Definition at line 68 of file G4QMDSystem.cc.
References GetTotalNumberOfParticipant(), and participants.
Referenced by G4QMDReaction::ApplyYourself(), and ~G4QMDSystem().
00069 { 00070 for ( G4int i = 0 ; i < this->GetTotalNumberOfParticipant() ; i++ ) 00071 { 00072 delete participants[i]; 00073 } 00074 participants.clear(); 00075 }
void G4QMDSystem::DeleteParticipant | ( | G4int | i | ) | [inline] |
Definition at line 57 of file G4QMDSystem.hh.
References participants.
Referenced by G4QMDCollision::CalKinematicsOfBinaryCollisions().
00057 { delete participants[ i ] ; participants.erase( std::find ( participants.begin() , participants.end() , participants[ i ] ) ); };
G4QMDParticipant* G4QMDSystem::EraseParticipant | ( | G4int | i | ) | [inline] |
Definition at line 56 of file G4QMDSystem.hh.
References participants.
Referenced by G4QMDCollision::CalFinalStateOfTheBinaryCollision().
00056 { G4QMDParticipant* particle = participants[ i ]; participants.erase( std::find ( participants.begin() , participants.end() , participants[ i ] ) ) ; return particle; };
G4int G4QMDSystem::GetNOCollision | ( | ) | [inline] |
G4QMDParticipant* G4QMDSystem::GetParticipant | ( | G4int | i | ) | [inline] |
Definition at line 62 of file G4QMDSystem.hh.
References participants.
Referenced by G4QMDReaction::ApplyYourself(), G4QMDMeanField::Cal2BodyQuantities(), G4QMDNucleus::CalEnergyAndAngularMomentumInCM(), G4QMDCollision::CalFinalStateOfTheBinaryCollision(), G4QMDCollision::CalFinalStateOfTheBinaryCollisionJQMD(), G4QMDMeanField::CalGraduate(), G4QMDCollision::CalKinematicsOfBinaryCollisions(), G4QMDMeanField::DoClusterJudgment(), G4QMDMeanField::DoPropagation(), G4QMDMeanField::GetPotential(), G4QMDMeanField::GetTotalPotential(), G4QMDMeanField::IsPauliBlocked(), and SubtractSystem().
00062 { return participants[i]; };
G4int G4QMDSystem::GetTotalNumberOfParticipant | ( | ) | [inline] |
Definition at line 60 of file G4QMDSystem.hh.
References participants.
Referenced by G4QMDReaction::ApplyYourself(), G4QMDMeanField::Cal2BodyQuantities(), G4QMDNucleus::CalEnergyAndAngularMomentumInCM(), G4QMDMeanField::CalGraduate(), G4QMDCollision::CalKinematicsOfBinaryCollisions(), Clear(), G4QMDMeanField::DoClusterJudgment(), G4QMDMeanField::DoPropagation(), G4QMDMeanField::GetPotential(), G4QMDMeanField::GetTotalPotential(), G4QMDMeanField::SetSystem(), and SubtractSystem().
00060 { return participants.size(); };
void G4QMDSystem::IncrementCollisionCounter | ( | ) | [inline] |
Definition at line 64 of file G4QMDSystem.hh.
Referenced by G4QMDCollision::CalKinematicsOfBinaryCollisions().
void G4QMDSystem::InsertParticipant | ( | G4QMDParticipant * | particle, | |
G4int | j | |||
) |
Definition at line 104 of file G4QMDSystem.cc.
References G4cout, G4endl, and participants.
Referenced by G4QMDCollision::CalFinalStateOfTheBinaryCollision().
00105 { 00106 00107 if ( (size_t) n > participants.size()+1 ) 00108 G4cout << "G4QMDSystem::InsertParticipant size error" << G4endl; 00109 00110 std::vector< G4QMDParticipant* >::iterator it; 00111 it = participants.begin(); 00112 00113 for ( G4int i = 0; i < n ; i++ ) 00114 it++; 00115 00116 participants.insert( it, particle ); 00117 }
void G4QMDSystem::SetParticipant | ( | G4QMDParticipant * | particle | ) | [inline] |
Definition at line 51 of file G4QMDSystem.hh.
References participants.
Referenced by G4QMDReaction::ApplyYourself(), G4QMDCollision::CalKinematicsOfBinaryCollisions(), G4QMDMeanField::DoClusterJudgment(), G4QMDGroundStateNucleus::G4QMDGroundStateNucleus(), and SetSystem().
00051 { participants.push_back ( particle ); };
void G4QMDSystem::SetSystem | ( | G4QMDSystem * | , | |
G4ThreeVector | , | |||
G4ThreeVector | ||||
) |
Definition at line 46 of file G4QMDSystem.cc.
References participants, and SetParticipant().
00047 { 00048 std::vector< G4QMDParticipant* >::iterator it; 00049 for ( it = nucleus->participants.begin() ; it != nucleus->participants.end() ; it++ ) 00050 { 00051 G4ThreeVector r = (*it)->GetPosition() + dr; 00052 (*it)->SetPosition ( r ); 00053 G4ThreeVector p = (*it)->GetMomentum() + dp; 00054 (*it)->SetMomentum ( p ); 00055 this->SetParticipant( *it ); 00056 } 00057 }
void G4QMDSystem::ShowParticipants | ( | ) |
Definition at line 79 of file G4QMDSystem.cc.
References G4cout, G4endl, and participants.
00080 { 00081 G4ThreeVector p_sum( 0.0 ); 00082 std::vector< G4QMDParticipant* >::iterator it; 00083 G4cout << "Momentum and Position of each participant " << G4endl; 00084 G4int i = 0; 00085 for ( it = participants.begin() ; it != participants.end() ; it++ ) 00086 { 00087 G4cout << i 00088 << " " 00089 << (*it)->GetDefinition()->GetParticleName() 00090 << " " 00091 << std::setprecision( 8 ) 00092 << (*it)->GetMomentum() 00093 << " " 00094 << (*it)->GetPosition() 00095 << G4endl; 00096 p_sum += (*it)->GetMomentum(); 00097 i++; 00098 } 00099 G4cout << "Sum upped Momentum and mag " << p_sum << " " << p_sum.mag() << G4endl; 00100 }
void G4QMDSystem::SubtractSystem | ( | G4QMDSystem * | ) |
Definition at line 59 of file G4QMDSystem.cc.
References GetParticipant(), GetTotalNumberOfParticipant(), and participants.
Referenced by G4QMDMeanField::DoClusterJudgment().
00060 { 00061 00062 for ( G4int i = 0 ; i < nucleus->GetTotalNumberOfParticipant() ; i++ ) 00063 { 00064 participants.erase ( std::find ( participants.begin() , participants.end() , nucleus->GetParticipant( i ) ) ); 00065 } 00066 }
std::vector< G4QMDParticipant* > G4QMDSystem::participants [protected] |
Definition at line 72 of file G4QMDSystem.hh.
Referenced by Clear(), DeleteParticipant(), EraseParticipant(), G4QMDSystem(), G4QMDNucleus::Get4Momentum(), G4QMDNucleus::GetAtomicNumber(), G4QMDNucleus::GetMassNumber(), GetParticipant(), GetTotalNumberOfParticipant(), InsertParticipant(), SetParticipant(), SetSystem(), ShowParticipants(), and SubtractSystem().