#include <Magnet.h>
|
| Magnet (double x, double y, double z, double length, const std::string &aperType, double A1, double A2, double A3, double A4, Side side, IBender::ConstPtr_t bender, const std::string &label) |
|
std::string | label () const |
|
Side | side () const |
|
double | frontFace () const |
|
double | rearFace () const |
|
Point | position () const |
|
bool | isEndElement () const |
|
IBeamElement::ConstPtr_t | clone () const |
|
void | track (IParticle &) const |
|
std::string | str () const |
|
◆ ConstIter_t
◆ ConstListIter_t
◆ ConstPtr_t
◆ Container_t
◆ Iter_t
◆ List_t
◆ ListIter_t
◆ Type
◆ Magnet()
ForwardTracker::Magnet::Magnet |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
length, |
|
|
const std::string & |
aperType, |
|
|
double |
A1, |
|
|
double |
A2, |
|
|
double |
A3, |
|
|
double |
A4, |
|
|
Side |
side, |
|
|
IBender::ConstPtr_t |
bender, |
|
|
const std::string & |
label |
|
) |
| |
◆ clone()
◆ frontFace()
double ForwardTracker::Magnet::frontFace |
( |
| ) |
const |
|
inlinevirtual |
◆ isEndElement()
bool ForwardTracker::Magnet::isEndElement |
( |
| ) |
const |
|
inlinevirtual |
◆ isOutOfAperture()
bool ForwardTracker::Magnet::isOutOfAperture |
( |
IParticle & |
particle | ) |
const |
|
private |
Definition at line 50 of file ForwardTracker/src/Magnet.cxx.
52 TransversePoint offCenter =
particle.displacement();
57 if (
m_A1 == 0)
return false;
61 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
63 ost <<
"radius: " << offCenter.mag2() <<
" > A1*A1: " <<
m_A1*
m_A1;
73 double xx = (
m_A3) ? offCenter.x()/
m_A3 :
throw std::runtime_error(
"ERROR: m_A3 == 0");
74 double yy = (
m_A4) ? offCenter.y()/
m_A4 :
throw std::runtime_error(
"ERROR: m_A4 == 0");
79 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
81 ost <<
" x/A3: " << xx <<
" y/A4: " <<
yy <<
" (Squared sum: " <<
rr <<
" > 1)";
89 if (std::fabs(offCenter.x()) >
m_A1) {
91 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
93 ost <<
" |x|: " << std::fabs(offCenter.x()) <<
" > A1: " <<
m_A1;
102 if (std::fabs(offCenter.y()) >
m_A2) {
104 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
106 ost <<
" |y|: " << std::fabs(offCenter.y()) <<
" > A2: " <<
m_A2;
118 if( std::fabs(offCenter.x())>
m_A1 ) {
120 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
122 ost <<
" |x|: " << std::fabs(offCenter.x()) <<
" > A1: " <<
m_A1;
128 if( std::fabs(offCenter.y())>
m_A2) {
130 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
132 ost <<
" |y|: " << std::fabs(offCenter.y()) <<
" > A2: " <<
m_A2;
141 float d=(
m_A1-std::fabs(offCenter.x()))/(
m_A1-B4)+(
m_A2-std::fabs(offCenter.y()))/(
m_A2-B3);
144 std::ostringstream
ost;
ost <<
m_label <<
" isOutOfAperture ";
146 ost<<
" x: "<<offCenter.x()<<
" y: "<<offCenter.y()<<
" m_A1 "<<
m_A1<<
" m_A2 "<<
m_A2<<
" m_A3 "<<
m_A3<<
" m_A4 "<<
m_A4<<
" d: "<<
d;
156 std::stringstream sstr; sstr <<
" Unknown magnet aperture type " <<
m_aperType <<
"\n";
157 throw std::runtime_error(sstr.str().c_str());
◆ label()
std::string ForwardTracker::Magnet::label |
( |
| ) |
const |
|
inlinevirtual |
◆ position()
Point ForwardTracker::Magnet::position |
( |
| ) |
const |
|
inlinevirtual |
◆ rearFace()
double ForwardTracker::Magnet::rearFace |
( |
| ) |
const |
|
inlinevirtual |
◆ side()
Side ForwardTracker::Magnet::side |
( |
| ) |
const |
|
inlinevirtual |
◆ str()
std::string ForwardTracker::Magnet::str |
( |
| ) |
const |
|
virtual |
◆ track()
void ForwardTracker::Magnet::track |
( |
IParticle & |
particle | ) |
const |
|
virtual |
◆ m_A1
double ForwardTracker::Magnet::m_A1 |
|
private |
◆ m_A2
double ForwardTracker::Magnet::m_A2 |
|
private |
◆ m_A3
double ForwardTracker::Magnet::m_A3 |
|
private |
◆ m_A4
double ForwardTracker::Magnet::m_A4 |
|
private |
◆ m_aperType
std::string ForwardTracker::Magnet::m_aperType |
|
private |
◆ m_bender
◆ m_frontFace
double ForwardTracker::Magnet::m_frontFace |
|
private |
◆ m_label
std::string ForwardTracker::Magnet::m_label |
|
private |
◆ m_position
Point ForwardTracker::Magnet::m_position |
|
private |
◆ m_rearFace
double ForwardTracker::Magnet::m_rearFace |
|
private |
◆ m_side
Side ForwardTracker::Magnet::m_side |
|
private |
The documentation for this class was generated from the following files:
Magnet(double x, double y, double z, double length, const std::string &aperType, double A1, double A2, double A3, double A4, Side side, IBender::ConstPtr_t bender, const std::string &label)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses