43 if(!theNew->
Init(aDataFile))
54 for(
G4int i=0;i<nGammas;i++) buffer[i] = theGammas[i];
58 theGammas[nGammas] = theNew;
70 for(i=0; i<nGammas; i++)
73 if(std::abs(currentE-nextE)>epsilon) nLevels++;
80 levelStart =
new G4int [nLevels];
81 levelSize =
new G4int [nLevels];
87 G4int levelCounter=-1;
88 for(i=0; i<nGammas; i++)
91 if(std::abs(currentE-nextE)>epsilon)
94 levelStart[levelCounter] = i;
95 levelSize[levelCounter] = 0;
97 levelSize[levelCounter]++;
101 for(i=0; i<nLevels; i++)
104 for(
G4int ii=levelStart[i]; ii<levelStart[i]+levelSize[i]; ii++)
106 theLevels[i].
SetGamma(ii-levelStart[i], theGammas[ii]);
111 G4double levelE, gammaE, currentLevelE;
113 for(i=0; i<nGammas; i++)
118 min = currentLevelE-gammaE-epsilon;
119 for(
G4int ii=0; ii<nLevels; ii++)
122 if(std::abs(currentLevelE-(levelE+gammaE))<min)
124 min = std::abs(currentLevelE-(levelE+gammaE));
129 if ( it != -1 && currentLevelE == theLevels[it].
GetLevelEnergy() )
137 if(it!=-1) theGammas[i]->
SetNext(&theLevels[it]);
void SetNumberOfGammas(G4int aGammas)
G4double GetGammaEnergy()
void SetNext(G4NeutronHPLevel *aLevel)
void Init(std::istream &aDataFile)
G4double GetLevelEnergy()
G4double GetLevelEnergy(G4int aLevel)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void SetGamma(G4int i, G4NeutronHPGamma *aGamma)
G4bool Init(std::istream &aDataFile)
G4double GetLevelEnergy()