Commit 3f0bdc0a authored by kraus's avatar kraus
Browse files

get rid of shift in transverse direction if type of monitor is temporal

parent fdb171eb
......@@ -116,9 +116,12 @@ bool Monitor::applyToReferenceParticle(const Vector_t &R,
for (unsigned int i = 0; i < localNum; ++ i) {
const double recpgamma = Physics::c * dt / Util::getGamma(RefPartBunch_m->P[i]);
lossDs_m->addParticle(RefPartBunch_m->R[i] + frac * RefPartBunch_m->P[i] * recpgamma - halfLength_s,
RefPartBunch_m->P[i], RefPartBunch_m->ID[i],
time, 0);
Vector_t shift = frac * recpgamma * RefPartBunch_m->P[i] - Vector_t(0, 0, middle);
lossDs_m->addParticle(RefPartBunch_m->R[i] + shift,
RefPartBunch_m->P[i],
RefPartBunch_m->ID[i],
time,
0);
}
OpalData::OPENMODE openMode;
if (numPassages_m > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment