57G4int G4QDiffraction::nPartCWorld=85;
58std::vector<G4int> G4QDiffraction::ElementZ;
59std::vector<G4double> G4QDiffraction::ElProbInMat;
60std::vector<std::vector<G4int>*> G4QDiffraction::ElIsoN;
61std::vector<std::vector<G4double>*>G4QDiffraction::IsoProbInEl;
70 G4cout<<
"G4QDiffraction::Constructor is called processName="<<processName<<
G4endl;
93 G4cout<<
"-Warning-G4QDiffraction::GetMeanFreePath for notImplemented Particle"<<
G4endl;
98 G4cout<<
"G4QDiffraction::GetMeanFreePath:Prpj, kinE="<<KinEn<<
", Mom="<<Momentum<<
G4endl;
105 G4cout<<
"G4QDiffraction::GetMeanFreePath:"<<nE<<
" Elems in Material="<<*material<<
G4endl;
111 else G4cout<<
"G4QDiffraction::GetMeanFreePath: only nA & pA are implemented"<<
G4endl;
115 G4int IPIE=IsoProbInEl.size();
116 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
118 std::vector<G4double>* SPI=IsoProbInEl[ip];
121 std::vector<G4int>* IsN=ElIsoN[ip];
129 for(
G4int i=0; i<nE; ++i)
131 G4Element* pElement=(*theElementVector)[i];
133 ElementZ.push_back(Z);
137 if(isoVector) isoSize=isoVector->size();
139 G4cout<<
"G4QDiffraction::GetMeanFreePath: isovector Length="<<isoSize<<
G4endl;
149 std::vector<std::pair<G4int,G4double>*>* newAbund =
150 new std::vector<std::pair<G4int,G4double>*>;
152 for(
G4int j=0; j<isoSize; j++)
158 std::pair<G4int,G4double>* pr=
new std::pair<G4int,G4double>(N,abund);
160 G4cout<<
"G4QDiffract::GetMeanFreePath:pair#"<<j<<
",N="<<N<<
",ab="<<abund<<
G4endl;
162 newAbund->push_back(pr);
165 G4cout<<
"G4QDiffract::GetMeanFreePath:pairVectorLength="<<newAbund->size()<<
G4endl;
168 for(
G4int k=0; k<isoSize; k++)
delete (*newAbund)[k];
172 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->
GetCSVector(Z,indEl);
173 std::vector<G4double>* SPI =
new std::vector<G4double>;
174 IsoProbInEl.push_back(SPI);
175 std::vector<G4int>* IsN =
new std::vector<G4int>;
176 ElIsoN.push_back(IsN);
177 G4int nIs=cs->size();
179 G4cout<<
"G4QDiffract::GetMFP:=***=>,#isot="<<nIs<<
", Z="<<Z<<
", indEl="<<indEl<<
G4endl;
182 if(nIs)
for(
G4int j=0; j<nIs; j++)
184 std::pair<G4int,G4double>* curIs=(*cs)[j];
185 G4int N=curIs->first;
188 G4cout<<
"G4Q::GMFP:j="<<j<<
",P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",PD="<<pPDG<<
G4endl;
190 G4double CSI=CalculateXS(Momentum, Z, N, pPDG);
193 G4cout<<
"G4QDiffraction::GetMeanFreePath: jI="<<j<<
", Zt="<<Z<<
", Nt="<<N<<
", Mom="
194 <<Momentu<<
", XSec="<<CSI/millibarn<<
G4endl;
198 SPI->push_back(susi);
205 ElProbInMat.push_back(sigma);
209 G4cout<<
"G4QDiffraction::GetMeanFreePath: MeanFreePath="<<1./sigma<<
G4endl;
211 if(sigma > 0.)
return 1./sigma;
257 static G4bool CWinit =
true;
268 G4cout<<
"G4QDiffraction::PostStepDoIt: Before the GetMeanFreePath is called In4M="
275 G4cout<<
"G4QDiffraction::PostStepDoIt: After GetMeanFreePath is called"<<
G4endl;
280 if(std::fabs(Momentum-momentum)>.000001)
281 G4cerr<<
"-Warning-G4QDiffraction::PostStepDoIt:P_IU="<<Momentum<<
"#"<<momentum<<
G4endl;
283 G4cout<<
"G4QDiffraction::PostStepDoIt: pP(IU)="<<Momentum<<
"="<<momentum
284 <<
",proj4M="<<proj4M<<
", projM="<<proj4M.
m()<<
G4endl;
288 G4cerr<<
"G4QDiffraction::PostStepDoIt: Only NA is implemented."<<
G4endl;
296 G4cout<<
"G4QDiffraction::PostStepDoIt: "<<nE<<
" elements in the material."<<
G4endl;
332 G4cout<<
"G4QDiffraction::PostStepDoIt: projPDG="<<projPDG<<
", stPDG="<<prPDG<<
G4endl;
336 G4cerr<<
"-Warning-G4QDiffraction::PostStepDoIt:UndefProjHadron(PDG=0) ->ret 0"<<
G4endl;
342 if(projPDG==2112) pM=mProt;
344 G4int EPIM=ElProbInMat.size();
346 G4cout<<
"G4QDiffra::PostStDoIt: m="<<EPIM<<
",n="<<nE<<
",T="<<ElProbInMat[EPIM-1]<<
G4endl;
355 G4cout<<
"G4QDiffra::PostStepDoIt: EPM["<<i<<
"]="<<ElProbInMat[i]<<
",r="<<rnd<<
G4endl;
357 if (rnd<ElProbInMat[i])
break;
361 G4Element* pElement=(*theElementVector)[i];
364 G4cout<<
"G4QDiffraction::PostStepDoIt: i="<<i<<
", Z(element)="<<Z<<
G4endl;
368 G4cerr<<
"-Warning-G4QDiffraction::PostStepDoIt: Element with Z="<<Z<<
G4endl;
371 std::vector<G4double>* SPI = IsoProbInEl[i];
372 std::vector<G4int>* IsN = ElIsoN[i];
373 G4int nofIsot=SPI->size();
375 G4cout<<
"G4QDiffraction::PostStepDoIt: nI="<<nofIsot<<
", T="<<(*SPI)[nofIsot-1]<<
G4endl;
381 for(j=0; j<nofIsot; ++j)
384 G4cout<<
"G4QDiffraction::PostStepDoIt: SP["<<j<<
"]="<<(*SPI)[j]<<
",r="<<rndI<<
G4endl;
386 if(rndI < (*SPI)[j])
break;
388 if(j>=nofIsot) j=nofIsot-1;
390 G4int N =(*IsN)[j]; ;
392 G4cout<<
"G4QDiffraction::PostStepDoIt: j="<<i<<
", N(isotope)="<<N<<
", MeV="<<MeV<<
G4endl;
396 G4cerr<<
"-Warning-G4QDiffraction::PostStepDoIt: Isotope Z="<<Z<<
" has 0>N="<<N<<
G4endl;
401 G4cout<<
"G4QDiffraction::PostStepDoIt: N="<<N<<
" for element with Z="<<Z<<
G4endl;
405 G4cerr<<
"*Warning*G4QDiffraction::PostStepDoIt:Element with N="<<N<<
G4endl;
410 G4cout<<
"G4QDiffraction::PostStepDoIt: track is initialized"<<
G4endl;
416 G4cout<<
"G4QDiffraction::PostStepDoIt: before Touchable extraction"<<
G4endl;
420 G4cout<<
"G4QDiffraction::PostStepDoIt: Touchable is extracted"<<
G4endl;
422 G4int targPDG=90000000+Z*1000+N;
429 G4cout<<
"G4QDiffraction::PostStepDoIt: tM="<<tM<<
",p4M="<<proj4M<<
",t4M="<<tot4M<<
G4endl;
431 EnMomConservation=tot4M;
434 G4cout<<
"G4QDiff::PSDI:false,P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",PDG="<<projPDG<<
G4endl;
436 G4double xSec=CalculateXS(Momentum, Z, N, projPDG);
438 G4cout<<
"G4QDiffra::PSDI:PDG="<<projPDG<<
",P="<<Momentum<<
",XS="<<xSec/millibarn<<
G4endl;
441 if(xSec>0. || xSec<0. || xSec==0);
442 else G4cout<<
"-Warning-G4QDiffraction::PostSDI: *NAN* xSec="<<xSec/millibarn<<
G4endl;
448 G4cerr<<
"*Warning*G4QDiffraction::PSDoIt:*Zero cross-section* PDG="<<projPDG
449 <<
",tPDG="<<targPDG<<
",P="<<Momentum<<
G4endl;
458 if(totCMMass < mPion+pM+tM)
461 G4cerr<<
"*Warning*G4QDiffraction::PSDoIt:*Below Diffraction Threshold* cmM="<<totCMMass
462 <<
">pM="<<pM<<
"+tM="<<tM<<
"+pi0="<<mPion<<
"=="<<pM+tM+mPion<<
G4endl;
473 G4int nSec=out->size();
479 G4cout<<
"G4QDiffraction::PostStepDoIt: =---=found=---= nSecondaries="<<nSec<<
G4endl;
481 for(i=0; i<nSec; i++)
494 else if(difPDG== 130 || difPDG==-311 || difPDG==89000001)
496 else if(difPDG== 310 || difPDG== 311 || difPDG==90999999)
523 if(S||Z>B||Z<0)
G4cout<<
"-Warning-G4QDif::PoStDoIt:Z="<<Z<<
",A="<<B<<
",S="<<S<<
G4endl;
526 G4cout<<
"G4QDiffraction::PoStDoIt:Ion,Z="<<Z<<
",A="<<B<<
",D="<<theDefinition<<
G4endl;
534 EnMomConservation-=dif4M;
541 G4cout<<
"G4QDiffraction::PostStepDoIt: Filled 4M="<<dif4M<<
", PDG="<<difPDG<<
G4endl;
544 else G4cout<<
"-Warning-G4QDif::PSDI: Lost PDG="<<difPDG<<
", Z="<<difQH->
GetCharge()
550 G4cout<<
"G4QDiffraction::PostStepDoIt:*** PostStepDoIt is done ***"<<
G4endl;
572 G4cout<<
"G4QDiff::CXS:p="<<p<<
",Z="<<Z<<
",N="<<N<<
",C="<<PDG<<
",XS="<<xs_value<<
G4endl;
std::vector< G4Element * > G4ElementVector
#define G4HadronicDeprecate(name)
std::vector< G4Isotope * > G4IsotopeVector
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4QHadron * > G4QHadronVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
static G4AntiLambda * AntiLambda()
static G4AntiNeutron * AntiNeutron()
static G4AntiOmegaMinus * AntiOmegaMinus()
static G4AntiProton * AntiProton()
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiSigmaZero * AntiSigmaZero()
static G4AntiXiMinus * AntiXiMinus()
static G4AntiXiZero * AntiXiZero()
const G4ThreeVector & GetMomentumDirection() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
static G4Electron * Electron()
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
G4IsotopeVector * GetIsotopeVector() const
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4Lambda * Lambda()
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
static G4Neutron * Neutron()
static G4OmegaMinus * OmegaMinus()
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
const G4String & GetParticleType() const
G4int GetPDGEncoding() const
const G4String & GetParticleSubType() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4PionZero * PionZero()
static G4Positron * Positron()
static G4Proton * Proton()
static G4QCHIPSWorld * Get()
G4QParticleVector * GetParticles(G4int nOfParts=0)
static G4QDiffractionRatio * GetPointer()
G4QHadronVector * TargFragment(G4int pPDG, G4LorentzVector p4M, G4int tgZ, G4int tgN)
G4double GetTargSingDiffXS(G4double pIU, G4int prPDG, G4int tgZ, G4int tgN)
G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
G4int GetNumberOfNeutronsInTarget()
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4bool IsApplicable(const G4ParticleDefinition &particle)
G4LorentzVector GetEnegryMomentumConservation()
G4QDiffraction(const G4String &processName="CHIPS_DiffractiveInteraction")
G4LorentzVector Get4Momentum() const
G4int GetBaryonNumber() const
G4int GetStrangeness() const
std::vector< std::pair< G4int, G4double > * > * GetCSVector(G4int Z, G4int index=0)
G4bool IsDefined(G4int Z, G4int Ind)
G4double GetMeanCrossSection(G4int Z, G4int index=0)
static G4QIsotope * Get()
G4int InitElement(G4int Z, G4int index, std::vector< std::pair< G4int, G4double > * > *abund)
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()
G4double GetWeight() const
void SetWeight(G4double aValue)
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4ParticleChange aParticleChange
const G4String & GetProcessName() const
static G4XiMinus * XiMinus()
static G4XiZero * XiZero()