Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 5e10c634 authored by Philippe Ganz's avatar Philippe Ganz
Browse files

OPAL-Maps: Slicing parameter for Quadrupole

parent f123c55d
No related branches found
No related tags found
1 merge request!37Opal maps
...@@ -161,6 +161,15 @@ void Multipole::setSkewComponent(int n, double v, double vError) { ...@@ -161,6 +161,15 @@ void Multipole::setSkewComponent(int n, double v, double vError) {
} }
} }
inline
void Multipole::setNSlices(const unsigned int& nSlices) { // Philippe was here
nSlices_m = nSlices;
}
unsigned int Multipole::getNSlices() const { // Philippe was here
return nSlices_m;
}
//ff //ff
// radial focussing term // radial focussing term
void Multipole::addKR(int i, double t, Vector_t &K) { void Multipole::addKR(int i, double t, Vector_t &K) {
......
...@@ -96,6 +96,10 @@ public: ...@@ -96,6 +96,10 @@ public:
size_t getMaxNormalComponentIndex() const; size_t getMaxNormalComponentIndex() const;
size_t getMaxSkewComponentIndex() const; size_t getMaxSkewComponentIndex() const;
void setNSlices(const unsigned int& nSlices); // Philippe was here
unsigned int getNSlices() const; // Philippe was here
bool isFocusing(unsigned int component) const; bool isFocusing(unsigned int component) const;
...@@ -137,6 +141,7 @@ private: ...@@ -137,6 +141,7 @@ private:
std::vector<double> SkewComponentErrors; std::vector<double> SkewComponentErrors;
int max_SkewComponent_m; int max_SkewComponent_m;
int max_NormalComponent_m; int max_NormalComponent_m;
unsigned int nSlices_m; // Philippe was here
}; };
inline inline
...@@ -159,4 +164,4 @@ size_t Multipole::getMaxSkewComponentIndex() const { ...@@ -159,4 +164,4 @@ size_t Multipole::getMaxSkewComponentIndex() const {
return SkewComponents.size(); return SkewComponents.size();
} }
#endif // CLASSIC_Multipole_HH #endif // CLASSIC_Multipole_HH
\ No newline at end of file
...@@ -51,11 +51,16 @@ OpalQuadrupole::OpalQuadrupole(): ...@@ -51,11 +51,16 @@ OpalQuadrupole::OpalQuadrupole():
itsAttr[DK1S] = Attributes::makeReal itsAttr[DK1S] = Attributes::makeReal
("DK1S", "Normalised skew quadrupole coefficient error in m^(-2)"); ("DK1S", "Normalised skew quadrupole coefficient error in m^(-2)");
itsAttr[NSLICES] = Attributes::makeReal
("NSLICES",
"The number of slices/ steps for this element in Map Tracking", 1); //Philippe here
registerRealAttribute("K1"); registerRealAttribute("K1");
registerRealAttribute("DK1"); registerRealAttribute("DK1");
registerRealAttribute("K1S"); registerRealAttribute("K1S");
registerRealAttribute("DK1S"); registerRealAttribute("DK1S");
registerRealAttribute("NSLICES"); //Philippe here
registerOwnership(); registerOwnership();
...@@ -147,6 +152,7 @@ void OpalQuadrupole::update() { ...@@ -147,6 +152,7 @@ void OpalQuadrupole::update() {
quad->setField(field); quad->setField(field);
quad->setNormalComponent(2, Attributes::getReal(itsAttr[K1]), Attributes::getReal(itsAttr[DK1])); quad->setNormalComponent(2, Attributes::getReal(itsAttr[K1]), Attributes::getReal(itsAttr[DK1]));
quad->setSkewComponent(2, Attributes::getReal(itsAttr[K1S]), Attributes::getReal(itsAttr[DK1S])); quad->setSkewComponent(2, Attributes::getReal(itsAttr[K1S]), Attributes::getReal(itsAttr[DK1S]));
//quad->setNSlices(Attributes::getReal(itsAttr[NSLICES]));
if(itsAttr[PARTICLEMATTERINTERACTION] && parmatint_m == NULL) { if(itsAttr[PARTICLEMATTERINTERACTION] && parmatint_m == NULL) {
parmatint_m = (ParticleMatterInteraction::find(Attributes::getString(itsAttr[PARTICLEMATTERINTERACTION])))->clone(getOpalName() + std::string("_parmatint")); parmatint_m = (ParticleMatterInteraction::find(Attributes::getString(itsAttr[PARTICLEMATTERINTERACTION])))->clone(getOpalName() + std::string("_parmatint"));
...@@ -156,4 +162,4 @@ void OpalQuadrupole::update() { ...@@ -156,4 +162,4 @@ void OpalQuadrupole::update() {
// Transmit "unknown" attributes. // Transmit "unknown" attributes.
OpalElement::updateUnknown(quad); OpalElement::updateUnknown(quad);
} }
\ No newline at end of file
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
DK1, // The normal quadupole coefficient error. DK1, // The normal quadupole coefficient error.
K1S, // The skew quadrupole coefficient. K1S, // The skew quadrupole coefficient.
DK1S, // The skew quadrupole coefficient error. DK1S, // The skew quadrupole coefficient error.
NSLICES, // The number of slices / steps per element for map tracking //Philippe here
SIZE SIZE
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment