ATLAS Offline Software
FPTracker/FPTracker/Magnet.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef FPTACKER_MAGNET_H
6 #define FPTACKER_MAGNET_H
7 
8 #include "IBeamElement.h"
9 #include "Point.h"
10 #include "FPTrackerConstants.h"
11 #include "IBender.h"
12 #include "Particle.h"
13 #include <memory>
14 #include <vector>
15 #include <iosfwd>
16 
17 namespace FPTracker{
18  class IParticle;
19  class TransversePoint;
20  class Magnet:public IBeamElement{
21  public:
22  Magnet(double x,
23  double y,
24  double center,
25  double strength,
26  double length,
27  int apertype,
28  double aper_A1,
29  double aper_A2,
30  double aper_A3,
31  double aper_A4,
32  double xb,
33  Side side,
34  IBender::ConstPtr_t bender,
35  const std::string& label
36  );
37  /*
38  Magnet(const Magnet&);
39  Magnet& operator=(Magnet);
40  */
41 
42  double frontFace() const;
43  double rearFace() const;
44  double zabspos() const;
45  double zsignedpos() const;
46  double centerZ() const; //magnet center
47  Point position() const;
48  Side side() const;
49 
50  bool isEndElement() const;
51  std::string str() const;
52 
53  std::string label() const;
54 
55  void track(IParticle&) const;
56  void calibrate(IParticle&);
57 
59 
60 
61  typedef std::shared_ptr< Magnet > Ptr_t;
62  typedef std::vector< Ptr_t > Container_t;
63 
65 
66 
67 
68 
69  private:
70 
72  double m_frontFace;
73  double m_rearFace;
74  double m_strength;
76  double m_aper_A1;
77  double m_aper_A2;
78  double m_aper_A3;
79  double m_aper_A4;
80  double m_xb;
83  std::string m_label;
84 
85 
86  bool isOutOfAperture( IParticle& ) const;
87  double frontface() const;
88  void swap(Magnet&);
89  };
90 
91 
92  std::ostream& operator<<(std::ostream&, const Magnet&);
93 
94 }
95 #endif
FPTracker::IBeamElement
Definition: FPTracker/FPTracker/IBeamElement.h:23
FPTracker::operator<<
std::ostream & operator<<(std::ostream &os, const Beamline &bl)
Definition: FPTracker/src/Beamline.cxx:163
FPTracker::Magnet::rearFace
double rearFace() const
Definition: FPTracker/src/Magnet.cxx:57
FPTracker::Magnet
Definition: FPTracker/FPTracker/Magnet.h:20
FPTracker::IBender::ConstPtr_t
std::shared_ptr< IBender > ConstPtr_t
Definition: FPTracker/FPTracker/IBender.h:18
FPTracker::Magnet::vbDipole
@ vbDipole
Definition: FPTracker/FPTracker/Magnet.h:64
FPTracker::Magnet::clone
IBeamElement::ConstPtr_t clone() const
Definition: FPTracker/src/Magnet.cxx:51
Point.h
FPTracker::Magnet::hfQuadrupole
@ hfQuadrupole
Definition: FPTracker/FPTracker/Magnet.h:64
FPTracker::Magnet::side
Side side() const
Definition: FPTracker/src/Magnet.cxx:61
FPTracker::Magnet::hbDipole
@ hbDipole
Definition: FPTracker/FPTracker/Magnet.h:64
x
#define x
FPTracker::Magnet::m_label
std::string m_label
Definition: FPTracker/FPTracker/Magnet.h:83
FPTracker::Magnet::m_xb
double m_xb
Definition: FPTracker/FPTracker/Magnet.h:80
FPTracker::Magnet::centerZ
double centerZ() const
IBender.h
FPTracker::Magnet::m_center
Point m_center
Definition: FPTracker/FPTracker/Magnet.h:71
FPTracker::Magnet::m_strength
double m_strength
Definition: FPTracker/FPTracker/Magnet.h:74
FPTrackerConstants.h
FPTracker::Magnet::m_rearFace
double m_rearFace
Definition: FPTracker/FPTracker/Magnet.h:73
FPTracker::Magnet::position
Point position() const
Definition: FPTracker/src/Magnet.cxx:60
FPTracker::Magnet::Container_t
std::vector< Ptr_t > Container_t
Definition: FPTracker/FPTracker/Magnet.h:62
FPTracker::IBeamElement::ConstPtr_t
std::shared_ptr< const IBeamElement > ConstPtr_t
Definition: FPTracker/FPTracker/IBeamElement.h:40
Side
Definition: WaferTree.h:36
FPTracker::Magnet::notAMagnet
@ notAMagnet
Definition: FPTracker/FPTracker/Magnet.h:64
FPTracker::Magnet::zsignedpos
double zsignedpos() const
Definition: FPTracker/src/Magnet.cxx:58
FPTracker::Magnet::isOutOfAperture
bool isOutOfAperture(IParticle &) const
Definition: FPTracker/src/Magnet.cxx:104
FPTracker::Magnet::m_aper_A1
double m_aper_A1
Definition: FPTracker/FPTracker/Magnet.h:76
xAODType
Definition: ObjectType.h:13
FPTracker::Magnet::track
void track(IParticle &) const
Definition: FPTracker/src/Magnet.cxx:65
FPTracker::Magnet::vfQuadrupole
@ vfQuadrupole
Definition: FPTracker/FPTracker/Magnet.h:64
FPTracker::Point
Definition: FPTracker/FPTracker/Point.h:14
FPTracker::Magnet::zabspos
double zabspos() const
Definition: FPTracker/src/Magnet.cxx:59
DataModelTestDataCommonDict::xb
DMTest::CView::Pers_t xb
Definition: DataModelTestDataCommonDict.h:55
FPTracker::Magnet::label
std::string label() const
Definition: FPTracker/src/Magnet.cxx:16
FPTracker::Magnet::m_aper_A2
double m_aper_A2
Definition: FPTracker/FPTracker/Magnet.h:77
FPTracker::Magnet::m_aper_A3
double m_aper_A3
Definition: FPTracker/FPTracker/Magnet.h:78
FPTracker::Magnet::Ptr_t
std::shared_ptr< Magnet > Ptr_t
Definition: FPTracker/FPTracker/Magnet.h:61
FPTracker::Magnet::m_apertype
int m_apertype
Definition: FPTracker/FPTracker/Magnet.h:75
IBeamElement.h
y
#define y
FPTracker::Magnet::m_frontFace
double m_frontFace
Definition: FPTracker/FPTracker/Magnet.h:72
FPTracker::Magnet::m_side
Side m_side
Definition: FPTracker/FPTracker/Magnet.h:81
Particle.h
FPTracker::Magnet::m_aper_A4
double m_aper_A4
Definition: FPTracker/FPTracker/Magnet.h:79
FPTracker
Definition: FPTracker/FPTracker/Beamline.h:12
FPTracker::Magnet::str
std::string str() const
Definition: FPTracker/src/Magnet.cxx:213
FPTracker::Magnet::frontFace
double frontFace() const
Definition: FPTracker/src/Magnet.cxx:56
FPTracker::Magnet::Magnet
Magnet(double x, double y, double center, double strength, double length, int apertype, double aper_A1, double aper_A2, double aper_A3, double aper_A4, double xb, Side side, IBender::ConstPtr_t bender, const std::string &label)
Definition: FPTracker/src/Magnet.cxx:20
FPTracker::IParticle
Definition: ForwardDetectors/FPTracker/FPTracker/IParticle.h:17
FPTracker::Magnet::isEndElement
bool isEndElement() const
Definition: FPTracker/src/Magnet.cxx:63
IParticle
Definition: Event/EventKernel/EventKernel/IParticle.h:43
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
FPTracker::Magnet::frontface
double frontface() const
FPTracker::Magnet::swap
void swap(Magnet &)
FPTracker::Magnet::calibrate
void calibrate(IParticle &)
Definition: FPTracker/src/Magnet.cxx:99
FPTracker::Magnet::m_bender
IBender::ConstPtr_t m_bender
Definition: FPTracker/FPTracker/Magnet.h:82