80{
85 G4cout<<
"*W*G4QElastic::GetMeanFreePath: is called for notImplementedParticle"<<
G4endl;
86
88#ifdef debug
90 G4cout<<
"G4QElastic::GetMeanFreePath: kinE="<<KinEn<<
",Mom="<<Momentum<<
G4endl;
91#endif
122 <<
" isn't implemented (only SU(3) particles)"<<
G4endl;
123#ifdef pdebug
124 G4cout<<
"G4QElastic::GetMeanFreePath:"<<nE<<
" Elem's in theMaterial,proj="<<pPDG<<
G4endl;
125#endif
134 else if(pPDG== 130 || pPDG== 310)
135 {
138 }
142 else G4cout<<
"*Warning*G4QElastic::GetMeanFreePath: wrong PDG="<<pPDG<<
G4endl;
145 G4int IPIE=IsoProbInEl.size();
146 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
147 {
148 std::vector<G4double>* SPI=IsoProbInEl[ip];
149 SPI->clear();
150 delete SPI;
151 std::vector<G4int>* IsN=ElIsoN[ip];
152 IsN->clear();
153 delete IsN;
154 }
155 ElProbInMat.clear();
156 ElementZ.clear();
157 IsoProbInEl.clear();
158 ElIsoN.clear();
159 for(
G4int i=0; i<nE; ++i)
160 {
161 G4Element* pElement=(*theElementVector)[i];
163 ElementZ.push_back(Z);
167 if(isoVector) isoSize=isoVector->size();
168#ifdef debug
169 G4cout<<
"G4QElastic::GetMeanFreePath: isovectorLength="<<isoSize<<
G4endl;
170#endif
171 if(isoSize)
172 {
174#ifdef debug
176#endif
178 {
179 std::vector<std::pair<G4int,G4double>*>* newAbund =
180 new std::vector<std::pair<G4int,G4double>*>;
182 for(
G4int j=0; j<isoSize; j++)
183 {
188 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
189#ifdef debug
190 G4cout<<
"G4QElastic::GetMeanFreePath:pair#="<<j<<
",N="<<N<<
",ab="<<abund<<
G4endl;
191#endif
192 newAbund->push_back(pr);
193 }
194#ifdef debug
195 G4cout<<
"G4QElastic::GetMeanFreePath: pairVectorLength="<<newAbund->size()<<
G4endl;
196#endif
198 for(
G4int k=0; k<isoSize; k++)
delete (*newAbund)[k];
199 delete newAbund;
200 }
201 }
202 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->
GetCSVector(Z,indEl);
203 std::vector<G4double>* SPI = new std::vector<G4double>;
204 IsoProbInEl.push_back(SPI);
205 std::vector<G4int>* IsN = new std::vector<G4int>;
206 ElIsoN.push_back(IsN);
207 G4int nIs=cs->size();
208#ifdef debug
209 G4cout<<
"G4QEl::GMFP:=***=>,#isot="<<nIs<<
", Z="<<Z<<
", indEl="<<indEl<<
G4endl;
210#endif
212 if(nIs)
for(
G4int j=0; j<nIs; j++)
213 {
214 std::pair<G4int,G4double>* curIs=(*cs)[j];
215 G4int N=curIs->first;
216 IsN->push_back(N);
217#ifdef debug
218 G4cout<<
"G4QEl::GMFP:*true*,P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",PDG="<<pPDG<<
G4endl;
219#endif
221 if(Q==-27.) ccsf=false;
222#ifdef debug
224#endif
226 if(!CSmanager2) CSI=CSmanager->
GetCrossSection(ccsf,Momentum,Z,N,pPDG);
229#ifdef debug
230 G4cout<<
"G4QEl::GMFP: jI="<<j<<
", Zt="<<Z<<
", Nt="<<N<<
", Mom="<<Momentum<<
", XSec="
232#endif
233 curIs->second = CSI;
234 susi+=CSI;
235 SPI->push_back(susi);
236 }
238#ifdef debug
241#endif
242 ElProbInMat.push_back(sigma);
243 }
244
245#ifdef debug
246 G4cout<<
"G4QElastic::GetMeanFreePath: MeanFreePath="<<1./sigma<<
G4endl;
247#endif
248 if(sigma > 0.) return 1./sigma;
250}
std::vector< G4Element * > G4ElementVector
std::vector< G4Isotope * > G4IsotopeVector
G4DLLIMPORT std::ostream G4cerr
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()
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalMomentum() const
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 G4Neutron * Neutron()
static G4OmegaMinus * OmegaMinus()
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Proton * Proton()
static G4VQCrossSection * GetPointer()
G4bool IsApplicable(const G4ParticleDefinition &particle)
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
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 G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)
static G4XiMinus * XiMinus()
static G4XiZero * XiZero()