47std::vector<G4int> G4QNGamma::ElementZ;
48std::vector<G4double> G4QNGamma::ElProbInMat;
49std::vector<std::vector<G4int>*> G4QNGamma::ElIsoN;
50std::vector<std::vector<G4double>*>G4QNGamma::IsoProbInEl;
71 G4int IPIE=IsoProbInEl.size();
72 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
74 std::vector<G4double>* SPI=IsoProbInEl[ip];
77 std::vector<G4int>* IsN=ElIsoN[ip];
90 return EnMomConservation;
105 G4cout<<
"G4QNGamma::GetMeanFreePath: Called Fc="<<*Fc<<
G4endl;
109 G4cout<<
"G4QNGamma::GetMeanFreePath: Before GetDynPart"<<
G4endl;
113 G4cout<<
"G4QNGamma::GetMeanFreePath: Before GetDef"<<
G4endl;
119 G4cout<<
"-W-G4QNGamma::GetMeanFreePath called for not implemented particle"<<
G4endl;
123 G4cout<<
"G4QNGamma::GetMeanFreePath: BeforeGetMaterial P="<<Momentum<<
G4endl;
126 if(Momentum > 500.)
return DBL_MAX;
133 G4cout<<
"G4QNGamma::GetMeanFreePath:"<<nE<<
" Elem's in theMaterial"<<
G4endl;
145 G4cout<<
"G4QNGamma::GetMeanFreePath: CSmanager is defined for neutrons"<<
G4endl;
151 G4cout<<
"-Warning-G4QNGamma::GetMeanFreePath:Particle "
157 G4int IPIE=IsoProbInEl.size();
158 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
160 std::vector<G4double>* SPI=IsoProbInEl[ip];
163 std::vector<G4int>* IsN=ElIsoN[ip];
171 for(
G4int i=0; i<nE; ++i)
173 G4Element* pElement=(*theElementVector)[i];
175 ElementZ.push_back(Z);
179 if(isoVector) isoSize=isoVector->size();
181 G4cout<<
"G4QNGamma::GetMeanFreePath: isovectorLength="<<isoSize<<
G4endl;
188 std::vector<std::pair<G4int,G4double>*>* newAbund =
189 new std::vector<std::pair<G4int,G4double>*>;
191 for(
G4int j=0; j<isoSize; j++)
197 std::pair<G4int,G4double>* pr=
new std::pair<G4int,G4double>(N,abund);
199 G4cout<<
"G4QNGamma::GetMeanFreePath: p#="<<j<<
",N="<<N<<
",ab="<<abund<<
G4endl;
201 newAbund->push_back(pr);
204 G4cout<<
"G4QNGamma::GetMeanFreePath: pairVectLength="<<newAbund->size()<<
G4endl;
207 for(
G4int k=0; k<isoSize; k++)
delete (*newAbund)[k];
211 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->
GetCSVector(Z,indEl);
212 std::vector<G4double>* SPI =
new std::vector<G4double>;
213 IsoProbInEl.push_back(SPI);
214 std::vector<G4int>* IsN =
new std::vector<G4int>;
215 ElIsoN.push_back(IsN);
216 G4int nIs=cs->size();
219 G4cout<<
"G4QNGamma::GetMeanFreePath: Before Loop nIs="<<nIs<<
G4endl;
221 if(nIs)
for(
G4int j=0; j<nIs; j++)
223 std::pair<G4int,G4double>* curIs=(*cs)[j];
224 G4int N=curIs->first;
227 G4cout<<
"G4QNGam::GetMeanFrP: Before CS, P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
G4endl;
233 G4cout<<
"GQC::GMF:X="<<CSI<<
",M="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",P="<<pPDG<<
G4endl;
237 SPI->push_back(susi);
240 ElProbInMat.push_back(sigma);
245 if(sigma > 0.)
return 1./sigma;
269 G4cout<<
"G4QNGamma::PostStepDoIt: Before the GetMeanFreePath is called"<<
G4endl;
274 G4cout<<
"G4QNGamma::PostStepDoIt: After the GetMeanFreePath is called"<<
G4endl;
279 if(std::fabs(Momentum-momentum)>.001)
280 G4cerr<<
"*G4QNGamma::PostStepDoIt: P="<<Momentum<<
"#"<<momentum<<
G4endl;
283 if(std::fabs(mp-mNeut)>.001)
G4cerr<<
"*G4QNGamma::PostStDoIt: M="<<mp<<
"#"<<mNeut<<
G4endl;
284 G4cout<<
"->G4QNGam::PostStDoIt:*called*,4M="<<proj4M<<
",P="<<Momentum<<
",m="<<mp<<
G4endl;
289 G4cerr<<
"G4QNGamma::PostStepDoIt: Only neutrons with P="<<Momentum<<
" < 500"<<
G4endl;
297 G4cout<<
"G4QNGamma::PostStepDoIt: "<<nE<<
" elements in the material."<<
G4endl;
299 G4int EPIM=ElProbInMat.size();
301 G4cout<<
"G4QNGam::PostStDoIt: m="<<EPIM<<
",n="<<nE<<
",T="<<ElProbInMat[EPIM-1]<<
G4endl;
310 G4cout<<
"G4QNGamma::PostStepDoIt:E["<<i<<
"]="<<ElProbInMat[i]<<
",r="<<rnd<<
G4endl;
312 if (rnd<ElProbInMat[i])
break;
316 G4Element* pElement=(*theElementVector)[i];
319 G4cout<<
"G4QNGamma::PostStepDoIt: i="<<i<<
", Z(element)="<<Z<<
G4endl;
323 G4cerr<<
"---Warning---G4QNGamma::PostStepDoIt: Element with Z="<<Z<<
G4endl;
326 std::vector<G4double>* SPI = IsoProbInEl[i];
327 std::vector<G4int>* IsN = ElIsoN[i];
328 G4int nofIsot=SPI->size();
330 G4cout<<
"G4QNGam::PosStDoIt:n="<<nofIsot<<
",T="<<(*SPI)[nofIsot-1]<<
G4endl;
336 for(j=0; j<nofIsot; ++j)
339 G4cout<<
"G4QNGamma::PostStepDoIt: SP["<<j<<
"]="<<(*SPI)[j]<<
", r="<<rndI<<
G4endl;
341 if(rndI < (*SPI)[j])
break;
343 if(j>=nofIsot) j=nofIsot-1;
347 G4cout<<
"G4QNGamma::PostStepDoIt: Z="<<Z<<
", j="<<i<<
", N(isotope)="<<N<<
G4endl;
361 G4cerr<<
"-Warning-G4QNGamma::PostStepDoIt: Isotope with Z="<<Z<<
", 0>N="<<N<<
G4endl;
366 G4cout<<
"G4QNGamma::PostStepDoIt: N="<<N<<
" for element with Z="<<Z<<
G4endl;
371 G4cout<<
"G4QNGamma::PostStepDoIt: weight="<<weight<<
G4endl;
375 G4cout<<
"G4QNGamma::PostStepDoIt: localtime="<<localtime<<
G4endl;
382 G4int targPDG = 90000000 + Z*1000 + N;
386 G4cout<<
"G4QNGamma::PostStepDoIt: n + targPDG="<<targPDG<<
G4endl;
393 G4int resPDG = targPDG + 1;
398 G4cout<<
"G4QNGamma::PostStepDoIt: tM="<<tM <<
", rM="<<rM <<
", Q="<<tM+mNeut-rM<<
G4endl;
405 G4cerr<<
"-Warning-G4QNGamma::PostStDoIt: tM="<<std::sqrt(totM2)<<
" < rM="<<rM<<
G4endl;
415 EnMomConservation = tot4M - r4M - g4M;
std::vector< G4Element * > G4ElementVector
#define G4HadronicDeprecate(name)
std::vector< G4Isotope * > G4IsotopeVector
CLHEP::HepLorentzVector G4LorentzVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
G4double GetTotalMomentum() const
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
G4IsotopeVector * GetIsotopeVector() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4Neutron * Neutron()
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
G4int GetPDGEncoding() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
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)
G4bool IsApplicable(const G4ParticleDefinition &particle)
G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
G4int GetNumberOfNeutronsInTarget()
G4QNGamma(const G4String &processName="CHIPS_N-Gamma")
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4LorentzVector GetEnegryMomentumConservation()
G4double GetRatio(G4double pIU, G4int tgZ, G4int tgN)
static G4QNeutronCaptureRatio * GetPointer()
static G4VQCrossSection * GetPointer()
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)
void SetNumberOfSecondaries(G4int totSecondaries)
G4ParticleChange aParticleChange
const G4String & GetProcessName() const
virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)