9 #include "CLHEP/Geometry/Transform3D.h"
11 #include "GaudiKernel/IIncidentSvc.h"
43 m_properties(
"ForwardRegionProperties")
46 declareProperty(
"Magnet",
m_magnet,
"integer property");
49 declareProperty(
"ForwardRegionProperties",
m_properties);
54 const int fileMQXACols(7);
74 const int fileMQXBCols(7);
99 ATH_MSG_INFO(
"Postponing magnet strengths initialization of " << this->
name() <<
" till the begin of run");
102 incidentSvc->addListener(
this, IncidentType::BeginRun );
104 return StatusCode::SUCCESS;
111 if (runIncident.type() == IncidentType::BeginRun)
125 G4ThreeVector
f = this->FieldValue(G4ThreeVector(
xyz[0],
xyz[1],
xyz[2]));
137 throw std::logic_error(
"MagField::ForwardRegionFieldSvc::getFieldZR should not be called");
147 HepGeom::Point3D<double> pointMagStart;
148 HepGeom::Point3D<double> pointMagEnd;
151 getMagnetTransformParams(
beam, m_magnet,
Point, pointMagStart, pointMagEnd, rotZ);
156 bool pointsNotDefined = (pointMagStart.distance2() == 0 || pointMagEnd.distance2() == 0);
159 double xShift = pointsNotDefined ? getMagXOff(m_magnet) : (pointMagStart[0]+pointMagEnd[0])*0.5;
160 double yShift = pointsNotDefined ? getMagYOff(m_magnet) : (pointMagStart[1]+pointMagEnd[1])*0.5;
162 if(m_magnet <= s_Q3){
163 if(m_Config.bUseFLUKAMapsForInnerTriplet)
167 field = G4ThreeVector(gradB*(
Point[1]-yShift),gradB*(
Point[0]-xShift),0);
170 else if(m_magnet <= s_D2)
172 else if(m_magnet <= s_Q7)
175 field = G4ThreeVector(gradB*(
Point[1]-yShift),gradB*(
Point[0]-xShift),0);
178 return getKick(
beam);
181 if(pointsNotDefined){
182 if(rotZ == 0)
return field;
183 return HepGeom::RotateZ3D(rotZ)*(HepGeom::Vector3D<double>)
field;
187 HepGeom::Point3D<double> pointMagEndNoShift(pointMagEnd[0]-xShift, pointMagEnd[1]-yShift, pointMagEnd[2]);
189 HepGeom::Point3D<double> pointMagRotCenter(0,0,(pointMagStart[2]+pointMagEnd[2])/2);
191 HepGeom::Vector3D<double> vecNoRot(0,0,pointMagEnd[2]-pointMagRotCenter[2]);
192 HepGeom::Vector3D<double> vecRot = pointMagEndNoShift - pointMagRotCenter;
194 HepGeom::Vector3D<double> vecRotAxis = vecNoRot.cross(vecRot);
195 double angle = vecNoRot.angle(vecRot);
199 field = rotateField*HepGeom::RotateZ3D(rotZ)*(HepGeom::Vector3D<double>)
field;
217 m_Config = *(m_properties->getConf());
219 if(m_Config.twissFileB1 ==
"" || m_Config.twissFileB2 ==
"" || m_Config.momentum == 0){
222 ATH_MSG_INFO(
"Using magnets.dat as the field settings source");
224 const std::string fileMagnets(
"magnets.dat");
225 m_magnets = loadDataFile(fileMagnets.c_str(),5);
231 ATH_MSG_INFO(
"Using twiss files (" << m_Config.twissFileB1 <<
", " << m_Config.twissFileB2 <<
") as the field settings source");
233 std::string headerB1;
234 std::string headerB2;
236 std::vector<std::vector<std::string> > loadedTwissFileB1 = loadDataFileNLines(m_Config.twissFileB1.c_str(),30,200,headerB1);
237 std::vector<std::vector<std::string> > loadedTwissFileB2 = loadDataFileNLines(m_Config.twissFileB2.c_str(),30,200,headerB2);
240 InitMagDataFromTwiss(loadedTwissFileB1, 1, m_Config.momentum);
243 InitMagDataFromTwiss(loadedTwissFileB2, 2, m_Config.momentum);
261 bool quadrupole =
false;
266 if(m_magnet <= s_Q7) {
275 for(
int i=0;
i < 150;
i++)
278 dipole = (m_magnet == s_D1 && (loadedTwissFile[
i][textIndex] ==
"\"MBXW.A4R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MBXW.A4L1\""))
279 || (m_magnet == s_D2 && (loadedTwissFile[
i][textIndex] ==
"\"MBRC.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MBRC.4L1.B2\""));
281 m_magData[
beam-1] = kLToB(
atof(loadedTwissFile[
i][k0LIndex].c_str()),
atof(loadedTwissFile[
i][lengthIndex].c_str()),
momentum);
286 quadrupole = (m_magnet == s_Q1 && (loadedTwissFile[
i][textIndex] ==
"\"MQXA.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXA.1L1\""))
287 || (m_magnet == s_Q2 && (loadedTwissFile[
i][textIndex] ==
"\"MQXB.A2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXB.A2L1\""))
288 || (m_magnet == s_Q3 && (loadedTwissFile[
i][textIndex] ==
"\"MQXA.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXA.3L1\""))
289 || (m_magnet == s_Q4 && (loadedTwissFile[
i][textIndex] ==
"\"MQY.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQY.4L1.B2\""))
290 || (m_magnet == s_Q5 && (loadedTwissFile[
i][textIndex] ==
"\"MQML.5R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQML.5L1.B2\""))
291 || (m_magnet == s_Q6 && (loadedTwissFile[
i][textIndex] ==
"\"MQML.6R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQML.6L1.B2\""))
292 || (m_magnet == s_Q7 && (loadedTwissFile[
i][textIndex] ==
"\"MQM.A7R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQM.A7L1.B2\""));
294 m_magData[
beam-1] = kLToB(
atof(loadedTwissFile[
i][k1LIndex].c_str()),
atof(loadedTwissFile[
i][lengthIndex].c_str()),
momentum);
299 kicker = (m_magnet == s_Q1HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.1L1\""))
300 || (m_magnet == s_Q1VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.1L1\""))
301 || (m_magnet == s_Q2HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.2L1\""))
302 || (m_magnet == s_Q2VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.2L1\""))
303 || (m_magnet == s_Q3HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.3L1\""))
304 || (m_magnet == s_Q3VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.3L1\""))
305 || (m_magnet == s_Q4VKickA && (loadedTwissFile[
i][textIndex] ==
"\"MCBYV.A4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYV.A4L1.B2\""))
306 || (m_magnet == s_Q4HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBYH.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYH.4L1.B2\""))
307 || (m_magnet == s_Q4VKickB && (loadedTwissFile[
i][textIndex] ==
"\"MCBYV.B4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYV.B4L1.B2\""))
308 || (m_magnet == s_Q5HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBCH.5R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBCH.5L1.B2\""))
309 || (m_magnet == s_Q6VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBCV.6R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBCV.6L1.B2\""));
313 length =
atof(loadedTwissFile[
i][lengthIndex].c_str()) ?
atof(loadedTwissFile[
i][lengthIndex].c_str()) : 0.001;
328 if(
q == 1) MQXAB = 1;
331 double gradMQX = getMag(
q,
beam);
332 double xOffMQX = getMagXOff(
q);
333 double yOffMQX = getMagYOff(
q);
344 G4ThreeVector B(0,0,0);
350 xstep = (maxMQXA - minMQXA)/(s_rowsMQXA-1);
351 ystep = (maxMQXA - minMQXA)/(s_colsMQXA-1);
354 i2 = ceil(
x/xstep)+ceil(s_rowsMQXA/2.);
355 j2 = ceil(
y/ystep)+ceil(s_colsMQXA/2.);
358 x2 = (i2-ceil(s_rowsMQXA/2.))*xstep;
359 y2 = (
j2-ceil(s_colsMQXA/2.))*ystep;
363 if(x < maxMQXA && x > minMQXA && y < maxMQXA && y > minMQXA)
367 B[0] = B[0]*
pow(-1.0,
beam)*(gradMQX/224.29);
368 B[1] = B[1]*
pow(-1.0,
beam)*(gradMQX/224.29);
376 xstep = (maxMQXB - minMQXB)/(s_rowsMQXB-1);
377 ystep = (maxMQXB - minMQXB)/(s_colsMQXB-1);
379 i2 = ceil(
x/xstep)+ceil(s_rowsMQXB/2);
380 j2 = ceil(
y/ystep)+ceil(s_colsMQXB/2);
383 x2 = (i2-ceil(s_rowsMQXB/2))*xstep;
384 y2 = (
j2-ceil(s_colsMQXB/2))*ystep;
388 if(x < maxMQXB && x > minMQXB && y < maxMQXB && y > minMQXB)
392 B[0] = B[0]*
pow(-1.0,
beam)*(gradMQX/216.1787104);
393 B[1] = B[1]*
pow(-1.0,
beam)*(gradMQX/216.1787104);
401 if(m_magDataType == 1)
return m_magData[
beam-1];
402 return atof(m_magnets[magnet][
beam].c_str());
408 return G4ThreeVector(0,0,0);
413 if(m_magDataType == 1)
return m_magData[2];
419 if(m_magDataType == 1)
return m_magData[3];
426 std::vector<std::vector<std::string> > loadedData;
435 LogStream <<
MSG::DEBUG <<
"File " <<
fileName <<
" not found in run directory, trying to load it from DATAPATH" <<
endmsg;
444 std::vector<std::string>
row (
cols);
448 bool unlimited =
false;
449 if(
N==0) unlimited =
true;
451 while(
file.get(
c) && (
i <
N || unlimited))
453 if(
c !=
'@' &&
c !=
'#' &&
c !=
'*' &&
c !=
'$' &&
c !=
'%' &&
c!=
'\n')
460 loadedData.push_back(
row);
461 file.ignore(1024,
'\n');
466 file.getline(temp,1024);
473 file.getline(temp,1024);
475 header.append(
" PosXStart");
476 header.append(
" PosYStart");
477 header.append(
" PosZStart");
478 header.append(
" PosXEnd ");
479 header.append(
" PosYEnd ");
480 header.append(
" PosZEnd ");
487 file.getline(temp,1024);
499 file.ignore(1024,
'\n');
502 LogStream << MSG::INFO <<
"File " <<
fileName <<
" succesfully loaded." <<
endmsg;
529 HepGeom::Point3D<double> pointMagStart;
530 HepGeom::Point3D<double> pointMagEnd;
536 LogStream << MSG::ERROR <<
"Unable to write to " <<
fileName.str() <<
endmsg;
541 int fileSize = loadedTwissFile.size();
543 for(
int i=0;
i < fileSize;
i++)
545 rowSize = loadedTwissFile[
i].size();
546 for(
int j=0; j<rowSize; j++)
548 if(j < 3)
file << std::left;
549 else file << std::right;
550 file << std::setw(20) << loadedTwissFile[
i][j];
552 magID = getMagNumFromName(loadedTwissFile[
i][0]);
555 Point.set(0,0,PointZ);
556 getMagnetTransformParams(
beam, magID,
Point, pointMagStart, pointMagEnd, rotZ);
563 file << std::setw(20) << rotZ;
566 file << std::setw(20) << 0;
567 file << std::setw(20) << 0;
568 file << std::setw(20) << 0;
569 file << std::setw(20) << 0;
570 file << std::setw(20) << 0;
571 file << std::setw(20) << 0;
572 file << std::setw(20) << 0;
584 if (
name ==
"\"MBXW.A4R1\"" ||
name ==
"\"MBXW.A4L1\"")
return s_D1;
585 if (
name ==
"\"MBXW.B4R1\"" ||
name ==
"\"MBXW.B4L1\"")
return s_D1;
586 if (
name ==
"\"MBXW.C4R1\"" ||
name ==
"\"MBXW.C4L1\"")
return s_D1;
587 if (
name ==
"\"MBXW.D4R1\"" ||
name ==
"\"MBXW.D4L1\"")
return s_D1;
588 if (
name ==
"\"MBXW.E4R1\"" ||
name ==
"\"MBXW.E4L1\"")
return s_D1;
589 if (
name ==
"\"MBXW.F4R1\"" ||
name ==
"\"MBXW.F4L1\"")
return s_D1;
590 if (
name ==
"\"MBRC.4R1.B1\"" ||
name ==
"\"MBRC.4L1.B2\"")
return s_D2;
593 if(
name ==
"\"MQXA.1R1\"" ||
name ==
"\"MQXA.1L1\"")
return s_Q1;
594 if(
name ==
"\"MQXB.A2R1\"" ||
name ==
"\"MQXB.A2L1\"")
return s_Q2;
595 if(
name ==
"\"MQXB.B2R1\"" ||
name ==
"\"MQXB.B2L1\"")
return s_Q2;
596 if(
name ==
"\"MQXA.3R1\"" ||
name ==
"\"MQXA.3L1\"")
return s_Q3;
597 if(
name ==
"\"MQY.4R1.B1\"" ||
name ==
"\"MQY.4L1.B2\"")
return s_Q4;
598 if(
name ==
"\"MQML.5R1.B1\"" ||
name ==
"\"MQML.5L1.B2\"")
return s_Q5;
599 if(
name ==
"\"MQML.6R1.B1\"" ||
name ==
"\"MQML.6L1.B2\"")
return s_Q6;
600 if(
name ==
"\"MQM.A7R1.B1\"" ||
name ==
"\"MQM.A7L1.B2\"")
return s_Q7;
601 if(
name ==
"\"MQM.B7R1.B1\"" ||
name ==
"\"MQM.B7L1.B2\"")
return s_Q7;
604 if(
name ==
"\"MCBXH.1R1\"" ||
name ==
"\"MCBXH.1L1\"")
return s_Q1HKick;
605 if(
name ==
"\"MCBXV.1R1\"" ||
name ==
"\"MCBXV.1L1\"")
return s_Q1VKick;
606 if(
name ==
"\"MCBXH.2R1\"" ||
name ==
"\"MCBXH.2L1\"")
return s_Q2HKick;
607 if(
name ==
"\"MCBXV.2R1\"" ||
name ==
"\"MCBXV.2L1\"")
return s_Q2VKick;
608 if(
name ==
"\"MCBXH.3R1\"" ||
name ==
"\"MCBXH.3L1\"")
return s_Q3HKick;
609 if(
name ==
"\"MCBXV.3R1\"" ||
name ==
"\"MCBXV.3L1\"")
return s_Q3VKick;
610 if(
name ==
"\"MCBYV.A4R1.B1\"" ||
name ==
"\"MCBYV.A4L1.B2\"")
return s_Q4VKickA;
611 if(
name ==
"\"MCBYH.4R1.B1\"" ||
name ==
"\"MCBYH.4L1.B2\"")
return s_Q4HKick;
612 if(
name ==
"\"MCBYV.B4R1.B1\"" ||
name ==
"\"MCBYV.B4L1.B2\"")
return s_Q4VKickB;
613 if(
name ==
"\"MCBCH.5R1.B1\"" ||
name ==
"\"MCBCH.5L1.B2\"")
return s_Q5HKick;
614 if(
name ==
"\"MCBCV.6R1.B1\"" ||
name ==
"\"MCBCV.6L1.B2\"")
return s_Q6VKick;
623 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ1Start[(
beam-1)*3],m_Config.pointQ1Start[(
beam-1)*3+1],m_Config.pointQ1Start[(
beam-1)*3+2]);
624 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ1End[(
beam-1)*3],m_Config.pointQ1End[(
beam-1)*3+1],m_Config.pointQ1End[(
beam-1)*3+2]);
625 rotZ = m_Config.fQ1RotZ[
beam-1];
629 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ2aStart[(
beam-1)*3],m_Config.pointQ2aStart[(
beam-1)*3+1],m_Config.pointQ2aStart[(
beam-1)*3+2]);
630 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ2aEnd[(
beam-1)*3],m_Config.pointQ2aEnd[(
beam-1)*3+1],m_Config.pointQ2aEnd[(
beam-1)*3+2]);
631 rotZ = m_Config.fQ2aRotZ[
beam-1];
635 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ2bStart[(
beam-1)*3],m_Config.pointQ2bStart[(
beam-1)*3+1],m_Config.pointQ2bStart[(
beam-1)*3+2]);
636 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ2bEnd[(
beam-1)*3],m_Config.pointQ2bEnd[(
beam-1)*3+1],m_Config.pointQ2bEnd[(
beam-1)*3+2]);
637 rotZ = m_Config.fQ2bRotZ[
beam-1];
641 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ3Start[(
beam-1)*3],m_Config.pointQ3Start[(
beam-1)*3+1],m_Config.pointQ3Start[(
beam-1)*3+2]);
642 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ3End[(
beam-1)*3],m_Config.pointQ3End[(
beam-1)*3+1],m_Config.pointQ3End[(
beam-1)*3+2]);
643 rotZ = m_Config.fQ3RotZ[
beam-1];
646 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ4Start[(
beam-1)*3],m_Config.pointQ4Start[(
beam-1)*3+1],m_Config.pointQ4Start[(
beam-1)*3+2]);
647 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ4End[(
beam-1)*3],m_Config.pointQ4End[(
beam-1)*3+1],m_Config.pointQ4End[(
beam-1)*3+2]);
648 rotZ = m_Config.fQ4RotZ[
beam-1];
651 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ5Start[(
beam-1)*3],m_Config.pointQ5Start[(
beam-1)*3+1],m_Config.pointQ5Start[(
beam-1)*3+2]);
652 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ5End[(
beam-1)*3],m_Config.pointQ5End[(
beam-1)*3+1],m_Config.pointQ5End[(
beam-1)*3+2]);
653 rotZ = m_Config.fQ5RotZ[
beam-1];
656 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ6Start[(
beam-1)*3],m_Config.pointQ6Start[(
beam-1)*3+1],m_Config.pointQ6Start[(
beam-1)*3+2]);
657 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ6End[(
beam-1)*3],m_Config.pointQ6End[(
beam-1)*3+1],m_Config.pointQ6End[(
beam-1)*3+2]);
658 rotZ = m_Config.fQ6RotZ[
beam-1];
662 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ7aStart[(
beam-1)*3],m_Config.pointQ7aStart[(
beam-1)*3+1],m_Config.pointQ7aStart[(
beam-1)*3+2]);
663 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ7aEnd[(
beam-1)*3],m_Config.pointQ7aEnd[(
beam-1)*3+1],m_Config.pointQ7aEnd[(
beam-1)*3+2]);
664 rotZ = m_Config.fQ7aRotZ[
beam-1];
668 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ7bStart[(
beam-1)*3],m_Config.pointQ7bStart[(
beam-1)*3+1],m_Config.pointQ7bStart[(
beam-1)*3+2]);
669 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ7bEnd[(
beam-1)*3],m_Config.pointQ7bEnd[(
beam-1)*3+1],m_Config.pointQ7bEnd[(
beam-1)*3+2]);
670 rotZ = m_Config.fQ7bRotZ[
beam-1];
675 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1aStart[(
beam-1)*3],m_Config.pointD1aStart[(
beam-1)*3+1],m_Config.pointD1aStart[(
beam-1)*3+2]);
676 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1aEnd[(
beam-1)*3],m_Config.pointD1aEnd[(
beam-1)*3+1],m_Config.pointD1aEnd[(
beam-1)*3+2]);
677 rotZ = m_Config.fD1aRotZ[
beam-1];
680 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1bStart[(
beam-1)*3],m_Config.pointD1bStart[(
beam-1)*3+1],m_Config.pointD1bStart[(
beam-1)*3+2]);
681 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1bEnd[(
beam-1)*3],m_Config.pointD1bEnd[(
beam-1)*3+1],m_Config.pointD1bEnd[(
beam-1)*3+2]);
682 rotZ = m_Config.fD1bRotZ[
beam-1];
686 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1cStart[(
beam-1)*3],m_Config.pointD1cStart[(
beam-1)*3+1],m_Config.pointD1cStart[(
beam-1)*3+2]);
687 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1cEnd[(
beam-1)*3],m_Config.pointD1cEnd[(
beam-1)*3+1],m_Config.pointD1cEnd[(
beam-1)*3+2]);
688 rotZ = m_Config.fD1cRotZ[
beam-1];
692 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1dStart[(
beam-1)*3],m_Config.pointD1dStart[(
beam-1)*3+1],m_Config.pointD1dStart[(
beam-1)*3+2]);
693 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1dEnd[(
beam-1)*3],m_Config.pointD1dEnd[(
beam-1)*3+1],m_Config.pointD1dEnd[(
beam-1)*3+2]);
694 rotZ = m_Config.fD1dRotZ[
beam-1];
698 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1eStart[(
beam-1)*3],m_Config.pointD1eStart[(
beam-1)*3+1],m_Config.pointD1eStart[(
beam-1)*3+2]);
699 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1eEnd[(
beam-1)*3],m_Config.pointD1eEnd[(
beam-1)*3+1],m_Config.pointD1eEnd[(
beam-1)*3+2]);
700 rotZ = m_Config.fD1eRotZ[
beam-1];
704 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1fStart[(
beam-1)*3],m_Config.pointD1fStart[(
beam-1)*3+1],m_Config.pointD1fStart[(
beam-1)*3+2]);
705 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1fEnd[(
beam-1)*3],m_Config.pointD1fEnd[(
beam-1)*3+1],m_Config.pointD1fEnd[(
beam-1)*3+2]);
706 rotZ = m_Config.fD1fRotZ[
beam-1];
710 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD2Start[(
beam-1)*3],m_Config.pointD2Start[(
beam-1)*3+1],m_Config.pointD2Start[(
beam-1)*3+2]);
711 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD2End[(
beam-1)*3],m_Config.pointD2End[(
beam-1)*3+1],m_Config.pointD2End[(
beam-1)*3+2]);
712 rotZ = m_Config.fD2RotZ[
beam-1];