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++) {
68 name(mat.
name), density(mat.density), nElem(mat.nElem) {
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++)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
void computeDensity(int nconst, CCalMaterial **constituents, double *weights, FractionType ft)
G4bool operator==(const CCalMaterial &) const
G4bool operator!=(const CCalMaterial &) const
double Weight(int i) const
G4GLOB_DLL std::ostream G4cout
G4String Element(int i) const
CCalMaterial & operator=(const CCalMaterial &)