Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Alignment
CocoaDDLObjects
src
CocoaMaterialElementary.cc
Go to the documentation of this file.
1
// COCOA class implementation file
2
//Id: CocoaMaterialElementary.cc
3
//CAT: Model
4
//
5
// History: v1.0
6
// Pedro Arce
7
#include <map>
8
#include <fstream>
9
#include <cmath>
// include floating-point std::abs functions
10
11
#include "
Alignment/CocoaDDLObjects/interface/CocoaMaterialElementary.h
"
12
13
14
CocoaMaterialElementary::CocoaMaterialElementary
(
ALIstring
name
,
float
density,
ALIstring
symbol,
float
A
,
ALIint
Z
) :
15
theName(name),
16
theDensity(density),
17
theSymbol(symbol),
18
theA(A),
19
theZ
(Z)
20
{
21
}
22
23
24
ALIbool
CocoaMaterialElementary::operator==
(
const
CocoaMaterialElementary
& mate )
const
25
{
26
// GM: Using numeric_limits<float>::epsilon() might be better instead of a
27
// magic number 'kTolerance'. Not changing this to not break code
28
// potentially relying on this number.
29
const
float
kTolerance = 1.E-9;
30
return
(
std::abs
(mate.
getDensity
() -
theDensity
) < kTolerance
31
&& mate.
getSymbol
() ==
theSymbol
32
&&
std::abs
(mate.
getA
() -
theA
) < kTolerance
33
&& mate.
getZ
() ==
theZ
);
34
}
Gflash::Z
const double Z[kNumberCalorimeter]
Definition:
GflashNameSpace.h:58
theZ
T theZ
Definition:
Basic3DVectorLD.h:270
CocoaMaterialElementary.h
CocoaMaterialElementary::getDensity
float getDensity() const
Definition:
CocoaMaterialElementary.h:26
CocoaMaterialElementary::getSymbol
ALIstring getSymbol() const
Definition:
CocoaMaterialElementary.h:28
ALIint
int ALIint
Definition:
CocoaGlobals.h:15
CocoaMaterialElementary::CocoaMaterialElementary
CocoaMaterialElementary(ALIstring name, float density, ALIstring symbol, float A, ALIint Z)
Definition:
CocoaMaterialElementary.cc:14
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
CocoaMaterialElementary::theA
float theA
Definition:
CocoaMaterialElementary.h:42
CocoaMaterialElementary::getA
float getA() const
Definition:
CocoaMaterialElementary.h:30
CocoaMaterialElementary::getZ
ALIint getZ() const
Definition:
CocoaMaterialElementary.h:32
ALIbool
bool ALIbool
Definition:
CocoaGlobals.h:19
CocoaMaterialElementary::operator==
ALIbool operator==(const CocoaMaterialElementary &mate) const
Definition:
CocoaMaterialElementary.cc:24
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CocoaMaterialElementary
Definition:
CocoaMaterialElementary.h:16
CocoaMaterialElementary::theZ
ALIint theZ
Definition:
CocoaMaterialElementary.h:43
CocoaMaterialElementary::theSymbol
ALIstring theSymbol
Definition:
CocoaMaterialElementary.h:41
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
funct::A
A
Definition:
Factorize.h:54
CocoaMaterialElementary::theDensity
float theDensity
Definition:
CocoaMaterialElementary.h:40
Generated for CMSSW Reference Manual by
1.8.5