#include <G4ParticleChangeForGamma.hh>
Inheritance diagram for G4ParticleChangeForGamma:
Definition at line 58 of file G4ParticleChangeForGamma.hh.
G4ParticleChangeForGamma::G4ParticleChangeForGamma | ( | ) |
Definition at line 49 of file G4ParticleChangeForGamma.cc.
References G4VParticleChange::debugFlag, G4cout, G4endl, NormalCondition, G4VParticleChange::theSteppingControlFlag, and G4VParticleChange::verboseLevel.
00050 : G4VParticleChange(), currentTrack(0), proposedKinEnergy(0.) 00051 { 00052 theSteppingControlFlag = NormalCondition; 00053 debugFlag = false; 00054 #ifdef G4VERBOSE 00055 if (verboseLevel>2) { 00056 G4cout << "G4ParticleChangeForGamma::G4ParticleChangeForGamma() " << G4endl; 00057 } 00058 #endif 00059 }
G4ParticleChangeForGamma::~G4ParticleChangeForGamma | ( | ) | [virtual] |
Definition at line 61 of file G4ParticleChangeForGamma.cc.
References G4cout, G4endl, and G4VParticleChange::verboseLevel.
00062 { 00063 #ifdef G4VERBOSE 00064 if (verboseLevel>2) { 00065 G4cout << "G4ParticleChangeForGamma::~G4ParticleChangeForGamma() " << G4endl; 00066 } 00067 #endif 00068 }
G4ParticleChangeForGamma::G4ParticleChangeForGamma | ( | const G4ParticleChangeForGamma & | right | ) | [protected] |
Definition at line 70 of file G4ParticleChangeForGamma.cc.
References currentTrack, G4cout, G4endl, proposedKinEnergy, proposedMomentumDirection, proposedPolarization, and G4VParticleChange::verboseLevel.
00071 : G4VParticleChange(right) 00072 { 00073 if (verboseLevel>1) 00074 G4cout << "G4ParticleChangeForGamma:: copy constructor is called " << G4endl; 00075 00076 currentTrack = right.currentTrack; 00077 proposedKinEnergy = right.proposedKinEnergy; 00078 proposedMomentumDirection = right.proposedMomentumDirection; 00079 proposedPolarization = right.proposedPolarization; 00080 }
void G4ParticleChangeForGamma::AddSecondary | ( | G4DynamicParticle * | aParticle | ) |
Definition at line 123 of file G4ParticleChangeForGamma.cc.
References G4VParticleChange::AddSecondary(), G4Track::GetGlobalTime(), G4Track::GetPosition(), G4Track::GetTouchableHandle(), and G4Track::SetTouchableHandle().
Referenced by G4eplusPolarizedAnnihilation::AtRestDoIt(), and G4eplusAnnihilation::AtRestDoIt().
00124 { 00125 // create track 00126 G4Track* aTrack = new G4Track(aParticle, currentTrack->GetGlobalTime(), 00127 currentTrack->GetPosition()); 00128 00129 // Touchable handle is copied to keep the pointer 00130 aTrack->SetTouchableHandle(currentTrack->GetTouchableHandle()); 00131 00132 // add a secondary 00133 G4VParticleChange::AddSecondary(aTrack); 00134 }
Reimplemented from G4VParticleChange.
Definition at line 199 of file G4ParticleChangeForGamma.cc.
References G4VParticleChange::accuracyForException, G4VParticleChange::accuracyForWarning, G4VParticleChange::CheckIt(), DumpInfo(), EventMustBeAborted, G4cout, G4endl, G4Exception(), G4Track::GetDefinition(), G4Track::GetKineticEnergy(), G4ParticleDefinition::GetParticleName(), and G4Track::GetPosition().
00200 { 00201 G4bool itsOK = true; 00202 G4bool exitWithError = false; 00203 00204 G4double accuracy; 00205 00206 // Energy should not be lager than initial value 00207 accuracy = ( proposedKinEnergy - aTrack.GetKineticEnergy())/MeV; 00208 if (accuracy > accuracyForWarning) { 00209 itsOK = false; 00210 exitWithError = (accuracy > accuracyForException); 00211 #ifdef G4VERBOSE 00212 G4cout << "G4ParticleChangeForGamma::CheckIt: "; 00213 G4cout << "KinEnergy become larger than the initial value!" 00214 << " Difference: " << accuracy << "[MeV] " <<G4endl; 00215 G4cout << aTrack.GetDefinition()->GetParticleName() 00216 << " E=" << aTrack.GetKineticEnergy()/MeV 00217 << " pos=" << aTrack.GetPosition().x()/m 00218 << ", " << aTrack.GetPosition().y()/m 00219 << ", " << aTrack.GetPosition().z()/m 00220 << G4endl; 00221 #endif 00222 } 00223 00224 // dump out information of this particle change 00225 #ifdef G4VERBOSE 00226 if (!itsOK) DumpInfo(); 00227 #endif 00228 00229 // Exit with error 00230 if (exitWithError) { 00231 G4Exception("G4ParticleChangeForGamma::CheckIt", 00232 "TRACK004",EventMustBeAborted, 00233 "energy was illegal"); 00234 } 00235 00236 //correction 00237 if (!itsOK) { 00238 proposedKinEnergy = aTrack.GetKineticEnergy(); 00239 } 00240 00241 itsOK = (itsOK) && G4VParticleChange::CheckIt(aTrack); 00242 return itsOK; 00243 }
void G4ParticleChangeForGamma::DumpInfo | ( | ) | const [virtual] |
Reimplemented from G4VParticleChange.
Definition at line 181 of file G4ParticleChangeForGamma.cc.
References G4VParticleChange::DumpInfo(), G4cout, and G4endl.
Referenced by CheckIt().
00182 { 00183 // use base-class DumpInfo 00184 G4VParticleChange::DumpInfo(); 00185 00186 G4int oldprc = G4cout.precision(3); 00187 G4cout << " Kinetic Energy (MeV): " 00188 << std::setw(20) << proposedKinEnergy/MeV 00189 << G4endl; 00190 G4cout << " Momentum Direction: " 00191 << std::setw(20) << proposedMomentumDirection 00192 << G4endl; 00193 G4cout << " Polarization: " 00194 << std::setw(20) << proposedPolarization 00195 << G4endl; 00196 G4cout.precision(oldprc); 00197 }
const G4Track * G4ParticleChangeForGamma::GetCurrentTrack | ( | ) | const [inline] |
Definition at line 154 of file G4ParticleChangeForGamma.hh.
Referenced by G4PolarizedComptonModel::SampleSecondaries(), G4PolarizedAnnihilationModel::SampleSecondaries(), G4DNATransformElectronModel::SampleSecondaries(), G4DNASancheSolvatationModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), G4DNAMeltonAttachmentModel::SampleSecondaries(), G4DNAEmfietzoglouExcitationModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), and G4DNABornExcitationModel::SampleSecondaries().
G4double G4ParticleChangeForGamma::GetProposedKineticEnergy | ( | ) | const [inline] |
Definition at line 124 of file G4ParticleChangeForGamma.hh.
Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), and G4VEmProcess::PostStepDoIt().
const G4ThreeVector & G4ParticleChangeForGamma::GetProposedMomentumDirection | ( | ) | const [inline] |
Definition at line 135 of file G4ParticleChangeForGamma.hh.
Referenced by G4EmBiasingManager::ApplySecondaryBiasing().
const G4ThreeVector & G4ParticleChangeForGamma::GetProposedPolarization | ( | ) | const [inline] |
void G4ParticleChangeForGamma::InitializeForPostStep | ( | const G4Track & | ) | [inline] |
Definition at line 179 of file G4ParticleChangeForGamma.hh.
References G4Track::GetKineticEnergy(), G4Track::GetMomentumDirection(), G4Track::GetPolarization(), G4Track::GetTrackStatus(), G4Track::GetWeight(), G4VParticleChange::InitializeSecondaries(), G4VParticleChange::isParentWeightProposed, G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNonIonizingEnergyDeposit, G4VParticleChange::theParentWeight, and G4VParticleChange::theStatusChange.
Referenced by G4eplusPolarizedAnnihilation::AtRestDoIt(), G4eplusAnnihilation::AtRestDoIt(), and G4VEmProcess::PostStepDoIt().
00180 { 00181 theStatusChange = track.GetTrackStatus(); 00182 theLocalEnergyDeposit = 0.0; 00183 theNonIonizingEnergyDeposit = 0.0; 00184 InitializeSecondaries(track); 00185 theParentWeight = track.GetWeight(); 00186 isParentWeightProposed = false; 00187 proposedKinEnergy = track.GetKineticEnergy(); 00188 proposedMomentumDirection = track.GetMomentumDirection(); 00189 proposedPolarization = track.GetPolarization(); 00190 currentTrack = &track; 00191 }
G4ParticleChangeForGamma & G4ParticleChangeForGamma::operator= | ( | const G4ParticleChangeForGamma & | right | ) | [protected] |
Definition at line 83 of file G4ParticleChangeForGamma.cc.
References currentTrack, G4cout, G4endl, proposedKinEnergy, proposedMomentumDirection, proposedPolarization, G4FastVector< Type, N >::SetElement(), G4VParticleChange::theListOfSecondaries, G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNumberOfSecondaries, G4VParticleChange::theParentWeight, G4VParticleChange::theStatusChange, G4VParticleChange::theSteppingControlFlag, and G4VParticleChange::verboseLevel.
00085 { 00086 #ifdef G4VERBOSE 00087 if (verboseLevel>1) 00088 G4cout << "G4ParticleChangeForGamma:: assignment operator is called " << G4endl; 00089 #endif 00090 00091 if (this != &right) { 00092 if (theNumberOfSecondaries>0) { 00093 #ifdef G4VERBOSE 00094 if (verboseLevel>0) { 00095 G4cout << "G4ParticleChangeForGamma: assignment operator Warning "; 00096 G4cout << "theListOfSecondaries is not empty "; 00097 } 00098 #endif 00099 for (G4int index= 0; index<theNumberOfSecondaries; index++){ 00100 if ( (*theListOfSecondaries)[index] ) delete (*theListOfSecondaries)[index] ; 00101 } 00102 } 00103 delete theListOfSecondaries; 00104 theListOfSecondaries = new G4TrackFastVector(); 00105 theNumberOfSecondaries = right.theNumberOfSecondaries; 00106 for (G4int index = 0; index<theNumberOfSecondaries; index++){ 00107 G4Track* newTrack = new G4Track(*((*right.theListOfSecondaries)[index] )); 00108 theListOfSecondaries->SetElement(index, newTrack); } 00109 00110 theStatusChange = right.theStatusChange; 00111 theLocalEnergyDeposit = right.theLocalEnergyDeposit; 00112 theSteppingControlFlag = right.theSteppingControlFlag; 00113 theParentWeight = right.theParentWeight; 00114 00115 currentTrack = right.currentTrack; 00116 proposedKinEnergy = right.proposedKinEnergy; 00117 proposedMomentumDirection = right.proposedMomentumDirection; 00118 proposedPolarization = right.proposedPolarization; 00119 } 00120 return *this; 00121 }
void G4ParticleChangeForGamma::ProposeMomentumDirection | ( | const G4ThreeVector & | Pfinal | ) | [inline] |
void G4ParticleChangeForGamma::ProposeMomentumDirection | ( | G4double | Px, | |
G4double | Py, | |||
G4double | Pz | |||
) | [inline] |
Definition at line 147 of file G4ParticleChangeForGamma.hh.
Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), G4XrayRayleighModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4PenelopeRayleighModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4MuElecElasticModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), G4LivermorePolarizedGammaConversionModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4IonCoulombScatteringModel::SampleSecondaries(), G4HeatedKleinNishinaCompton::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4eSingleCoulombScatteringModel::SampleSecondaries(), G4eCoulombScatteringModel::SampleSecondaries(), G4DNAScreenedRutherfordElasticModel::SampleSecondaries(), G4DNASancheExcitationModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), G4DNAEmfietzoglouExcitationModel::SampleSecondaries(), G4DNAChampionElasticModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), and G4DNABornExcitationModel::SampleSecondaries().
00148 { 00149 proposedMomentumDirection.setX(Px); 00150 proposedMomentumDirection.setY(Py); 00151 proposedMomentumDirection.setZ(Pz); 00152 }
void G4ParticleChangeForGamma::ProposePolarization | ( | G4double | Px, | |
G4double | Py, | |||
G4double | Pz | |||
) | [inline] |
Definition at line 172 of file G4ParticleChangeForGamma.hh.
00173 { 00174 proposedPolarization.setX(Px); 00175 proposedPolarization.setY(Py); 00176 proposedPolarization.setZ(Pz); 00177 }
void G4ParticleChangeForGamma::ProposePolarization | ( | const G4ThreeVector & | dir | ) | [inline] |
Definition at line 166 of file G4ParticleChangeForGamma.hh.
Referenced by G4PolarizedComptonModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), and G4LivermorePolarizedComptonModel::SampleSecondaries().
void G4ParticleChangeForGamma::SetProposedKineticEnergy | ( | G4double | proposedKinEnergy | ) | [inline] |
Definition at line 129 of file G4ParticleChangeForGamma.hh.
Referenced by G4EmBiasingManager::ApplySecondaryBiasing(), G4XrayRayleighModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4PolarizedAnnihilationModel::SampleSecondaries(), G4PenelopeRayleighModel::SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4PenelopeGammaConversionModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4PenelopeAnnihilationModel::SampleSecondaries(), G4PEEffectModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4PairProductionRelModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4MuElecElasticModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4LivermorePolarizedGammaConversionModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreNuclearGammaConversionModel::SampleSecondaries(), G4LivermoreGammaConversionModelRC::SampleSecondaries(), G4LivermoreGammaConversionModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4IonCoulombScatteringModel::SampleSecondaries(), G4HeatedKleinNishinaCompton::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4eSingleCoulombScatteringModel::SampleSecondaries(), G4eCoulombScatteringModel::SampleSecondaries(), G4DNAScreenedRutherfordElasticModel::SampleSecondaries(), G4DNASancheSolvatationModel::SampleSecondaries(), G4DNASancheExcitationModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), G4DNAMeltonAttachmentModel::SampleSecondaries(), G4DNAEmfietzoglouExcitationModel::SampleSecondaries(), G4DNAChampionElasticModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), G4DNABornExcitationModel::SampleSecondaries(), G4BoldyshevTripletModel::SampleSecondaries(), and G4BetheHeitlerModel::SampleSecondaries().
Reimplemented from G4VParticleChange.
Definition at line 140 of file G4ParticleChangeForGamma.cc.
References G4Step::AddTotalEnergyDeposit(), G4Step::GetPostStepPoint(), G4VParticleChange::isParentWeightProposed, G4Step::SetStepLength(), G4StepPoint::SetWeight(), G4VParticleChange::theLocalEnergyDeposit, and G4VParticleChange::theParentWeight.
00141 { 00142 pStep->AddTotalEnergyDeposit( theLocalEnergyDeposit ); 00143 pStep->SetStepLength( 0.0 ); 00144 00145 if (isParentWeightProposed ){ 00146 pStep->GetPostStepPoint()->SetWeight( theParentWeight ); 00147 } 00148 00149 return pStep; 00150 }
Reimplemented from G4VParticleChange.
Definition at line 152 of file G4ParticleChangeForGamma.cc.
References G4Step::AddNonIonizingEnergyDeposit(), G4Step::AddTotalEnergyDeposit(), G4Track::CalculateVelocity(), G4Track::GetParticleDefinition(), G4ParticleDefinition::GetPDGMass(), G4Step::GetPostStepPoint(), G4Step::GetTrack(), G4VParticleChange::isParentWeightProposed, G4StepPoint::SetKineticEnergy(), G4StepPoint::SetMomentumDirection(), G4StepPoint::SetPolarization(), G4StepPoint::SetVelocity(), G4StepPoint::SetWeight(), G4VParticleChange::theLocalEnergyDeposit, G4VParticleChange::theNonIonizingEnergyDeposit, and G4VParticleChange::theParentWeight.
00153 { 00154 G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint(); 00155 G4Track* pTrack = pStep->GetTrack(); 00156 00157 pPostStepPoint->SetKineticEnergy( proposedKinEnergy ); 00158 pPostStepPoint->SetMomentumDirection( proposedMomentumDirection ); 00159 pPostStepPoint->SetPolarization( proposedPolarization ); 00160 00161 // update velocity for scattering process and particles with mass 00162 if(proposedKinEnergy > 0.0) { 00163 if(pTrack->GetParticleDefinition()->GetPDGMass() > 0.0) { 00164 pPostStepPoint->SetVelocity(pTrack->CalculateVelocity()); 00165 } 00166 } 00167 00168 if (isParentWeightProposed ){ 00169 pPostStepPoint->SetWeight( theParentWeight ); 00170 } 00171 00172 pStep->AddTotalEnergyDeposit( theLocalEnergyDeposit ); 00173 pStep->AddNonIonizingEnergyDeposit( theNonIonizingEnergyDeposit ); 00174 return pStep; 00175 }