ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardTracker/ForwardTracker/Magnet.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FORWARDTRACKER_MAGNET_H
6#define FORWARDTRACKER_MAGNET_H
7
9#include "IBeamElement.h"
10#include "IBender.h"
11#include "Particle.h"
12#include "Point.h"
13
14namespace ForwardTracker {
15
16 class IParticle;
17 class TransversePoint;
18
19 class Magnet: public IBeamElement {
20
21 public:
22
23 Magnet(double x,
24 double y,
25 double z,
26 double length,
27 const std::string& aperType,
28 double A1,
29 double A2,
30 double A3,
31 double A4,
32 Side side,
33 IBender * bender,
34 const std::string& label);
35
37
38 typedef std::shared_ptr<const Magnet> ConstPtr_t;
39 typedef std::vector<ConstPtr_t> Container_t;
40
41 std::string label() const { return m_label; }
42 Side side() const { return m_side; }
43 double frontFace() const { return m_frontFace; }
44 double rearFace() const { return m_rearFace; }
45 Point position() const { return m_position; }
46 bool isEndElement() const { return false; }
47
48 IBeamElement::ConstPtr_t clone() const { IBeamElement::ConstPtr_t pm(new Magnet(*this)); return pm; }
49
50 void track(IParticle&) const;
51
52 std::string str() const;
53
54 private:
55
56 std::string m_label;
59 double m_rearFace;
61 std::string m_aperType;
62 double m_A1;
63 double m_A2;
64 double m_A3;
65 double m_A4;
67
68 bool isOutOfAperture(IParticle&) const;
69 };
70
71 std::ostream& operator<<(std::ostream&, const Magnet&);
72
73}
74#endif
double length(const pvec &v)
#define y
#define x
#define z
std::shared_ptr< const IBeamElement > ConstPtr_t
Magnet(double x, double y, double z, double length, const std::string &aperType, double A1, double A2, double A3, double A4, Side side, IBender *bender, const std::string &label)
IBeamElement::ConstPtr_t clone() const
std::shared_ptr< const Magnet > ConstPtr_t
bool isOutOfAperture(IParticle &) const
std::ostream & operator<<(std::ostream &, const Beamline &)