144 G4cout <<
"mean life time: "<< meanlife/ns <<
"[ns]" <<
G4endl;
157 theTotalResult.
Clear();
162 return &theTotalResult;
173 thePro.SetBoundEnergy(KEnergy);
184 thePro.SetGlobalTime(0.0);
191 G4cout <<
"G4MuonicAtomDecay::DecayIt time set to: "<< maDTime/ns <<
"[ns]" <<
G4endl;
210 G4cout <<
"G4MuonicAtomDecay::DecayIt: selected DIO mode" <<
G4endl;
222 if (decaychannel ==
nullptr) {
225 ed <<
"Can not determine decay channel for "
227 <<
" mass of dynamic particle: " << massParent/GeV <<
" (GEV)" <<
G4endl
228 <<
" dacay table has " << decaytable->
entries() <<
" entries" <<
G4endl;
230 if (massParent < 0.) {
232 ed <<
"Using PDG mass ("<<checkedmass/GeV <<
"(GeV)) in IsOKWithParentMass" <<
G4endl;
236 ed << ic <<
": BR " << dc->
GetBR() <<
", IsOK? "
240 for (
G4int id=0;
id<ndaughters;++id) {
241 if (
id>0) ed <<
" + ";
247 return &theTotalResult;
253 G4cout <<
"G4MuonicAtomDecay::DecayIt : selected decay channel addr:"
259 if(products ==
nullptr) {
261 ed <<
"No products are generated for "
264 return &theTotalResult;
279 if (ParentEnergy < ParentMass) {
281 G4cout <<
"G4MuonicAtomDecay::DecayIt : Total Energy is less than its mass" <<
G4endl;
283 G4cout <<
" Energy:" << ParentEnergy/MeV <<
"[MeV]";
284 G4cout <<
" Mass:" << ParentMass/MeV <<
"[MeV]";
289 "Total Energy is less than its mass");
290 ParentEnergy = ParentMass;
301 finalGlobalTime += maDTime;
302 finalLocalTime += maDTime;
306 products->
Boost( ParentEnergy, ParentDirection);
315 G4cout <<
"G4MuonicAtomDecay::DecayIt : Decay vertex :";
316 G4cout <<
" Time: " << finalGlobalTime/ns <<
"[ns]";
321 G4cout <<
"G4MuonicAtomDecay::DecayIt : decay products in Lab. Frame" <<
G4endl;
328 for (index=0; index < numberOfSecondaries; index++)
352 return &theTotalResult ;
364 G4cout <<
"G4MuonicAtomDecay::DecayIt: selected NC mode" <<
G4endl;
379 theMuPro.SetBoundEnergy(KEnergy);
380 theMuPro.SetGlobalTime(0.0);
382 G4int reentryCount = 0;
397 DumpState(aTrack,
"ApplyYourself",ed);
398 ed <<
" ApplyYourself failed" <<
G4endl;
399 G4Exception(
"G4MuonicAtomDecay::DecayIt",
"HAD_MAD_101",
406 if(reentryCount>100) {
412 DumpState(aTrack,
"ApplyYourself",ed);
413 ed <<
" ApplyYourself does not completed after 100 attempts" <<
G4endl;
414 G4Exception(
"G4MuonicAtomDecay::DecayIt",
"HAD_MAD_102",
418 }
while(result ==
nullptr);
422 for(
G4int i=0; i<nsec; ++i) {
428 G4cout <<
"G4MuonicAtomDecay::DecayIt time set to: "
429 << (maDTime + ctime)/ns <<
"[ns]" <<
G4endl;
434 FillResult(result,aTrack);
437 return &theTotalResult;
445 outFile <<
"MuonicAtom process where Muon decays in orbit or is captured by the nucleus." <<
G4endl;
460 if(efinal < 0.0) { efinal = 0.0; }
468 }
else if(0.0 == efinal) {
480 G4double newP = std::sqrt(efinal*(efinal + 2*mass));
483 newP4.rotate(rotation, it);
486 newE = newP4.e() - mass;
490 DumpState(aT,
"Primary has zero energy after interaction",ed);
494 if(newE < 0.0) { newE = 0.0; }
508 for (
G4int i = 0; i < nSec; ++i) {
510 theM.
rotate(rotation, it);
516 if (time < 0.0) { time = 0.0; }
543 DumpState(aT,
"Secondary has zero energy",ed);
546 G4Exception(
"G4MuonicAtomDecay::FillResults",
"HAD_MAD_103",
558void G4MuonicAtomDecay::DumpState(
const G4Track& aTrack,
562 ed <<
"Unrecoverable error in the method " << method <<
" of "
564 ed <<
"TrackID= "<< aTrack.
GetTrackID() <<
" ParentID= "
570 ed <<
"Position(mm)= " << aTrack.
GetPosition()/CLHEP::mm <<
";";
612 if ( rKineticEnergy > HighestValue) {
614 pathlength = ( rKineticEnergy + 1.0)* aCtau;
615 }
else if ( rKineticEnergy <
DBL_MIN ) {
619 G4cout <<
"G4MuonicAtomDecay::GetMeanFreePath() !!particle stops!!";
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
void SetTime(G4double aT)
G4int GetCreatorModelID() const
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, const G4int numberOfLambdas=0)
void AddSecondary(G4Track *aSecondary)
void ProposeLocalTime(G4double t)
void Initialize(const G4Track &) override
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
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
void SetCreatorModelID(const G4int id)
G4int GetParentID() const
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