CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CocoaMaterialElementary Class Reference

#include <CocoaMaterialElementary.h>

Public Member Functions

 CocoaMaterialElementary (ALIstring name, float density, ALIstring symbol, float A, ALIint Z)
 
float getA () const
 
float getDensity () const
 
ALIstring getName () const
 
ALIstring getSymbol () const
 
ALIint getZ () const
 
ALIbool operator== (const CocoaMaterialElementary &mate) const
 
 ~CocoaMaterialElementary ()
 

Private Attributes

float theA
 
float theDensity
 
ALIstring theName
 
ALIstring theSymbol
 
ALIint theZ
 

Detailed Description

Definition at line 16 of file CocoaMaterialElementary.h.

Constructor & Destructor Documentation

◆ CocoaMaterialElementary()

CocoaMaterialElementary::CocoaMaterialElementary ( ALIstring  name,
float  density,
ALIstring  symbol,
float  A,
ALIint  Z 
)

Definition at line 13 of file CocoaMaterialElementary.cc.

14  : theName(name), theDensity(density), theSymbol(symbol), theA(A), theZ(Z) {}

◆ ~CocoaMaterialElementary()

CocoaMaterialElementary::~CocoaMaterialElementary ( )
inline

Definition at line 20 of file CocoaMaterialElementary.h.

20 {};

Member Function Documentation

◆ getA()

float CocoaMaterialElementary::getA ( ) const
inline

Definition at line 25 of file CocoaMaterialElementary.h.

25 { return theA; }

References theA.

Referenced by operator==().

◆ getDensity()

float CocoaMaterialElementary::getDensity ( ) const
inline

Definition at line 23 of file CocoaMaterialElementary.h.

23 { return theDensity; }

References theDensity.

Referenced by operator==().

◆ getName()

ALIstring CocoaMaterialElementary::getName ( ) const
inline

Definition at line 22 of file CocoaMaterialElementary.h.

22 { return theName; }

References theName.

Referenced by plotting.Plot::draw(), and CocoaToDDLMgr::lv().

◆ getSymbol()

ALIstring CocoaMaterialElementary::getSymbol ( ) const
inline

Definition at line 24 of file CocoaMaterialElementary.h.

24 { return theSymbol; }

References theSymbol.

Referenced by operator==().

◆ getZ()

ALIint CocoaMaterialElementary::getZ ( ) const
inline

Definition at line 26 of file CocoaMaterialElementary.h.

26 { return theZ; }

References theZ.

Referenced by operator==().

◆ operator==()

ALIbool CocoaMaterialElementary::operator== ( const CocoaMaterialElementary mate) const

Definition at line 16 of file CocoaMaterialElementary.cc.

16  {
17  // GM: Using numeric_limits<float>::epsilon() might be better instead of a
18  // magic number 'kTolerance'. Not changing this to not break code
19  // potentially relying on this number.
20  const float kTolerance = 1.E-9;
21  return (std::abs(mate.getDensity() - theDensity) < kTolerance && mate.getSymbol() == theSymbol &&
22  std::abs(mate.getA() - theA) < kTolerance && mate.getZ() == theZ);
23 }

References funct::abs(), getA(), getDensity(), getSymbol(), getZ(), theA, theDensity, theSymbol, and theZ.

Member Data Documentation

◆ theA

float CocoaMaterialElementary::theA
private

Definition at line 34 of file CocoaMaterialElementary.h.

Referenced by getA(), and operator==().

◆ theDensity

float CocoaMaterialElementary::theDensity
private

Definition at line 32 of file CocoaMaterialElementary.h.

Referenced by getDensity(), and operator==().

◆ theName

ALIstring CocoaMaterialElementary::theName
private

Definition at line 31 of file CocoaMaterialElementary.h.

Referenced by getName().

◆ theSymbol

ALIstring CocoaMaterialElementary::theSymbol
private

Definition at line 33 of file CocoaMaterialElementary.h.

Referenced by getSymbol(), and operator==().

◆ theZ

ALIint CocoaMaterialElementary::theZ
private

Definition at line 35 of file CocoaMaterialElementary.h.

Referenced by getZ(), and operator==().

CocoaMaterialElementary::theA
float theA
Definition: CocoaMaterialElementary.h:34
CocoaMaterialElementary::theName
ALIstring theName
Definition: CocoaMaterialElementary.h:31
CocoaMaterialElementary::getA
float getA() const
Definition: CocoaMaterialElementary.h:25
CocoaMaterialElementary::getZ
ALIint getZ() const
Definition: CocoaMaterialElementary.h:26
CocoaMaterialElementary::theZ
ALIint theZ
Definition: CocoaMaterialElementary.h:35
CocoaMaterialElementary::getDensity
float getDensity() const
Definition: CocoaMaterialElementary.h:23
A
CocoaMaterialElementary::theSymbol
ALIstring theSymbol
Definition: CocoaMaterialElementary.h:33
CocoaMaterialElementary::theDensity
float theDensity
Definition: CocoaMaterialElementary.h:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
BeamSpotPI::Z
Definition: BeamSpotPayloadInspectorHelper.h:32
CocoaMaterialElementary::getSymbol
ALIstring getSymbol() const
Definition: CocoaMaterialElementary.h:24
fastSimProducer_cff.density
density
Definition: fastSimProducer_cff.py:61