46 if(!theNew->
Init(aDataFile))
57 for(
G4int i=0;i<nGammas;i++)
buffer[i] = theGammas[i];
61 theGammas[nGammas] = theNew;
73 for(i=0; i<nGammas; i++)
76 if(std::abs(currentE-nextE)>
epsilon) nLevels++;
84 levelStart =
new G4int [nLevels];
85 levelSize =
new G4int [nLevels];
91 G4int levelCounter=-1;
92 for(i=0; i<nGammas; i++)
95 if(std::abs(currentE-nextE)>
epsilon)
98 levelStart[levelCounter] = i;
99 levelSize[levelCounter] = 0;
101 levelSize[levelCounter]++;
105 for(i=0; i<nLevels; i++)
108 for(
G4int ii=levelStart[i]; ii<levelStart[i]+levelSize[i]; ii++)
110 theLevels[i].
SetGamma(ii-levelStart[i], theGammas[ii]);
115 G4double levelE, gammaE, currentLevelE;
117 for(i=0; i<nGammas; i++)
122 min = currentLevelE-gammaE-
epsilon;
123 for(
G4int ii=0; ii<nLevels; ii++)
126 if(std::abs(currentLevelE-(levelE+gammaE))<min)
128 min = std::abs(currentLevelE-(levelE+gammaE));
133 if ( it != -1 && currentLevelE == theLevels[it].
GetLevelEnergy() )
141 if(it!=-1) theGammas[i]->
SetNext(&theLevels[it]);
double epsilon(double density, double temperature)
G4double GetLevelEnergy(G4int aLevel)
void Init(std::istream &aDataFile)
G4bool Init(std::istream &aDataFile)
G4double GetLevelEnergy()
G4double GetGammaEnergy()
void SetNext(G4ParticleHPLevel *aLevel)
void SetGamma(G4int i, G4ParticleHPGamma *aGamma)
void SetNumberOfGammas(G4int aGammas)
G4double GetLevelEnergy()