110 bool out = offCenter.
mag2() > radius*radius;
114 std::ostringstream ost;
115 ost<<
"pos "<<offCenter.
mag2()<<
" radiusSq "<<radius*radius<<
'\n';
116 particle.addMsg( ost.str() );
125 double part_x = offCenter.
x();
126 double part_y = offCenter.
y();
131 bool out = xx*xx + yy*yy >1.;
134 std::ostringstream ost;
135 ost<<
"outside for aperture type 2 x xx, xaper "<<part_x<<
" "<<xx<<
" "<<
m_aper_A3<<
" y yy yaper "<<part_y<<
" "<<yy<<
" "<<
m_aper_A4<<
'\n';
136 particle.addMsg( ost.str() );
145 std::ostringstream ost;
146 ost<<
"outside for aperture type 2 x test: particle x "<<part_x<<
" m_aper_A1 "<<
m_aper_A1<<
"\n";
147 particle.addMsg( ost.str() );
155 std::ostringstream ost;
156 ost<<
"outside for aperture type 2 y test: particle y "<<part_y<<
" m_aper_A2 "<<
m_aper_A2<<
"\n";
157 particle.addMsg( ost.str() );
166 double part_x = offCenter.
x();
167 double part_y = offCenter.
y();
173 std::ostringstream ost;
174 ost<<
"outside for aperture type 3 x test: particle x "<<part_x<<
" m_aper_A1 "<<
m_aper_A1<<
"\n";
175 particle.addMsg( ost.str() );
183 std::ostringstream ost;
184 ost<<
"outside for aperture type 3 y test: particle y "<<part_y<<
" m_aper_A2 "<<
m_aper_A2<<
"\n";
185 particle.addMsg( ost.str() );
197 std::ostringstream ost;
198 ost<<
"outside for aperture type 3 test: particle x "<<part_x<<
" particle y "<<part_y<<
"; m_aper_A1 "<<
m_aper_A1<<
" m_aper_A2 "<<
m_aper_A2<<
" m_aper_A3 "<<
m_aper_A3<<
" m_aper_A4 "<<
m_aper_A4<<
"\n";
199 particle.addMsg( ost.str() );
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 *bender, const std::string &label)