ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4Validation
src
AtlasBComponent.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "CLHEP/Units/SystemOfUnits.h"
6
#include "
AtlasBComponent.h
"
7
8
9
using
CLHEP::kilogauss;
10
11
12
namespace
Genfun
{
13
FUNCTION_OBJECT_IMP(
AtlasBComponent
)
14
// This class is an adaptor:
15
16
// Constructor:
17
AtlasBComponent
::
AtlasBComponent
(
unsigned
int
index
,
MagField
::AtlasFieldCache* fieldCache)
18
: AbsFunction()
19
,
m_index
(
index
)
20
, m_fieldCache(fieldCache) {}
21
22
// Destructor:
23
AtlasBComponent::~AtlasBComponent
() {}
24
25
// Copy Constructor:
26
AtlasBComponent::AtlasBComponent
(
const
AtlasBComponent
&right)
27
: AbsFunction()
28
,
m_index
(right.
m_index
)
29
, m_fieldCache(right.m_fieldCache) {}
30
31
// Dimensionality:
32
unsigned
int
AtlasBComponent::dimensionality
()
const
{
return
3;}
33
34
double
AtlasBComponent::operator ()
(
double
)
const
{
throw
"Invalid parameter!"
; }
35
36
double
AtlasBComponent::operator ()
(
const
Argument &
a
)
const
{
37
// Changes from doubles to floats and back
38
double
XYZ_in_mm[3] , BXYZ_in_kgmm[3];
39
for
(
int
i=0;i<3;++i) *(XYZ_in_mm+i) =
a
[i];
40
m_fieldCache->getField( XYZ_in_mm , BXYZ_in_kgmm );
// const-violation, see comment in header file
41
return
BXYZ_in_kgmm[
m_index
]*kilogauss;
42
}
43
44
}
45
AtlasBComponent.h
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
Genfun::AtlasBComponent
Definition
AtlasBComponent.h:14
Genfun::AtlasBComponent::dimensionality
virtual unsigned int dimensionality() const override
Definition
AtlasBComponent.cxx:32
Genfun::AtlasBComponent::operator()
virtual double operator()(double argument) const override
Definition
AtlasBComponent.cxx:34
Genfun::AtlasBComponent::m_index
unsigned int m_index
Definition
AtlasBComponent.h:37
Genfun::AtlasBComponent::AtlasBComponent
AtlasBComponent(unsigned int index, MagField::AtlasFieldCache *fieldCache)
Definition
AtlasBComponent.cxx:17
Genfun::AtlasBComponent::~AtlasBComponent
virtual ~AtlasBComponent()
Definition
AtlasBComponent.cxx:23
Genfun
Definition
AtlasBComponent.cxx:12
MagField
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition
ForwardRegionFieldSvc.h:27
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.14.0