158 theTotalResult.
Clear();
163 return &theTotalResult;
174 thePro.SetBoundEnergy(KEnergy);
185 thePro.SetGlobalTime(0.0);
192 G4cout <<
"G4MuonicAtomDecay::DecayIt time set to: "<< maDTime/
ns <<
"[ns]" <<
G4endl;
211 G4cout <<
"G4MuonicAtomDecay::DecayIt: selected DIO mode" <<
G4endl;
223 if ( decaychannel ==0) {
226 ed <<
"Can not determine decay channel for "
228 <<
" mass of dynamic particle: " << massParent/GeV <<
" (GEV)" <<
G4endl
229 <<
" dacay table has " << decaytable->
entries() <<
" entries" <<
G4endl;
231 if (massParent < 0.) {
233 ed <<
"Using PDG mass ("<<checkedmass/GeV <<
"(GeV)) in IsOKWithParentMass" <<
G4endl;
237 ed << ic <<
": BR " << dc->
GetBR() <<
", IsOK? "
241 for (
G4int id=0;
id<ndaughters;++id) {
242 if (
id>0) ed <<
" + ";
253 G4cout <<
"G4MuonicAtomDecay::DecayIt : selected decay channel addr:"
261 ed <<
"No products are generated for "
278 if (ParentEnergy < ParentMass) {
280 G4cout <<
"G4MuonicAtomDecay::DecayIt : Total Energy is less than its mass" <<
G4endl;
282 G4cout <<
" Energy:" << ParentEnergy/MeV <<
"[MeV]";
283 G4cout <<
" Mass:" << ParentMass/MeV <<
"[MeV]";
288 "Total Energy is less than its mass");
289 ParentEnergy = ParentMass;
300 finalGlobalTime += maDTime;
301 finalLocalTime += maDTime;
305 products->
Boost( ParentEnergy, ParentDirection);
314 G4cout <<
"G4MuonicAtomDecay::DecayIt : Decay vertex :";
315 G4cout <<
" Time: " << finalGlobalTime/
ns <<
"[ns]";
320 G4cout <<
"G4MuonicAtomDecay::DecayIt : decay products in Lab. Frame" <<
G4endl;
327 for (index=0; index < numberOfSecondaries; index++)
351 return &theTotalResult ;
363 G4cout <<
"G4MuonicAtomDecay::DecayIt: selected NC mode" <<
G4endl;
378 theMuPro.SetBoundEnergy(KEnergy);
379 theMuPro.SetGlobalTime(0.0);
381 G4int reentryCount = 0;
396 DumpState(aTrack,
"ApplyYourself",ed);
397 ed <<
" ApplyYourself failed" <<
G4endl;
398 G4Exception(
"G4MuonicAtomDecay::DecayIt",
"HAD_MAD_101",
405 if(reentryCount>100) {
411 DumpState(aTrack,
"ApplyYourself",ed);
412 ed <<
" ApplyYourself does not completed after 100 attempts" <<
G4endl;
413 G4Exception(
"G4MuonicAtomDecay::DecayIt",
"HAD_MAD_102",
421 for(
G4int i=0; i<nsec; ++i) {
427 G4cout <<
"G4MuonicAtomDecay::DecayIt time set to: "
428 << (maDTime + ctime)/
ns <<
"[ns]" <<
G4endl;
433 FillResult(result,aTrack);
438 return &theTotalResult;
449 outFile <<
"MuonicAtom process where Muon decays in orbit or is captured by the nucleus." <<
G4endl;
464 if(efinal < 0.0) { efinal = 0.0; }
472 }
else if(0.0 == efinal) {
484 G4double newP = std::sqrt(efinal*(efinal + 2*mass));
487 newP4.rotate(rotation, it);
490 newE = newP4.e() - mass;
494 DumpState(aT,
"Primary has zero energy after interaction",ed);
498 if(newE < 0.0) { newE = 0.0; }
512 for (
G4int i = 0; i < nSec; ++i) {
514 theM.
rotate(rotation, it);
520 if (time < 0.0) { time = 0.0; }
547 DumpState(aT,
"Secondary has zero energy",ed);
550 G4Exception(
"G4MuonicAtomDecay::FillResults",
"HAD_MAD_103",
562void G4MuonicAtomDecay::DumpState(
const G4Track& aTrack,
566 ed <<
"Unrecoverable error in the method " << method <<
" of "
568 ed <<
"TrackID= "<< aTrack.
GetTrackID() <<
" ParentID= "
574 ed <<
"Position(mm)= " << aTrack.
GetPosition()/CLHEP::mm <<
";";
616 if ( rKineticEnergy > HighestValue) {
618 pathlength = ( rKineticEnergy + 1.0)* aCtau;
619 }
else if ( rKineticEnergy <
DBL_MIN ) {
623 G4cout <<
"G4MuonicAtomDecay::GetMeanFreePath() !!particle stops!!";
double A(double temperature)
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & rotate(double, const Hep3Vector &)
G4DynamicParticle * PopProducts()
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
G4VDecayChannel * GetDecayChannel(G4int index) const
G4VDecayChannel * SelectADecayChannel(G4double parentMass=-1.)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
G4double GetEnergyChange() const
const G4LorentzRotation & GetTrafoToLab() const
G4HadFinalStateStatus GetStatusChange() const
G4double GetLocalEnergyDeposit() const
const G4ThreeVector & GetMomentumChange() const
std::size_t GetNumberOfSecondaries() const
G4HadSecondary * GetSecondary(size_t i)
G4DynamicParticle * GetParticle()
G4double GetWeight() const
G4int GetCreatorModelType() const
void SetTime(G4double aT)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
const G4String & GetModelName() const
const G4String & GetName() const
static G4MuonMinus * MuonMinus()
virtual G4bool IsApplicable(const G4ParticleDefinition &)
G4int GetVerboseLevel() const
G4MuonicAtomDecay(G4HadronicInteraction *hiptr=nullptr, const G4String &processName="MuonicAtomDecay")
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
virtual void ProcessDescription(std::ostream &outFile) const
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
virtual ~G4MuonicAtomDecay()
static G4double GetKShellEnergy(G4double A)
G4double GetNCLifeTime() const
G4Ions const * GetBaseIon() const
G4double GetDIOLifeTime() const
void SetParameters(const G4double A, const G4double Z)
void AddSecondary(G4Track *aSecondary)
void ProposeLocalTime(G4double t)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
G4ProcessManager * GetProcessManager() const
G4bool GetPDGStable() const
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4int GetAtomicMass() const
G4DecayTable * GetDecayTable() const
G4double GetPDGLifeTime() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4TrackStatus GetTrackStatus() const
const G4ParticleDefinition * GetParticleDefinition() const
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
void SetWeight(G4double aValue)
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
G4double GetLocalTime() const
G4Material * GetMaterial() const
G4ParticleDefinition * GetDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetParentID() const
void SetCreatorModelIndex(G4int idx)
void SetGoodForTrackingFlag(G4bool value=true)
void SetVerboseLevel(G4int value)
G4int GetVerboseLevel() const
G4int GetNumberOfDaughters() const
virtual G4DecayProducts * DecayIt(G4double parentMass=-1.0)=0
virtual G4bool IsOKWithParentMass(G4double parentMass)
const G4String & GetDaughterName(G4int anIndex) const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeWeight(G4double finalWeight)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
const G4String & GetName() const
virtual void ResetNumberOfInteractionLengthLeft()
void ClearNumberOfInteractionLengthLeft()
G4double theNumberOfInteractionLengthLeft
G4bool enablePostStepDoIt
const G4String & GetProcessName() const