CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/Alignment/CocoaDDLObjects/src/CocoaMaterialElementary.cc

Go to the documentation of this file.
00001 //   COCOA class implementation file
00002 //Id:  CocoaMaterialElementary.cc
00003 //CAT: Model
00004 //
00005 //   History: v1.0 
00006 //   Pedro Arce
00007 #include <map>
00008 #include <fstream>
00009 
00010 #include "Alignment/CocoaDDLObjects/interface/CocoaMaterialElementary.h"
00011 
00012 
00013 CocoaMaterialElementary::CocoaMaterialElementary( ALIstring name, float density, ALIstring symbol, ALIint A, ALIint Z )
00014 { 
00015 
00016   theName = name;
00017   theDensity = density;
00018   theSymbol = symbol;
00019   theA = A;
00020   theZ = Z;
00021 }
00022 
00023 
00024 ALIbool CocoaMaterialElementary::operator==(const CocoaMaterialElementary& mate ) const
00025 {
00026   float kTolerance = 1.E-9;
00027   if( mate.getDensity() - theDensity < kTolerance 
00028       && mate.getSymbol() == theSymbol
00029       && mate.getA() == theA
00030       && mate.getZ() == theZ ) {
00031     return 1;
00032   } else {
00033     return 0;
00034   }
00035 
00036 }