6 void GeoStraightAccSection::Clockwork::buildSmallCache()
9 r2 = std::make_unique<Rep2>();
12 for (
int i=0;
i<14;
i++) {
13 r2->halfLength[
i] = 0;
14 r2->transfunction[
i].reset();
19 void GeoStraightAccSection::Clockwork::fillFastCache (Rep1& rep1)
const
21 for (
int i=0;
i<1024;
i++) {
22 for (
int j=0;j<14; j++) {
24 rep1.xcent[
i][j] = XF(0,3);
25 rep1.ycent[
i][j] = XF(1,3);
26 rep1.cosu [
i][j] = -XF(0,1);
27 rep1.sinu [
i][j] = XF(0,2);
28 rep1.halfLength[
i][j]=
r2->halfLength[j];
36 return m_c->getWritableFastCache().xcent[stackid][cellid];
40 return m_c->getWritableFastCache().ycent[stackid][cellid];
44 return m_c->getWritableFastCache().cosu[stackid][cellid];
48 return m_c->getWritableFastCache().sinu[stackid][cellid];
52 return m_c->getWritableFastCache().halfLength[stackid][cellid];
57 m_c->getWritableSmallCache().halfLength[stackid]=halfLength;
61 m_c->getWritableSmallCache().transfunction[stackid] =
62 std::unique_ptr<GeoXF::Function> (
f.clone());