Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Commits
d05a1d19
Commit
d05a1d19
authored
11 years ago
by
Robert Johannes Langenberg
Committed by
Graeme Stewart
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
IMagFieldSvc.h fixing unsafe type conversion (MagFieldInterfaces-00-01-13)
parent
6cf8e9d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MagneticField/MagFieldInterfaces/MagFieldInterfaces/IMagFieldSvc.h
+75
-0
75 additions, 0 deletions
...ield/MagFieldInterfaces/MagFieldInterfaces/IMagFieldSvc.h
MagneticField/MagFieldInterfaces/cmt/requirements
+22
-0
22 additions, 0 deletions
MagneticField/MagFieldInterfaces/cmt/requirements
with
97 additions
and
0 deletions
MagneticField/MagFieldInterfaces/MagFieldInterfaces/IMagFieldSvc.h
0 → 100644
+
75
−
0
View file @
d05a1d19
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IMagFieldSvc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef MAGFIELDINTERFACES_IMAGFIELDSVC_H
#define MAGFIELDINTERFACES_IMAGFIELDSVC_H
#include
<cmath>
#include
<iostream>
// Framework includes
#include
"GaudiKernel/IInterface.h"
// Amg classes
#include
"GeoPrimitives/GeoPrimitives.h"
/** Declaration of the interface ID ( interface id, major version, minor version) */
static
const
InterfaceID
IID_IMagFieldSvc
(
"IMagFieldSvc"
,
1
,
0
);
namespace
MagField
{
/** @ class IMagFieldSvc
@ author Elmar.Ritsch -at- cern.ch
*/
class
IMagFieldSvc
:
virtual
public
IInterface
{
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** constructor */
IMagFieldSvc
()
:
m_solenoidCurrent
(
0.0
),
m_toroidCurrent
(
0.0
)
{;}
/** Retrieve interface ID */
static
const
InterfaceID
&
interfaceID
()
{
return
IID_IMagFieldSvc
;
}
/** get B field value at given position */
/** xyz[3] is in mm, bxyz[3] is in kT */
/** if deriv[9] is given, field derivatives are returned in kT/mm */
virtual
void
getField
(
const
double
*
xyz
,
double
*
bxyz
,
double
*
deriv
=
0
)
=
0
;
/** a getField() wrapper for Amg classes */
void
getField
(
const
Amg
::
Vector3D
*
xyz
,
Amg
::
Vector3D
*
bxyz
,
Amg
::
RotationMatrix3D
*
deriv
=
0
)
{
getField
(
xyz
->
data
(),
bxyz
->
data
(),
deriv
->
data
()
);
}
/** get B field value on the z-r plane at given position */
/** works only inside the solenoid; otherwise calls getField() above */
/** xyz[3] is in mm, bxyz[3] is in kT */
/** if deriv[9] is given, field derivatives are returned in kT/mm */
virtual
void
getFieldZR
(
const
double
*
xyz
,
double
*
bxyz
,
double
*
deriv
=
0
)
=
0
;
/** status of the magnets */
bool
solenoidOn
()
{
return
solenoidCurrent
()
>
0.0
;
}
bool
toroidOn
()
{
return
toroidCurrent
()
>
0.0
;
}
float
solenoidCurrent
()
{
return
m_solenoidCurrent
;
}
float
toroidCurrent
()
{
return
m_toroidCurrent
;
}
protected
:
void
setSolenoidCurrent
(
float
current
)
{
m_solenoidCurrent
=
current
;
}
void
setToroidCurrent
(
float
current
)
{
m_toroidCurrent
=
current
;
}
private
:
float
m_solenoidCurrent
;
// solenoid current in ampere
float
m_toroidCurrent
;
// toroid current in ampere
};
}
#endif //> !MAGFIELDINTERFACES_IMAGFIELDSVC_H
This diff is collapsed.
Click to expand it.
MagneticField/MagFieldInterfaces/cmt/requirements
0 → 100644
+
22
−
0
View file @
d05a1d19
package MagFieldInterfaces
author <elmar.ritsch@cern.ch>
manager Niels van Eldik <niels.van.eldik@cern.ch>
manager Robert Langenberg <robert.johannes.langenberg@cern.ch>
manager Masahiro Morii <masahiro_morii@harvard.edu>
manager Elmar Ritsch <elmar.ritsch@cern.ch>
#################################################################
# public use statements
#################################################################
public
use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use GeoPrimitives GeoPrimitives-* DetectorDescription
#################################################################
# private use statements
#################################################################
private
end_private
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