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 m_magnets = loadDataFile(
"ForwardRegionMgField/magnets.dat" ,5);
230 ATH_MSG_INFO(
"Using twiss files (" << m_Config.twissFileB1 <<
", " << m_Config.twissFileB2 <<
") as the field settings source");
232 std::string headerB1;
233 std::string headerB2;
235 std::vector<std::vector<std::string> > loadedTwissFileB1 = loadDataFileNLines(m_Config.twissFileB1.c_str(),30,200,headerB1);
236 std::vector<std::vector<std::string> > loadedTwissFileB2 = loadDataFileNLines(m_Config.twissFileB2.c_str(),30,200,headerB2);
239 InitMagDataFromTwiss(loadedTwissFileB1, 1, m_Config.momentum);
242 InitMagDataFromTwiss(loadedTwissFileB2, 2, m_Config.momentum);
260 bool quadrupole =
false;
265 if(m_magnet <= s_Q7) {
274 for(
int i=0;
i < 150;
i++)
277 dipole = (m_magnet == s_D1 && (loadedTwissFile[
i][textIndex] ==
"\"MBXW.A4R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MBXW.A4L1\""))
278 || (m_magnet == s_D2 && (loadedTwissFile[
i][textIndex] ==
"\"MBRC.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MBRC.4L1.B2\""));
280 m_magData[
beam-1] = kLToB(
atof(loadedTwissFile[
i][k0LIndex].c_str()),
atof(loadedTwissFile[
i][lengthIndex].c_str()),
momentum);
285 quadrupole = (m_magnet == s_Q1 && (loadedTwissFile[
i][textIndex] ==
"\"MQXA.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXA.1L1\""))
286 || (m_magnet == s_Q2 && (loadedTwissFile[
i][textIndex] ==
"\"MQXB.A2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXB.A2L1\""))
287 || (m_magnet == s_Q3 && (loadedTwissFile[
i][textIndex] ==
"\"MQXA.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQXA.3L1\""))
288 || (m_magnet == s_Q4 && (loadedTwissFile[
i][textIndex] ==
"\"MQY.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQY.4L1.B2\""))
289 || (m_magnet == s_Q5 && (loadedTwissFile[
i][textIndex] ==
"\"MQML.5R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQML.5L1.B2\""))
290 || (m_magnet == s_Q6 && (loadedTwissFile[
i][textIndex] ==
"\"MQML.6R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQML.6L1.B2\""))
291 || (m_magnet == s_Q7 && (loadedTwissFile[
i][textIndex] ==
"\"MQM.A7R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MQM.A7L1.B2\""));
293 m_magData[
beam-1] = kLToB(
atof(loadedTwissFile[
i][k1LIndex].c_str()),
atof(loadedTwissFile[
i][lengthIndex].c_str()),
momentum);
298 kicker = (m_magnet == s_Q1HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.1L1\""))
299 || (m_magnet == s_Q1VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.1R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.1L1\""))
300 || (m_magnet == s_Q2HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.2L1\""))
301 || (m_magnet == s_Q2VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.2R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.2L1\""))
302 || (m_magnet == s_Q3HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXH.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXH.3L1\""))
303 || (m_magnet == s_Q3VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBXV.3R1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBXV.3L1\""))
304 || (m_magnet == s_Q4VKickA && (loadedTwissFile[
i][textIndex] ==
"\"MCBYV.A4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYV.A4L1.B2\""))
305 || (m_magnet == s_Q4HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBYH.4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYH.4L1.B2\""))
306 || (m_magnet == s_Q4VKickB && (loadedTwissFile[
i][textIndex] ==
"\"MCBYV.B4R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBYV.B4L1.B2\""))
307 || (m_magnet == s_Q5HKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBCH.5R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBCH.5L1.B2\""))
308 || (m_magnet == s_Q6VKick && (loadedTwissFile[
i][textIndex] ==
"\"MCBCV.6R1.B1\"" || loadedTwissFile[
i][textIndex] ==
"\"MCBCV.6L1.B2\""));
312 length =
atof(loadedTwissFile[
i][lengthIndex].c_str()) ?
atof(loadedTwissFile[
i][lengthIndex].c_str()) : 0.001;
327 if(
q == 1) MQXAB = 1;
330 double gradMQX = getMag(
q,
beam);
331 double xOffMQX = getMagXOff(
q);
332 double yOffMQX = getMagYOff(
q);
343 G4ThreeVector B(0,0,0);
349 xstep = (maxMQXA - minMQXA)/(s_rowsMQXA-1);
350 ystep = (maxMQXA - minMQXA)/(s_colsMQXA-1);
353 i2 = ceil(
x/xstep)+ceil(s_rowsMQXA/2.);
354 j2 = ceil(
y/ystep)+ceil(s_colsMQXA/2.);
357 x2 = (i2-ceil(s_rowsMQXA/2.))*xstep;
358 y2 = (
j2-ceil(s_colsMQXA/2.))*ystep;
362 if(x < maxMQXA && x > minMQXA && y < maxMQXA && y > minMQXA)
366 B[0] = B[0]*
pow(-1.0,
beam)*(gradMQX/224.29);
367 B[1] = B[1]*
pow(-1.0,
beam)*(gradMQX/224.29);
375 xstep = (maxMQXB - minMQXB)/(s_rowsMQXB-1);
376 ystep = (maxMQXB - minMQXB)/(s_colsMQXB-1);
378 i2 = ceil(
x/xstep)+ceil(s_rowsMQXB/2);
379 j2 = ceil(
y/ystep)+ceil(s_colsMQXB/2);
382 x2 = (i2-ceil(s_rowsMQXB/2))*xstep;
383 y2 = (
j2-ceil(s_colsMQXB/2))*ystep;
387 if(x < maxMQXB && x > minMQXB && y < maxMQXB && y > minMQXB)
391 B[0] = B[0]*
pow(-1.0,
beam)*(gradMQX/216.1787104);
392 B[1] = B[1]*
pow(-1.0,
beam)*(gradMQX/216.1787104);
400 if(m_magDataType == 1)
return m_magData[
beam-1];
401 return atof(m_magnets[magnet][
beam].c_str());
407 return G4ThreeVector(0,0,0);
412 if(m_magDataType == 1)
return m_magData[2];
418 if(m_magDataType == 1)
return m_magData[3];
425 std::vector<std::vector<std::string> > loadedData;
434 LogStream <<
MSG::DEBUG <<
"File " <<
fileName <<
" not found in run directory, trying to load it from DATAPATH" <<
endmsg;
443 std::vector<std::string>
row (
cols);
447 bool unlimited =
false;
448 if(
N==0) unlimited =
true;
450 while(
file.get(
c) && (
i <
N || unlimited))
452 if(
c !=
'@' &&
c !=
'#' &&
c !=
'*' &&
c !=
'$' &&
c !=
'%' &&
c!=
'\n')
459 loadedData.push_back(
row);
460 file.ignore(1024,
'\n');
465 file.getline(temp,1024);
472 file.getline(temp,1024);
474 header.append(
" PosXStart");
475 header.append(
" PosYStart");
476 header.append(
" PosZStart");
477 header.append(
" PosXEnd ");
478 header.append(
" PosYEnd ");
479 header.append(
" PosZEnd ");
486 file.getline(temp,1024);
498 file.ignore(1024,
'\n');
528 HepGeom::Point3D<double> pointMagStart;
529 HepGeom::Point3D<double> pointMagEnd;
535 LogStream << MSG::ERROR <<
"Unable to write to " <<
fileName.str() <<
endmsg;
540 int fileSize = loadedTwissFile.size();
542 for(
int i=0;
i < fileSize;
i++)
544 rowSize = loadedTwissFile[
i].size();
545 for(
int j=0; j<rowSize; j++)
547 if(j < 3)
file << std::left;
548 else file << std::right;
549 file << std::setw(20) << loadedTwissFile[
i][j];
551 magID = getMagNumFromName(loadedTwissFile[
i][0]);
554 Point.set(0,0,PointZ);
555 getMagnetTransformParams(
beam, magID,
Point, pointMagStart, pointMagEnd, rotZ);
562 file << std::setw(20) << rotZ;
565 file << std::setw(20) << 0;
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;
583 if (
name ==
"\"MBXW.A4R1\"" ||
name ==
"\"MBXW.A4L1\"")
return s_D1;
584 if (
name ==
"\"MBXW.B4R1\"" ||
name ==
"\"MBXW.B4L1\"")
return s_D1;
585 if (
name ==
"\"MBXW.C4R1\"" ||
name ==
"\"MBXW.C4L1\"")
return s_D1;
586 if (
name ==
"\"MBXW.D4R1\"" ||
name ==
"\"MBXW.D4L1\"")
return s_D1;
587 if (
name ==
"\"MBXW.E4R1\"" ||
name ==
"\"MBXW.E4L1\"")
return s_D1;
588 if (
name ==
"\"MBXW.F4R1\"" ||
name ==
"\"MBXW.F4L1\"")
return s_D1;
589 if (
name ==
"\"MBRC.4R1.B1\"" ||
name ==
"\"MBRC.4L1.B2\"")
return s_D2;
592 if(
name ==
"\"MQXA.1R1\"" ||
name ==
"\"MQXA.1L1\"")
return s_Q1;
593 if(
name ==
"\"MQXB.A2R1\"" ||
name ==
"\"MQXB.A2L1\"")
return s_Q2;
594 if(
name ==
"\"MQXB.B2R1\"" ||
name ==
"\"MQXB.B2L1\"")
return s_Q2;
595 if(
name ==
"\"MQXA.3R1\"" ||
name ==
"\"MQXA.3L1\"")
return s_Q3;
596 if(
name ==
"\"MQY.4R1.B1\"" ||
name ==
"\"MQY.4L1.B2\"")
return s_Q4;
597 if(
name ==
"\"MQML.5R1.B1\"" ||
name ==
"\"MQML.5L1.B2\"")
return s_Q5;
598 if(
name ==
"\"MQML.6R1.B1\"" ||
name ==
"\"MQML.6L1.B2\"")
return s_Q6;
599 if(
name ==
"\"MQM.A7R1.B1\"" ||
name ==
"\"MQM.A7L1.B2\"")
return s_Q7;
600 if(
name ==
"\"MQM.B7R1.B1\"" ||
name ==
"\"MQM.B7L1.B2\"")
return s_Q7;
603 if(
name ==
"\"MCBXH.1R1\"" ||
name ==
"\"MCBXH.1L1\"")
return s_Q1HKick;
604 if(
name ==
"\"MCBXV.1R1\"" ||
name ==
"\"MCBXV.1L1\"")
return s_Q1VKick;
605 if(
name ==
"\"MCBXH.2R1\"" ||
name ==
"\"MCBXH.2L1\"")
return s_Q2HKick;
606 if(
name ==
"\"MCBXV.2R1\"" ||
name ==
"\"MCBXV.2L1\"")
return s_Q2VKick;
607 if(
name ==
"\"MCBXH.3R1\"" ||
name ==
"\"MCBXH.3L1\"")
return s_Q3HKick;
608 if(
name ==
"\"MCBXV.3R1\"" ||
name ==
"\"MCBXV.3L1\"")
return s_Q3VKick;
609 if(
name ==
"\"MCBYV.A4R1.B1\"" ||
name ==
"\"MCBYV.A4L1.B2\"")
return s_Q4VKickA;
610 if(
name ==
"\"MCBYH.4R1.B1\"" ||
name ==
"\"MCBYH.4L1.B2\"")
return s_Q4HKick;
611 if(
name ==
"\"MCBYV.B4R1.B1\"" ||
name ==
"\"MCBYV.B4L1.B2\"")
return s_Q4VKickB;
612 if(
name ==
"\"MCBCH.5R1.B1\"" ||
name ==
"\"MCBCH.5L1.B2\"")
return s_Q5HKick;
613 if(
name ==
"\"MCBCV.6R1.B1\"" ||
name ==
"\"MCBCV.6L1.B2\"")
return s_Q6VKick;
622 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ1Start[(
beam-1)*3],m_Config.pointQ1Start[(
beam-1)*3+1],m_Config.pointQ1Start[(
beam-1)*3+2]);
623 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ1End[(
beam-1)*3],m_Config.pointQ1End[(
beam-1)*3+1],m_Config.pointQ1End[(
beam-1)*3+2]);
624 rotZ = m_Config.fQ1RotZ[
beam-1];
628 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ2aStart[(
beam-1)*3],m_Config.pointQ2aStart[(
beam-1)*3+1],m_Config.pointQ2aStart[(
beam-1)*3+2]);
629 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ2aEnd[(
beam-1)*3],m_Config.pointQ2aEnd[(
beam-1)*3+1],m_Config.pointQ2aEnd[(
beam-1)*3+2]);
630 rotZ = m_Config.fQ2aRotZ[
beam-1];
634 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ2bStart[(
beam-1)*3],m_Config.pointQ2bStart[(
beam-1)*3+1],m_Config.pointQ2bStart[(
beam-1)*3+2]);
635 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ2bEnd[(
beam-1)*3],m_Config.pointQ2bEnd[(
beam-1)*3+1],m_Config.pointQ2bEnd[(
beam-1)*3+2]);
636 rotZ = m_Config.fQ2bRotZ[
beam-1];
640 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ3Start[(
beam-1)*3],m_Config.pointQ3Start[(
beam-1)*3+1],m_Config.pointQ3Start[(
beam-1)*3+2]);
641 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ3End[(
beam-1)*3],m_Config.pointQ3End[(
beam-1)*3+1],m_Config.pointQ3End[(
beam-1)*3+2]);
642 rotZ = m_Config.fQ3RotZ[
beam-1];
645 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ4Start[(
beam-1)*3],m_Config.pointQ4Start[(
beam-1)*3+1],m_Config.pointQ4Start[(
beam-1)*3+2]);
646 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ4End[(
beam-1)*3],m_Config.pointQ4End[(
beam-1)*3+1],m_Config.pointQ4End[(
beam-1)*3+2]);
647 rotZ = m_Config.fQ4RotZ[
beam-1];
650 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ5Start[(
beam-1)*3],m_Config.pointQ5Start[(
beam-1)*3+1],m_Config.pointQ5Start[(
beam-1)*3+2]);
651 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ5End[(
beam-1)*3],m_Config.pointQ5End[(
beam-1)*3+1],m_Config.pointQ5End[(
beam-1)*3+2]);
652 rotZ = m_Config.fQ5RotZ[
beam-1];
655 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ6Start[(
beam-1)*3],m_Config.pointQ6Start[(
beam-1)*3+1],m_Config.pointQ6Start[(
beam-1)*3+2]);
656 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ6End[(
beam-1)*3],m_Config.pointQ6End[(
beam-1)*3+1],m_Config.pointQ6End[(
beam-1)*3+2]);
657 rotZ = m_Config.fQ6RotZ[
beam-1];
661 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ7aStart[(
beam-1)*3],m_Config.pointQ7aStart[(
beam-1)*3+1],m_Config.pointQ7aStart[(
beam-1)*3+2]);
662 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ7aEnd[(
beam-1)*3],m_Config.pointQ7aEnd[(
beam-1)*3+1],m_Config.pointQ7aEnd[(
beam-1)*3+2]);
663 rotZ = m_Config.fQ7aRotZ[
beam-1];
667 pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ7bStart[(
beam-1)*3],m_Config.pointQ7bStart[(
beam-1)*3+1],m_Config.pointQ7bStart[(
beam-1)*3+2]);
668 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ7bEnd[(
beam-1)*3],m_Config.pointQ7bEnd[(
beam-1)*3+1],m_Config.pointQ7bEnd[(
beam-1)*3+2]);
669 rotZ = m_Config.fQ7bRotZ[
beam-1];
674 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1aStart[(
beam-1)*3],m_Config.pointD1aStart[(
beam-1)*3+1],m_Config.pointD1aStart[(
beam-1)*3+2]);
675 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1aEnd[(
beam-1)*3],m_Config.pointD1aEnd[(
beam-1)*3+1],m_Config.pointD1aEnd[(
beam-1)*3+2]);
676 rotZ = m_Config.fD1aRotZ[
beam-1];
679 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1bStart[(
beam-1)*3],m_Config.pointD1bStart[(
beam-1)*3+1],m_Config.pointD1bStart[(
beam-1)*3+2]);
680 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1bEnd[(
beam-1)*3],m_Config.pointD1bEnd[(
beam-1)*3+1],m_Config.pointD1bEnd[(
beam-1)*3+2]);
681 rotZ = m_Config.fD1bRotZ[
beam-1];
685 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1cStart[(
beam-1)*3],m_Config.pointD1cStart[(
beam-1)*3+1],m_Config.pointD1cStart[(
beam-1)*3+2]);
686 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1cEnd[(
beam-1)*3],m_Config.pointD1cEnd[(
beam-1)*3+1],m_Config.pointD1cEnd[(
beam-1)*3+2]);
687 rotZ = m_Config.fD1cRotZ[
beam-1];
691 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1dStart[(
beam-1)*3],m_Config.pointD1dStart[(
beam-1)*3+1],m_Config.pointD1dStart[(
beam-1)*3+2]);
692 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1dEnd[(
beam-1)*3],m_Config.pointD1dEnd[(
beam-1)*3+1],m_Config.pointD1dEnd[(
beam-1)*3+2]);
693 rotZ = m_Config.fD1dRotZ[
beam-1];
697 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1eStart[(
beam-1)*3],m_Config.pointD1eStart[(
beam-1)*3+1],m_Config.pointD1eStart[(
beam-1)*3+2]);
698 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1eEnd[(
beam-1)*3],m_Config.pointD1eEnd[(
beam-1)*3+1],m_Config.pointD1eEnd[(
beam-1)*3+2]);
699 rotZ = m_Config.fD1eRotZ[
beam-1];
703 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1fStart[(
beam-1)*3],m_Config.pointD1fStart[(
beam-1)*3+1],m_Config.pointD1fStart[(
beam-1)*3+2]);
704 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1fEnd[(
beam-1)*3],m_Config.pointD1fEnd[(
beam-1)*3+1],m_Config.pointD1fEnd[(
beam-1)*3+2]);
705 rotZ = m_Config.fD1fRotZ[
beam-1];
709 pointMagStart = HepGeom::Point3D<double>(m_Config.pointD2Start[(
beam-1)*3],m_Config.pointD2Start[(
beam-1)*3+1],m_Config.pointD2Start[(
beam-1)*3+2]);
710 pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD2End[(
beam-1)*3],m_Config.pointD2End[(
beam-1)*3+1],m_Config.pointD2End[(
beam-1)*3+2]);
711 rotZ = m_Config.fD2RotZ[
beam-1];