File indexing completed on 2024-04-06 11:55:58
0001
0002
0003
0004
0005
0006
0007 #include <cmath> // include floating-point std::abs functions
0008 #include <fstream>
0009 #include <map>
0010
0011 #include "Alignment/CocoaDDLObjects/interface/CocoaMaterialElementary.h"
0012
0013 CocoaMaterialElementary::CocoaMaterialElementary(ALIstring name, float density, ALIstring symbol, float A, ALIint Z)
0014 : theName(name), theDensity(density), theSymbol(symbol), theA(A), theZ(Z) {}
0015
0016 ALIbool CocoaMaterialElementary::operator==(const CocoaMaterialElementary &mate) const {
0017
0018
0019
0020 const float kTolerance = 1.E-9;
0021 return (std::abs(mate.getDensity() - theDensity) < kTolerance && mate.getSymbol() == theSymbol &&
0022 std::abs(mate.getA() - theA) < kTolerance && mate.getZ() == theZ);
0023 }