ATLAS Offline Software
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 
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 
26  Side side,
27  double length,
28  double strength,
29  double beamEnergy) {
30 
35 
36  throw std::logic_error("unknown magnet type");
37  }
38 
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,
52 
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