41 for (i=0; i<nconst; i++)
49 for (i=0; i<nconst; i++) {
53 factor=constituents[i]->
Density();
54 for (
int j=0; j<constituents[i]->
NElements(); j++) {
71 for (
int i=0; i<
nElem; i++){
89 for (
int i=0; i<nconst; i++) {
92 volume+=(weights[i]/constituents[i]->
Density());
95 mass+=(weights[i]*constituents[i]->
Density());
114 for (
int i=0; i<
nElem; i++){
134 for (
int i=0; i<
nElem; i++) {
138 for (
int j=i+1; j<
nElem; j++) {
147 if (trueConst != nElem) {
149 double* newWeight =
new double[trueConst];
152 for(
int i=0; i<
nElem; i++){
161 G4cout <<
"\tGoing from " << nElem <<
" constituents to " << trueConst <<
G4endl;
172 for (
int i=0; i<
nElem; i++)
179 os <<
"Density= " << mat.
density <<
" g/cm3. Number of Elements: "
181 for (
int i=0; i<mat.
nElem; i++)
double Weight(int i) const
void computeDensity(int nconst, CCalMaterial **constituents, double *weights, FractionType ft)
std::ostream & operator<<(std::ostream &os, const CCalMaterial &mat)
G4GLOB_DLL std::ostream G4cout
G4bool operator==(const CCalMaterial &) const
CCalMaterial & operator=(const CCalMaterial &)
G4String Element(int i) const
G4bool operator!=(const CCalMaterial &) const