Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
006f24a6
Commit
006f24a6
authored
8 years ago
by
Markus Frank
Committed by
MarkusFrankATcernch
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
First round of fixing Clang compiler and linker problems
parent
dc9653ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDCore/src/parsers/ExpressionEvaluator.cpp
+0
-92
0 additions, 92 deletions
DDCore/src/parsers/ExpressionEvaluator.cpp
with
0 additions
and
92 deletions
DDCore/src/parsers/ExpressionEvaluator.cpp
deleted
100644 → 0
+
0
−
92
View file @
dc9653ff
// $Id$
//==========================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author : M.Frank
//
//==========================================================================
#include
"XML/Evaluator.h"
#include
"DD4hep/DD4hepUnits.h"
namespace
{
void
_init
(
XmlTools
::
Evaluator
&
e
)
{
// Initialize numerical expressions parser with the standard math functions
// and the system of units used by Gaudi (Geant4)
e
.
setStdMath
();
}
void
_cgsUnits
(
XmlTools
::
Evaluator
&
e
)
{
// ===================================================================================
// CGS units
e
.
setSystemOfUnits
(
100.
,
1000.
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
);
}
void
_tgeoUnits
(
XmlTools
::
Evaluator
&
e
)
{
// ===================================================================================
// DDG4 units (TGeo) 1 sec = 10^9 [nsec]
// 1 Coulomb = 1/e As
// Ampere = C/s = 1/e * As / s = 1. / 1.60217733e-19
// kilogram = joule*s*s/(m*m) 1/e_SI * 1 *1 / 1e2 / 1e2
// e.setSystemOfUnits(1.e+2, 1./1.60217733e-6, 1.0, 1./1.60217733e-19, 1.0, 1.0, 1.0);
// use the units as defined in DD4hepUnits.h:
e
.
setSystemOfUnits
(
dd4hep
::
meter
,
dd4hep
::
kilogram
,
dd4hep
::
second
,
dd4hep
::
ampere
,
dd4hep
::
kelvin
,
dd4hep
::
mole
,
dd4hep
::
candela
,
dd4hep
::
rad
);
}
void
_g4Units
(
XmlTools
::
Evaluator
&
e
)
{
// ===================================================================================
// Geant4 units
// Geant4: kilogram = joule*s*s/(m*m) 1/e_SI * 1e-6 * 1e9 1e9 / 1e3 / 1e3 = 1. / 1.60217733e-25
e
.
setSystemOfUnits
(
1.e+3
,
1.
/
1.60217733e-25
,
1.e+9
,
1.
/
1.60217733e-10
,
1.0
,
1.0
,
1.0
);
}
}
namespace
DD4hep
{
XmlTools
::
Evaluator
&
evaluator
()
{
static
XmlTools
::
Evaluator
*
e
=
0
;
if
(
!
e
)
{
static
XmlTools
::
Evaluator
ev
;
_init
(
ev
);
_tgeoUnits
(
ev
);
e
=
&
ev
;
}
return
*
e
;
}
/// Access to G4 evaluator. Note: Uses Geant4 units!
XmlTools
::
Evaluator
&
g4Evaluator
()
{
static
XmlTools
::
Evaluator
*
e
=
0
;
if
(
!
e
)
{
static
XmlTools
::
Evaluator
ev
;
_init
(
ev
);
_g4Units
(
ev
);
e
=
&
ev
;
}
return
*
e
;
}
/// Access to G4 evaluator. Note: Uses cgs units!
XmlTools
::
Evaluator
&
cgsEvaluator
()
{
static
XmlTools
::
Evaluator
*
e
=
0
;
if
(
!
e
)
{
static
XmlTools
::
Evaluator
ev
;
_init
(
ev
);
_cgsUnits
(
ev
);
e
=
&
ev
;
}
return
*
e
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment