Import Geant4 6.2.0 source tree
This commit is contained in:
+141
@@ -0,0 +1,141 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.hh,v 1.2 2004/03/18 08:02:37 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
// Header of G4QCaptureAtRest class (mu-,pi-,K-) of the CHIPS Simulation Branch in GEANT4
|
||||
// -------------------------------------------------------------------------------
|
||||
// This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.
|
||||
// -------------------------------------------------------------------------------
|
||||
// At present (Dec.03) only pi-, K- and antiNucleon capture is implemented, which
|
||||
// are the most crucial for the in matter simulation. The hyperon capture (Sigma-,
|
||||
// Xi-, Omega-, antiSigma+) is implemented, but not tested and it is not clear how
|
||||
// frequently this kind of interaction takes place in the simulation of the hadronic
|
||||
// showers. The antiNeutron Capture At Rest is implemented by this G4QCaptureAtRest
|
||||
// class, but it is not clear how the anti-neutrons are stopped in Geant4 tracking.
|
||||
// It can be stopped only by interactions with electrons, as the annihilation
|
||||
// cross section is huge and any interaction with nucleus results in annihilation.
|
||||
// --> The mu-&tau- Capture At Rest (mu-,nu)&(mu-,nu) are weak processes, which must
|
||||
// be simulated together with the reversed Betha decay (e-,nu). While mu- capture is
|
||||
// similar to the pi- capture from the nuclear fragmentation point of view (the energy
|
||||
// scale is shrinked mecause m_mu<m_pi and a part of energy is lost because of the
|
||||
// neutrino radiation), the time scale of the mu- capture process is not clear,
|
||||
// but it is clear, that it is well delayed. By this reason the mu- capture is not
|
||||
// included in the G4QCaptureAtRest and must be implemented in the "LongLivingDecay"
|
||||
// branch of simulation, which includes excited states of nuclei and short living
|
||||
// isotopes. On the "Fast Simulation" Level all radioactiv isotopes, long living
|
||||
// nuclear excitations, mu-atoms etc, which can be important for the background
|
||||
// signals, must be collected in the continuous database and simulated separately.
|
||||
// --> CHIPS is SU(3) event generator, so it does not include reactions with the
|
||||
// heavy (c,b,t) quarks involved such as tau- or antiDs-, which can be simulated
|
||||
// only by SU(6) QUIPS (QUark Invariant Phase Space) model.-December 2003.M.Kossov.-
|
||||
// -------------------------------------------------------------------------------
|
||||
// All algorithms are similar: the captured particle is absorbed by a nuclear cluster
|
||||
// with the subsequent Quark Exchange nuclear fragmentation. The Anti-Proton (antiSigma+)
|
||||
// Capture algorithm is more complicated: the anti-baryon annihilates with the quasyfree
|
||||
// nucleons on the nuclear periphery. The peripheral interaction results in a number
|
||||
// of mesons. A part of them misses the nucleus and comes directly to the output,
|
||||
// while others create Multy Quasmon Excitation in the nucleus with the subsequent
|
||||
// Quark Excange Fragmentation of the nucleus. At present the two step mechanism of
|
||||
// the antiProton-Nucleus interaction is hardwired in the G4QEnvironment class, but
|
||||
// with time the first step of the interaction can be moved to this G4QCaptureAtRest
|
||||
// class, to make the G4QEnvirement class simpler and better defined. This is
|
||||
// necessary because the G4QEnvironment class is going to loos the previlage of
|
||||
// the CHIPS Head Class (as previously the G4Quasmon class lost it) and G4QCollision
|
||||
// class is going to be the CHIPS Head Class, where a few Nuclear Environments can
|
||||
// exist (e.g. the Nuclear Environment of the Projectile Nucleus and the Nuclear
|
||||
// Environment of the Target Nucleus). By the way the antiProton-H1 interaction At
|
||||
// Rest (CHIPSI) can be still simulated with only the G4Quasmon class, as this
|
||||
// reaction does not have any nuclear environment.- December 2003.Mikhail Kossov.-
|
||||
// --------------------------------------------------------------------------------
|
||||
// ****************************************************************************************
|
||||
// ********* This HEADER is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
|
||||
#ifndef G4QCaptureAtRest_hh
|
||||
#define G4QCaptureAtRest_hh
|
||||
|
||||
// GEANT4 Headers
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VRestProcess.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LorentzVector.hh"
|
||||
|
||||
// CHIPS Headers
|
||||
#include "G4QEnvironment.hh"
|
||||
#include "G4QIsotope.hh"
|
||||
//<vector> is included in G4QIsotope.hh
|
||||
//#include <vector>
|
||||
|
||||
class G4QCaptureAtRest : public G4VRestProcess
|
||||
{
|
||||
private:
|
||||
|
||||
// Hide assignment operator as private
|
||||
G4QCaptureAtRest& operator=(const G4QCaptureAtRest &right);
|
||||
|
||||
// Copy constructor
|
||||
G4QCaptureAtRest(const G4QCaptureAtRest& );
|
||||
|
||||
public:
|
||||
|
||||
// Constructor
|
||||
G4QCaptureAtRest(const G4String& processName ="CHIPSNuclearAbsorptionAtRest");
|
||||
|
||||
// Destructor
|
||||
~G4QCaptureAtRest();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition& particle);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
// zero mean lifetime
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition* );
|
||||
void MuCaptureEMCascade(G4int Z, G4int N, std::vector<G4double>* dV);
|
||||
|
||||
private:
|
||||
|
||||
G4bool RandomizeMuDecayOrCapture(G4int Z, G4int N); // true=MuCapture, false=MuDecay
|
||||
void CalculateEnergyDepositionOfMuCapture(G4int Z); // (2p->1s, MeV) @@ Now N-independent
|
||||
G4bool RandomizeTauDecayOrCapture(G4int Z, G4int N);// true=TauCapture, false=TauDecay
|
||||
void CalculateEnergyDepositionOfTauCapture(G4int Z);// (2p->1s, MeV) @@N-independ,Improve
|
||||
|
||||
private:
|
||||
G4double Time; // Time shift of the capture reaction
|
||||
G4double EnergyDeposition; // Energy deposited in the reaction
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
+6
-10
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QEnvironment.hh,v 1.21.2.1 2004/03/25 10:44:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: G4QEnvironment.hh,v 1.24 2004/06/18 09:19:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ---------------- G4QEnvironment ----------------
|
||||
// by Mikhail Kossov, August 2000.
|
||||
@@ -59,9 +59,6 @@ public:
|
||||
// Static functions
|
||||
static void SetParameters(G4double solAn=0.4,G4bool efFlag=false,G4double piThresh=141.4,
|
||||
G4double mpisq=20000., G4double dinum=1880.);
|
||||
// General purpose functions
|
||||
G4ThreeVector RndmDir(); // Randomize 3D direction (@@subst by libFunc)
|
||||
|
||||
private:
|
||||
G4QHadronVector* FSInteraction(); // Final State Interaction after Hadronization
|
||||
G4QHadronVector HadronizeQEnvironment(); // Main HadronizationFunction used in Fragment
|
||||
@@ -105,14 +102,13 @@ private:
|
||||
G4int theTargetPDG; // PDG of the target nucleus in the interaction
|
||||
};
|
||||
|
||||
//General function makes Random Unit 3D-Vector
|
||||
G4ThreeVector RndmDir();
|
||||
|
||||
// Inline functions
|
||||
inline G4bool G4QEnvironment::operator==(const G4QEnvironment &rhs) const
|
||||
{return this == &rhs;}
|
||||
inline G4bool G4QEnvironment::operator!=(const G4QEnvironment &rhs) const
|
||||
{return this != &rhs;}
|
||||
inline G4QNucleus G4QEnvironment::GetEnvironment() const {return theEnvironment;}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QIsotope.hh,v 1.1 2004/03/17 13:01:39 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
// ---------------- G4QIsotope header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
// Header of the G4QIsotope class of the CHIPS Simulation Branch in GEANT4
|
||||
// ----------------------------------------------------------------------------
|
||||
// It contains information about natural abundances of stable and long living
|
||||
// isotopes and a NEW "Element" can be initialised for any isotope set.
|
||||
// Randomization of isotopes of the Natural Elements is hardwired and fast
|
||||
// Randomization of isotopes of the user defined Elements is a bit slower
|
||||
// CrossSectionWeighted randomisation of isotopes is slow (same for Nat and New)
|
||||
// -------------------------------------------------------------------------------
|
||||
//
|
||||
// 1 2 3 4 5 6 7 8 9
|
||||
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
|
||||
#ifndef G4QIsotope_hh
|
||||
#define G4QIsotope_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Randomize.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4QIsotope
|
||||
{
|
||||
protected:
|
||||
G4QIsotope(); // ***Singletone*** All natural elements are initialized in the Constructor
|
||||
|
||||
public:
|
||||
~G4QIsotope(); // It's public for compilation purposes on Windows, user must not call it!
|
||||
|
||||
// Create newElement with the Abundancy vector (User must delete elements of the vector)
|
||||
// ===================================================================================
|
||||
// Example of initialization of the new Element (not natural abanduncies of isotopes):
|
||||
// ======= ---------------------------------------------------------------------------
|
||||
//std::vector<std::pair<G4int,G4double> >*a= new std::vector<std::pair<G4int,G4double> >;
|
||||
// a->push_back(std::make_pair(n1,abundancy1));
|
||||
// a->push_back(std::make_pair(n2,abundancy2));
|
||||
// a->push_back(std::make_pair(n3,1.-abundancy1-abundancy2));
|
||||
////Sum of abundancies must be 1 otherwise worning appears & if less LastAbu is increased
|
||||
// G4int Z=1;
|
||||
// G4int ind=1;
|
||||
//// ind>0, if =<0 then the InitElement member function returns the first free index !!!
|
||||
//// For ind>0 if theIndex "ind" already exists, returns the first free index !!!
|
||||
// G4QIsotope::Get()->InitElement(Z, ind, a); // G4QIsotope class is a Singletone
|
||||
// std::for_each(a->begin(), a->end(), void operator()(std::pair<G4int,G4double> >* P)
|
||||
// {delete P;});
|
||||
//// OR just use the following, which is faser:
|
||||
//// G4int nA=a->size();
|
||||
//// if(nA) for(G4int i=0; i<nA; i++) {delete a->operator[](i);}
|
||||
//
|
||||
G4int InitElement(G4int Z, G4int index, std::vector<std::pair<G4int,G4double> >* abund);
|
||||
|
||||
// A#ofNeutrons in Element with Z & UseDefIndex. Universal for Nat(index=0) & UserDefElem
|
||||
// ======================================================================================
|
||||
G4int GetNeutrons(G4int Z, G4int index=0);//If theElement doesn't exist, returns negative
|
||||
|
||||
// #ofProtons in stable isotopes with fixed A=Z+N. Returns length and fils VectOfIsotopes
|
||||
// ======================================================================================
|
||||
// Example of printing of isotopes with A=152:
|
||||
// ======= -----------------------------------
|
||||
// G4int A=152; // A can not be more than 269
|
||||
// std::vector<G4int> isV(4); // At present A with nIso>4 are not known
|
||||
// G4int nIso= G4QIsotope::Get()->GetProtons(A, isV); // isV is cleaned up before filling
|
||||
// if(nIso)for(G4int i,i<nIso,i++)G4cout<<"I#"<<i<<"Z="<<isV[i]<<",N="<<A-isV[i]<<G4endl;
|
||||
G4int GetProtons(G4int A, std::vector<G4int>& isoV);
|
||||
|
||||
// Get a pointer to the vector of pairs(N,CrosS), where N is used to calculate CrosS
|
||||
// =================================================================================
|
||||
// Example of initialization of the Cross Section to randomize weighted isotopes:
|
||||
// ======= ----------------------------------------------------------------------
|
||||
// std::vector<std::pair<G4int,G4double>*>* cs= G4QIsotope::Get()->GetCSVector(Z, index);
|
||||
// G4int nIs=cs->size; // A#Of Isotopes in the element
|
||||
// if(nIs) for(G4int i; i<nIs; i++)
|
||||
// {
|
||||
// G4int N=cs->at(i)->first; // A#Of neuterons in the isotope
|
||||
// cs->at(i)->second = CalculateCrossSection(particle,Z,N)// Calc particle+A(Z,N) CrosS
|
||||
// }
|
||||
std::vector<std::pair<G4int,G4double>*>* GetCSVector(G4int Z, G4int index = 0);
|
||||
|
||||
// Get the abundancy vector for calculation of mean cross sections
|
||||
std::vector<std::pair<G4int,G4double>*>* GetAbuVector(G4int Z, G4int index = 0);
|
||||
|
||||
// Get the summed abundancy vector (e.g. for randomization by itself)
|
||||
std::vector<std::pair<G4int,G4double>*>* GetSumAVector(G4int Z, G4int index = 0);
|
||||
|
||||
// Calculates the mean Cross Section for the initialized Element(ind=0 Nat,ind>0 UserDef)
|
||||
G4double GetMeanCrossSection(G4int Z, G4int index = 0); // IsoCS's must init, IfNotRet<0
|
||||
|
||||
// Randomize A#OfNeutrons in the Isotope weighted by theAbubdancies and theCrossSections
|
||||
G4int GetCSNeutrons(G4int Z, G4int index = 0); // IsoCrosSections must init, IfNotRet<0
|
||||
|
||||
static G4QIsotope* Get(); // Get a pointer to the Singletone G4QIsotope
|
||||
|
||||
private:
|
||||
G4int RandomizeNeutrons(G4int Z); // Gives a#of neutrons in the Random Isotope for the Z
|
||||
|
||||
private:
|
||||
// Initialized in the constructor
|
||||
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natElements; //NaturalElem's
|
||||
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natSumAbund; //NatElemSumA's
|
||||
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natIsoCrosS; //CSOfNatElem's
|
||||
// It is initialized by user, but it is cleaned up in the destructor
|
||||
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newElems;
|
||||
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newSumAb;
|
||||
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newIsoCS;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,661 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.cc,v 1.4 2004/05/27 15:51:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
// G4QCaptureAtRest class of the CHIPS Simulation Branch in GEANT4
|
||||
// ---------------------------------------------------------------
|
||||
// ****************************************************************************************
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
|
||||
//#define debug
|
||||
//#define pdebug
|
||||
|
||||
#include "G4QCaptureAtRest.hh"
|
||||
|
||||
G4QCaptureAtRest::G4QCaptureAtRest(const G4String& processName)
|
||||
: G4VRestProcess(processName), Time(0.), EnergyDeposition(0.)
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::Constructor is called"<<G4endl;
|
||||
#endif
|
||||
if (verboseLevel>0)
|
||||
{ G4cout << GetProcessName() << " is created "<< G4endl; }
|
||||
G4QCHIPSWorld::Get()->GetParticles(234); // Create CHIPS World of 234 particles
|
||||
G4QNucleus::SetParameters(0.,0.,1.,1.); // Nuclear clusterization parameters
|
||||
G4Quasmon::SetParameters(180.,.09,.3); // Temperature, s-antis, eta suppress
|
||||
G4QEnvironment::SetParameters(.5); // SolAngle (pbar-A secondary capture)
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
G4QCaptureAtRest::~G4QCaptureAtRest()
|
||||
{}
|
||||
|
||||
G4bool G4QCaptureAtRest::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
if (particle == *( G4PionMinus::PionMinus() )) return true;
|
||||
else if (particle == *( G4KaonMinus::KaonMinus() )) return true;
|
||||
else if (particle == *( G4AntiProton::AntiProton() )) return true;
|
||||
else if (particle == *( G4MuonMinus::MuonMinus() )) return true;
|
||||
else if (particle == *( G4TauMinus::TauMinus() )) return true;
|
||||
else if (particle == *( G4SigmaMinus::SigmaMinus() )) return true;
|
||||
else if (particle == *( G4XiMinus::XiMinus() )) return true;
|
||||
else if (particle == *( G4OmegaMinus::OmegaMinus() )) return true;
|
||||
else if (particle == *( G4Neutron::Neutron() )) return true;
|
||||
else if (particle == *( G4AntiNeutron::AntiNeutron() )) return true;
|
||||
else if (particle == *(G4AntiSigmaPlus::AntiSigmaPlus())) return true;
|
||||
#ifdef debug
|
||||
G4cout<<"***G4QCaptureAtRest::IsApplicable: PDG="<<particle.GetPDGEncoding()<<G4endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4Step& step)
|
||||
{
|
||||
static const G4double mNeut= G4QPDGCode(2112).GetMass();
|
||||
static const G4double mProt= G4QPDGCode(2212).GetMass();
|
||||
static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
//static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
//static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
//static const G4double mTau = G4QPDGCode(15).GetMass();
|
||||
static const G4double mEl = G4QPDGCode(11).GetMass();
|
||||
const G4DynamicParticle* stoppedHadron = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particle=stoppedHadron->GetDefinition();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt is called"<<G4endl;
|
||||
#endif
|
||||
if (! IsApplicable(*particle)) // Check applicability
|
||||
{
|
||||
G4cerr<<"G4QCaptureAtRest::AtRestDoIt: Only mu-,pi-,K-,S-,X-,O-,aP,aN,aS+."<< G4endl;
|
||||
return 0;
|
||||
}
|
||||
const G4Material* material = track.GetMaterial(); // Get the current material
|
||||
G4int Z=0;
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
G4int i=0;
|
||||
G4double sum=0.;
|
||||
G4int nE=material->GetNumberOfElements();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: "<<nE<<" elements in the material."<<G4endl;
|
||||
#endif
|
||||
G4int projPDG=0; // PDG Code prototype for the captured hadron
|
||||
if (particle == G4MuonMinus::MuonMinus() ) projPDG= 13;
|
||||
else if (particle == G4TauMinus::TauMinus() ) projPDG= 15; // @@AtomicRad?
|
||||
else if (particle == G4PionMinus::PionMinus() ) projPDG= -211; // @@AtomicRad?
|
||||
else if (particle == G4KaonMinus::KaonMinus() ) projPDG= -321;
|
||||
else if (particle == G4AntiProton::AntiProton() ) projPDG=-2212;
|
||||
else if (particle == G4SigmaMinus::SigmaMinus() ) projPDG= 3112;
|
||||
else if (particle == G4XiMinus::XiMinus() ) projPDG= 3312;
|
||||
else if (particle == G4OmegaMinus::OmegaMinus() ) projPDG= 3334;
|
||||
else if (particle == G4Neutron::Neutron() ) projPDG= 2112;
|
||||
else if (particle == G4AntiNeutron::AntiNeutron() ) projPDG=-2112;
|
||||
else if (particle == G4AntiSigmaPlus::AntiSigmaPlus()) projPDG=-3222;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: projPDG="<<projPDG<<G4endl;
|
||||
#endif
|
||||
if(!projPDG)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: Undefined captured hadron"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
std::vector<G4double> sumfra;
|
||||
for(i=0; i<nE; ++i)
|
||||
{
|
||||
G4double frac=material->GetFractionVector()[i];
|
||||
G4int cZ=static_cast<G4int>((*theElementVector)[i]->GetZ());
|
||||
if(projPDG==13||projPDG==15)
|
||||
{
|
||||
frac*=cZ;
|
||||
if(cZ==9||cZ==35||cZ==53||cZ==85) frac*=.66;
|
||||
else if (cZ== 3) frac*=.50;
|
||||
else if (cZ==24||cZ==28) frac*=.90;
|
||||
else if (cZ== 5||cZ==17) frac*=.70;
|
||||
else if (cZ== 8) frac*=.56;
|
||||
}
|
||||
sum+=frac;
|
||||
sumfra.push_back(sum); // remember the summation steps
|
||||
}
|
||||
G4double rnd = sum*G4UniformRand();
|
||||
for(i=0; i<nE; ++i)
|
||||
{
|
||||
G4int cZ=static_cast<G4int>((*theElementVector)[i]->GetZ());
|
||||
sum=sumfra[i];
|
||||
if (rnd<sum)
|
||||
{
|
||||
Z = cZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(Z<=0)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:Element with Z="<<Z<< G4endl;
|
||||
if(Z<0) return 0;
|
||||
}
|
||||
G4int N = G4QIsotope::Get()->GetNeutrons(Z);
|
||||
if(Z+N>20) G4QNucleus::SetParameters(.18,.06,6.,1.); // HeavyNuclei NuclearClusterization
|
||||
else G4QNucleus::SetParameters(0.0,0.0,1.,1.); // LightNuclei NuclearClusterization
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: N="<<N<<" for element with Z="<<Z<<G4endl;
|
||||
#endif
|
||||
if(N<0)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:Element with N="<<N<< G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4bool lepChan=true;
|
||||
if(projPDG==13)
|
||||
{
|
||||
CalculateEnergyDepositionOfMuCapture(Z);// Fills the "EnergyDeposition" value
|
||||
lepChan=RandomizeMuDecayOrCapture(Z, N);// Fills the "Time" value
|
||||
}
|
||||
else if(projPDG==15)
|
||||
{
|
||||
CalculateEnergyDepositionOfTauCapture(Z);// Fills the "EnergyDeposition" value
|
||||
lepChan=RandomizeTauDecayOrCapture(Z,N);// Fills the "Time" value
|
||||
}
|
||||
G4double mp=G4QPDGCode(projPDG).GetMass(); // Mass of the captured hadron
|
||||
G4int targPDG=90000000+Z*1000+N; // PDG Code of the target nucleus
|
||||
G4QHadronVector* output=new G4QHadronVector; // Prototype of the output G4QHadronVector
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;
|
||||
#endif
|
||||
G4int nuPDG=14; // Prototype for weak decay
|
||||
if(projPDG==15) nuPDG=16;
|
||||
if(projPDG==-211 && targPDG==90001000) // Use Panofsky ratio for (p+pi-) system decay
|
||||
{ // (p+pi-=>n+pi0)/p+pi-=>n+gamma) = 3/2
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Panofsky targPDG="<<targPDG<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mProt);// 4-momentum of the compound system
|
||||
G4int pigamPDG=111; // Prototype is for pi0
|
||||
G4double pigamM=mPi0;
|
||||
if(G4UniformRand()>0.6)
|
||||
{
|
||||
pigamPDG=22;
|
||||
pigamM=0.;
|
||||
}
|
||||
G4LorentzVector g4Mom(0.,0.,0.,pigamM); // mass of the photon/Pi0
|
||||
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the secondary neutron
|
||||
if(!G4QHadron(totLV).DecayIn2(g4Mom,n4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H1+(pi-)=>n+"<<pigamPDG<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* pigamma = new G4QHadron(pigamPDG,g4Mom); // Creation Hadron for Pi0/Gamma
|
||||
output->push_back(pigamma); // Fill pi0 or Gamma in the output
|
||||
G4QHadron* neutron = new G4QHadron(2112,n4Mom); // Create Hadron for the Neutron
|
||||
output->push_back(neutron); // Fill the neutron to the output
|
||||
}
|
||||
// @@ For pi-,d reactions one can use just nn dedcay (see above) ?
|
||||
// @@ For K- Capture the quasifree n+Lambda+(A-n-p) reaction can be applyed as well...
|
||||
else if(projPDG==-211 && G4UniformRand()>1.&& Z>0&&N>0) // @@Quasi-Free PiCapture => tune
|
||||
{
|
||||
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mt); // 4-momentum of the (A+pi-) compound system
|
||||
if(Z==1 && N==1) // Quasi-Free process on Deutron
|
||||
{
|
||||
G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
|
||||
if(!G4QHadron(totLV).DecayIn2(f4Mom,s4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H2+(pi-)=>n+n"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* neutr1 = new G4QHadron(2112,f4Mom); // Create Hadron for the 1st Neutron
|
||||
output->push_back(neutr1); // Fill pi0 or Gamma in the output
|
||||
G4QHadron* neutr2 = new G4QHadron(2112,s4Mom); // Create Hadron for the 2nd Neutron
|
||||
output->push_back(neutr2); // Fill the neutron to the output
|
||||
}
|
||||
else
|
||||
{
|
||||
G4int rPDG=targPDG-1001;
|
||||
G4double mr=G4QPDGCode(rPDG).GetMass();// Mass of the residual Nucleus
|
||||
G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
|
||||
G4LorentzVector r4Mom(0.,0.,0.,mr); // Residual nucleus
|
||||
if(!G4QHadron(totLV).DecayIn3(f4Mom,s4Mom,r4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: A+(pi-)=>n+n+(A-n-p)"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* neutr1 = new G4QHadron(2112,f4Mom); // Create Hadron for the 1st Neutron
|
||||
output->push_back(neutr1); // Fill the first neutron in the output
|
||||
G4QHadron* neutr2 = new G4QHadron(2112,s4Mom); // Create Hadron for the 2nd Neutron
|
||||
output->push_back(neutr2); // Fill the second neutron to the output
|
||||
G4QHadron* resnuc = new G4QHadron(rPDG,r4Mom); // Create Hadron for the ResidualNucl
|
||||
output->push_back(resnuc); // Fill the Residual Nucleus to the output
|
||||
}
|
||||
}
|
||||
else if((projPDG==13||projPDG==15) && !lepChan)//Normal BoundLepton->e+nu+anti_nu_e decay
|
||||
{
|
||||
G4LorentzVector totLV(0.,0.,0.,mp-EnergyDeposition);// 4-momentum of the bounded muon
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
// @@ Should be developed for tau-lepton
|
||||
G4LorentzVector e4Mom(0.,0.,0.,mEl); // mass of the electron
|
||||
G4LorentzVector n4Mom(0.,0.,0.,0.); // muon neutrino
|
||||
G4LorentzVector a4Mom(0.,0.,0.,0.); // electron anti-nutrino
|
||||
if(!G4QHadron(totLV).DecayIn3(e4Mom,n4Mom,a4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: Mu_b=>E+Nu_mu+anti_Nu_e"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Decay is successful"<<G4endl;
|
||||
#endif
|
||||
G4QHadron* elect = new G4QHadron(11,e4Mom); // Creation Hadron for the Electron
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron 4M="<<e4Mom<<e4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(elect); // Fill the Electron in the output
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron is filled nu4M="<<n4Mom<<nuPDG<<G4endl;
|
||||
#endif
|
||||
G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for the LeptonicNeutrino
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(numu); // Fill the Muonic Neutrino to the output
|
||||
G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(anue); // Fill the AntiE Neutrino to the output
|
||||
}
|
||||
else if((projPDG==13||projPDG==15)&&lepChan&&targPDG==90001000)// LeptonCapture on Proton
|
||||
{
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mProt-EnergyDeposition);// 4-mom of theCompoundSystem
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino
|
||||
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the secondary neutron
|
||||
if(!G4QHadron(totLV).DecayIn2(g4Mom,n4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H1+(mu-)=>n+nu_mu"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* neutrino = new G4QHadron(nuPDG,g4Mom); // Creation Hadron for neutrino
|
||||
output->push_back(neutrino); // Fill pi0 or Gamma in the output
|
||||
G4QHadron* neutron = new G4QHadron(2112,n4Mom); // Create Hadron for the Neutron
|
||||
output->push_back(neutron); // Fill the neutron to the output
|
||||
}
|
||||
else if((projPDG==13||projPDG==15)&&lepChan&&targPDG==90001001)//LeptonCapture on Deutron
|
||||
{
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mDeut-EnergyDeposition);// 4-mom of theCompoundSystem
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino
|
||||
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the first neutron
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // mass of the second neutron
|
||||
if(!G4QHadron(totLV).DecayIn3(g4Mom,n4Mom,s4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: D+(mu-)=>n+n+nu_mu"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* neutrino = new G4QHadron(nuPDG,g4Mom); // Creation Hadron for the Neutrino
|
||||
output->push_back(neutrino); // Fill pi0 or Gamma in the output
|
||||
G4QHadron* neut1 = new G4QHadron(2112,n4Mom); // Create Hadron for the FirstNeutron
|
||||
output->push_back(neut1); // Fill the neutron to the output
|
||||
G4QHadron* neut2 = new G4QHadron(2112,s4Mom); // Create Hadron for the SecondNeutron
|
||||
output->push_back(neut2); // Fill the neutron to the output
|
||||
}
|
||||
else if((projPDG==13||projPDG==15)&&lepChan&&G4UniformRand()>1&&Z>0&&N>0)//@@QuasiFreeCap
|
||||
{
|
||||
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mt-EnergyDeposition);// 4-mom of the(A+mu-) compound
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
G4int rPDG=targPDG-1000; // Subtract one proton from the nucleus
|
||||
G4double mr=G4QPDGCode(rPDG).GetMass(); // Mass of the residual Nucleus
|
||||
G4LorentzVector f4Mom(0.,0.,0.,0.); // Muon neutrino
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
|
||||
G4LorentzVector r4Mom(0.,0.,0.,mr); // Residual nucleus
|
||||
if(!G4QHadron(totLV).DecayIn3(f4Mom,s4Mom,r4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: A+(mu-)=>nu_mu+n+(A-p)"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* neutrino = new G4QHadron(nuPDG,f4Mom); // Create Hadron for the 1st Neutron
|
||||
output->push_back(neutrino); // Fill nutrino_mu in the output
|
||||
G4QHadron* neutron = new G4QHadron(2112,s4Mom);// Create Hadron for the 2nd Neutron
|
||||
output->push_back(neutron); // Fill the neutron to the output
|
||||
G4QHadron* resnuc = new G4QHadron(rPDG,r4Mom); // Create Hadron for the ResidualNucl
|
||||
output->push_back(resnuc); // Fill the Residual Nucleus to the output
|
||||
}
|
||||
else
|
||||
{
|
||||
if(projPDG==13||projPDG==15) mp-=EnergyDeposition;//TheEnergyDeposit is only for LepCap
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS decay muMB="<<mp<<G4endl;
|
||||
#endif
|
||||
G4QHadron* pH = new G4QHadron(projPDG,G4LorentzVector(0.,0.,0.,mp)); // --DELETED----+
|
||||
G4QHadronVector projHV; // |
|
||||
projHV.push_back(pH); // DESTROYED over 1 line --+ |
|
||||
G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED ---------+ | |
|
||||
std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // ----------------+-+-+
|
||||
projHV.clear(); // --------------------------------------------------------------+-+
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: pPDG="<<projPDG<<", m="<<mp<<G4endl; // |
|
||||
#endif
|
||||
try // |
|
||||
{ // |
|
||||
delete output; // |
|
||||
output = pan->Fragment();// DESTROYED in the end of the LOOP work space |
|
||||
} // |
|
||||
catch (G4QException& error)// |
|
||||
{ // |
|
||||
//#ifdef pdebug
|
||||
G4cerr<<"***G4QCaptureAtRest::AtRestDoIt: Exception is catched"<<G4endl; // |
|
||||
//#endif
|
||||
G4Exception("G4QCaptureAtRest::AtRestDoIt:","27",FatalException,"Gen.CHIPS Except.");
|
||||
} // |
|
||||
delete pan; // Delete the Nuclear Environment ------+
|
||||
}
|
||||
aParticleChange.Initialize(track);
|
||||
G4double localtime = track.GetGlobalTime();
|
||||
G4ThreeVector position = track.GetPosition();
|
||||
// In future it can be a flag, now for tau it is energy deposition , for mu - EMCascade
|
||||
G4int tNH = output->size(); // A#of hadrons in the output
|
||||
if(projPDG==13)
|
||||
{
|
||||
std::vector<G4double>* cascE = new std::vector<G4double>;
|
||||
MuCaptureEMCascade(Z, N, cascE);
|
||||
G4int nsec=cascE->size();
|
||||
aParticleChange.SetNumberOfSecondaries(nsec+tNH);
|
||||
G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange
|
||||
for(G4int is=0; is<nsec; is++)
|
||||
{
|
||||
|
||||
G4double ener=cascE->operator[](is);
|
||||
if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener);
|
||||
else theSec = new G4DynamicParticle(G4Gamma::Gamma(),RndmDir(),-ener);
|
||||
G4Track* aNewTrack = new G4Track(theSec, localtime, position );
|
||||
aParticleChange.AddSecondary( aNewTrack );
|
||||
}
|
||||
cascE->clear();
|
||||
delete cascE;
|
||||
}
|
||||
else aParticleChange.SetNumberOfSecondaries(tNH);
|
||||
// Now add nuclear fragments
|
||||
localtime += Time;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: "<<tNH<<" particles are generated"<<G4endl;
|
||||
#endif
|
||||
// Deal with ParticleChange final state interface to GEANT4 output of the process
|
||||
for(i=0; i<tNH; i++)
|
||||
{
|
||||
// Note that one still has to take care of Hypernuclei (with Lambda or Sigma inside)
|
||||
// Hypernucleus mass calculation and ion-table interface upgrade => work for Hisaya @@
|
||||
// The decau process for hypernuclei must be developed in GEANT4 (change CHIPS body)
|
||||
G4QHadron* hadr=output->operator[](i); // Pointer to the output hadron
|
||||
if(hadr->GetNFragments()) // Intermediate hadron
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl;
|
||||
#endif
|
||||
delete hadr;
|
||||
continue;
|
||||
}
|
||||
G4DynamicParticle* theSec = new G4DynamicParticle;
|
||||
G4int PDGCode = hadr->GetPDGCode();
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<",PDG="<<PDGCode<<G4endl;
|
||||
#endif
|
||||
G4ParticleDefinition * theDefinition;
|
||||
if (PDGCode==90000001) theDefinition = G4Neutron::Neutron();
|
||||
else if(PDGCode==91000000) theDefinition = G4Lambda::Lambda();
|
||||
else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
|
||||
else if(PDGCode==90999001) theDefinition = G4SigmaMinus::SigmaMinus();
|
||||
else if(PDGCode==91999000) theDefinition = G4XiMinus::XiMinus();
|
||||
else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
|
||||
else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
|
||||
else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
|
||||
{
|
||||
G4int aZ = hadr->GetCharge();
|
||||
G4int aA = hadr->GetBaryonNumber();
|
||||
theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
|
||||
}
|
||||
else theDefinition = G4ParticleTable::GetParticleTable()->FindParticle(PDGCode);
|
||||
if(!theDefinition)
|
||||
{
|
||||
G4cout<<"---Worning---G4QCaptureAtRest::AtRestDoIt: drop PDG="<<PDGCode<<G4endl;
|
||||
delete hadr;
|
||||
continue;
|
||||
}
|
||||
theSec->SetDefinition(theDefinition);
|
||||
G4LorentzVector h4M=hadr->Get4Momentum();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<",PDG="<<PDGCode<<",4M="<<h4M<<G4endl;
|
||||
#endif
|
||||
theSec->Set4Momentum(h4M);
|
||||
delete hadr;
|
||||
#ifdef debug
|
||||
G4ThreeVector curD=theSec->GetMomentumDirection();
|
||||
G4double curM=theSec->GetMass();
|
||||
G4double curE=theSec->GetKineticEnergy()+curM;
|
||||
G4cout<<"G4QCapAtRest::AtRDoIt:p="<<curD<<curD.mag()<<",e="<<curE<<",m="<<curM<<G4endl;
|
||||
#endif
|
||||
G4Track* aNewTrack = new G4Track(theSec, localtime, position );
|
||||
aParticleChange.AddSecondary( aNewTrack );
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<" is done."<<G4endl;
|
||||
#endif
|
||||
}
|
||||
delete output;
|
||||
if(projPDG==13) aParticleChange.SetLocalEnergyDeposit(0.); // Fill EnDepMuon(EMCascade)
|
||||
else aParticleChange.SetLocalEnergyDeposit(EnergyDeposition);// Fill EnergyDepos for Tau
|
||||
aParticleChange.SetStatusChange(fStopAndKill); // Kill the absorbed particle
|
||||
//return &aParticleChange; // This is not enough (ClearILL)
|
||||
return G4VRestProcess::AtRestDoIt(track, step);
|
||||
}
|
||||
|
||||
// The MeanLifeTime (before NucCapture) exists only for MuonCapture, which is a WeakProcess
|
||||
G4double G4QCaptureAtRest::GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* stoppedHadron = aTrack.GetDynamicParticle();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::GetMeanLifeTime is called"<<G4endl;
|
||||
#endif
|
||||
if (*(stoppedHadron->GetDefinition())==*(G4MuonMinus::MuonMinus()) ||
|
||||
*(stoppedHadron->GetDefinition())==*(G4TauMinus::TauMinus()) ) return Time;
|
||||
else return 0.;
|
||||
}
|
||||
|
||||
// Muon can decay or to be captured by the nucleus (Z,N): true=MuCapture, false=MuDecay
|
||||
G4bool G4QCaptureAtRest::RandomizeMuDecayOrCapture(G4int Z, G4int N)
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture is called"<<G4endl;
|
||||
#endif
|
||||
G4double Z27 =0.002727*Z;
|
||||
G4double Z227=Z27*Z27;
|
||||
G4double Z427=Z227*Z227;
|
||||
G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*sqrt((G4double)Z)); // Eff. Nuclear Charge
|
||||
G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus
|
||||
G4double pD=.00045516*(1.-Ze2*.00014658);// 1./MeanLifeTime of muon in atoms (in ns^-1)
|
||||
G4double pC=.00001637*Ze2*Ze2/(33.563+N);// 1./MeanLifeTime of muon NuclCapture(in ns^-1)
|
||||
if(Z==1&&N==0) pC=.0000007;
|
||||
if(Z==1&&N==1) pC=.000000012;
|
||||
G4double DLifeT=-log(G4UniformRand())/pD; // Time of the muon decay inside the atom
|
||||
G4double CLifeT=-log(G4UniformRand())/pC; // Time of the muon capture by nucleus
|
||||
if(DLifeT<CLifeT)
|
||||
{
|
||||
Time=DLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Time=CLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate the TotalEnergyDeposition for the AtomicCascadeDecay of MuMesoAtom to K-shell
|
||||
void G4QCaptureAtRest::CalculateEnergyDepositionOfMuCapture(G4int Z) // (2p->1s) in MeV
|
||||
{
|
||||
EnergyDeposition = .0029035*Z*Z*(1.-.0056817*Z)-.0006343; // MeV
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::CalculateEnergyDepositionOfMuCapture="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Calculate gamma cascade from high (14th level) to the K(1s)-shell (follows V.Ivanchenko)
|
||||
void G4QCaptureAtRest::MuCaptureEMCascade(G4int Z, G4int N, std::vector<G4double>* dV)
|
||||
{
|
||||
static const G4double mEl = G4Electron::Electron()->GetPDGMass(); // GEANT4 style
|
||||
static const G4double mMu = G4MuonMinus::MuonMinus()->GetPDGMass();
|
||||
//static const G4double mEl = G4QPDGCode(11).GetMass(); // CHIPS style
|
||||
//static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
static const G4double vEl = .0000136/mEl;
|
||||
//static const G4double dElM = mEl+mEl;
|
||||
// Inicialization - cascade start from 14th level (N.C.Mukhopadhyay Phy.Rep. 30 (1977) 1)
|
||||
G4double EnergyLevel[14];
|
||||
G4double dZ=Z;
|
||||
G4double nucM=G4NucleiProperties::GetNuclearMass(dZ+N,dZ);
|
||||
if(nucM<900.) nucM=G4QPDGCode(2112).GetNuclMass(Z,N,0); // CHIPS style
|
||||
|
||||
G4double mass = mMu*nucM/(mMu+nucM); //equivalemtMassOfMuon in C.M. muA-system
|
||||
|
||||
G4double Z2=Z*Z;
|
||||
G4double KEnergy = vEl*Z2*mass; // Finaite nuclear size (?)
|
||||
|
||||
EnergyLevel[0] = EnergyDeposition;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCapAtR::MuCapEMCascade:E="<<EnergyDeposition<<",e="<<mEl<<",m="<<mMu<<G4endl;
|
||||
#endif
|
||||
for(G4int i=2; i<15; i++) EnergyLevel[i-1]=KEnergy/i/i; // To simple to be right (? M.K.)
|
||||
|
||||
G4int nAuger = 1;
|
||||
G4int nGamma = 0;
|
||||
G4int nLevel = 13;
|
||||
G4double DeltaE=0.;
|
||||
G4double pGamma = Z2*Z2;
|
||||
|
||||
// Capture on 14-th level
|
||||
G4double energy=EnergyLevel[13];
|
||||
//G4double ptot = sqrt(energy*(energy + dElM));
|
||||
//G4ThreeVector moment = ptot * RndmDir();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: first electron E="<<energy<<G4endl;
|
||||
#endif
|
||||
dV->push_back(energy);
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade:before while nl="<<nLevel<<G4endl;
|
||||
#endif
|
||||
// Algorithm of Vladimir Ivanchenko
|
||||
while(nLevel>0) // Radiative transitions and Auger electron emission
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: in while nLevel="<<nLevel<<G4endl;
|
||||
#endif
|
||||
// case of Auger electrons
|
||||
if((nAuger < Z) && ((pGamma + 10000.0) * G4UniformRand() < 10000.0) ) // 10000 (? M.K.)
|
||||
{
|
||||
nAuger++; // Radiate one more Auger electron
|
||||
DeltaE = EnergyLevel[nLevel-1] - EnergyLevel[nLevel];
|
||||
nLevel--;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl;
|
||||
#endif
|
||||
dV->push_back(DeltaE);
|
||||
}
|
||||
else // Rad transitions from C.S.Wu and L.Wilets, Ann. Rev. Nuclear Sci. 19 (1969) 527.
|
||||
{
|
||||
G4int iLevel = nLevel - 1 ;
|
||||
G4double var = 10.0 + iLevel * G4UniformRand(); // 10.0 (? M.K.)
|
||||
if(var > 10.0) iLevel -= G4int(var-10.0) + 1;
|
||||
if( iLevel < 0 ) iLevel = 0;
|
||||
DeltaE = EnergyLevel[iLevel] - EnergyLevel[nLevel];
|
||||
nLevel = iLevel;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl;
|
||||
#endif
|
||||
dV->push_back(-DeltaE);
|
||||
nGamma++;
|
||||
}
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: nElect="<<nAuger<<", nGamm="<<nGamma<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Muon can decay or to be captured by the nucleus (Z,N): true=TauCapture, false=TauDecay
|
||||
G4bool G4QCaptureAtRest::RandomizeTauDecayOrCapture(G4int Z, G4int N)
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture is called"<<G4endl;
|
||||
#endif
|
||||
G4double Z27 =0.002727*Z;
|
||||
G4double Z227=Z27*Z27;
|
||||
G4double Z427=Z227*Z227;
|
||||
G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*sqrt((G4double)Z)); // Eff. Nuclear Charge
|
||||
G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus
|
||||
G4double pD=3436.*(1.-Ze2*.00014658); //@@ 1./MeanLifeTime of Tau in atoms (in ns^-1)
|
||||
G4double pC=227.*Ze2*Ze2/(33.563+N); //@@1./MeanLifeTime of TauNuclCapture(in ns^-1)
|
||||
if(Z==1&&N==0) pC=10.; // @@
|
||||
if(Z==1&&N==1) pC=.2; // @@
|
||||
G4double DLifeT=-log(G4UniformRand())/pD; // Time of the muon decay inside the atom
|
||||
G4double CLifeT=-log(G4UniformRand())/pC; // Time of the muon capture by nucleus
|
||||
if(DLifeT<CLifeT)
|
||||
{
|
||||
Time=DLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeTauDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Time=CLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeTauDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate the TotalEnergyDeposition for the AtomicCascadeDecay of TauMesoAtom to K-shell
|
||||
void G4QCaptureAtRest::CalculateEnergyDepositionOfTauCapture(G4int Z) // (2p->1s) in MeV
|
||||
{
|
||||
EnergyDeposition = .05*Z*Z*(1.-.0056817*Z)-.01; // MeV (@@ Must be improved)
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCapAtRest::CalculateEnergyDepositionOfTauCapture="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
}
|
||||
+1456
-1272
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user