ATLAS Offline Software
ForwardDetectors
ForwardTracker
src
MagnetFactory.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ForwardTracker/MagnetFactory.h
"
6
#include "
ForwardTracker/IBender.h
"
7
#include "
ForwardTracker/BenderDipole.h
"
8
#include "
ForwardTracker/BenderQuadrupole.h
"
9
10
#include <string>
11
#include <stdexcept>
12
13
namespace
ForwardTracker
{
14
15
std::string
label
(
Magnet::Type
type
) {
16
17
if
(
type
==
Magnet::hbDipole
)
return
"hbDipole"
;
18
if
(
type
==
Magnet::vbDipole
)
return
"vbDipole"
;
19
if
(
type
==
Magnet::hfQuadrupole
)
return
"hfQuadrupole"
;
20
if
(
type
==
Magnet::vfQuadrupole
)
return
"vfQuadrupole"
;
21
22
return
"NONE"
;
23
}
24
25
IBender::ConstPtr_t
benderFactory
(
Magnet::Type
type
,
26
Side
side
,
27
double
length
,
28
double
strength,
29
double
beamEnergy
) {
30
31
if
(
type
==
Magnet::hbDipole
)
return
IBender::ConstPtr_t
(
new
BenderDipole
(
side
,
length
, strength,
beamEnergy
,
hBendplane
));
32
if
(
type
==
Magnet::vbDipole
)
return
IBender::ConstPtr_t
(
new
BenderDipole
(
side
,
length
, strength,
beamEnergy
,
vBendplane
));
33
if
(
type
==
Magnet::hfQuadrupole
)
return
IBender::ConstPtr_t
(
new
BenderQuadrupole
(
side
,
length
, strength,
beamEnergy
,
hBendplane
));
34
if
(
type
==
Magnet::vfQuadrupole
)
return
IBender::ConstPtr_t
(
new
BenderQuadrupole
(
side
,
length
, strength,
beamEnergy
,
vBendplane
));
35
36
throw
std::logic_error(
"unknown magnet type"
);
37
}
38
39
Magnet::ConstPtr_t
MagnetFactory
(
double
x
,
40
double
y
,
41
double
z
,
42
double
strength,
43
double
length
,
44
const
std::string& aperType,
45
double
aper1,
46
double
aper2,
47
double
aper3,
48
double
aper4,
49
double
beamEnergy
,
50
Side
side
,
51
Magnet::Type
type
) {
52
53
IBender::ConstPtr_t
bender(
benderFactory
(
type
,
side
,
length
, strength,
beamEnergy
));
54
55
return
Magnet::ConstPtr_t
(
new
Magnet
(
x
,
y
,
z
,
length
, aperType, aper1, aper2, aper3, aper4,
side
, bender,
label
(
type
)));
56
}
57
}
ForwardTracker::BenderQuadrupole
Definition:
BenderQuadrupole.h:15
ForwardTracker::vBendplane
@ vBendplane
Definition:
ForwardTrackerConstants.h:12
ForwardTracker::Magnet::Type
Type
Definition:
ForwardTracker/ForwardTracker/Magnet.h:36
ForwardTracker::Magnet::vfQuadrupole
@ vfQuadrupole
Definition:
ForwardTracker/ForwardTracker/Magnet.h:36
MagnetFactory.h
x
#define x
ForwardTracker::Magnet::hbDipole
@ hbDipole
Definition:
ForwardTracker/ForwardTracker/Magnet.h:36
TRT::Hit::side
@ side
Definition:
HitInfo.h:83
z
#define z
ForwardTracker::Magnet
Definition:
ForwardTracker/ForwardTracker/Magnet.h:19
ForwardTracker::hBendplane
@ hBendplane
Definition:
ForwardTrackerConstants.h:12
Side
Definition:
WaferTree.h:36
ForwardTracker::benderFactory
IBender::ConstPtr_t benderFactory(Magnet::Type type, Side side, double length, double strength, double beamEnergy)
Definition:
MagnetFactory.cxx:25
ForwardTracker::BenderDipole
Definition:
BenderDipole.h:15
ForwardTracker::Magnet::hfQuadrupole
@ hfQuadrupole
Definition:
ForwardTracker/ForwardTracker/Magnet.h:36
BenderDipole.h
ForwardTracker::label
std::string label(Magnet::Type type)
Definition:
MagnetFactory.cxx:15
RunTileTBMonitoring.beamEnergy
beamEnergy
Definition:
RunTileTBMonitoring.py:248
IBender.h
ForwardTracker::Magnet::vbDipole
@ vbDipole
Definition:
ForwardTracker/ForwardTracker/Magnet.h:36
y
#define y
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
BenderQuadrupole.h
ForwardTracker::IBender::ConstPtr_t
std::shared_ptr< IBender > ConstPtr_t
Definition:
ForwardTracker/ForwardTracker/IBender.h:21
ForwardTracker::Magnet::ConstPtr_t
std::shared_ptr< const Magnet > ConstPtr_t
Definition:
ForwardTracker/ForwardTracker/Magnet.h:38
ForwardTracker
Definition:
ForwardTracker/ForwardTracker/Beamline.h:12
length
double length(const pvec &v)
Definition:
FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
ForwardTracker::MagnetFactory
Magnet::ConstPtr_t MagnetFactory(double x, double y, double z, double strength, double length, const std::string &aperType, double A1, double A2, double A3, double A4, double beamEnergy, Side side, Magnet::Type type)
Definition:
MagnetFactory.cxx:39
Generated on Sun Dec 22 2024 21:14:00 for ATLAS Offline Software by
1.8.18