Skip to content

Commit

Permalink
Instead of zeroing fcyc outside the cavity, zero the impulse amplitud…
Browse files Browse the repository at this point in the history
…e. So the phase advancement is preserved, but without driving the cavity ring-up.
  • Loading branch information
pslocum committed Jul 25, 2023
1 parent 9c795d6 commit 938eea2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Kassiopeia/LMCFieldCalculator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ namespace locust
double zLocation = tKassParticleXP[2];
double dimZ = fInterface->fField->GetDimL();
double orbitPhase = tKassParticleXP[6]; // radians

double cycFrequency = 0.;
double cycFrequency = tKassParticleXP[7];
double amplitude = 0.;
if (fabs(zLocation) < dimZ/2.) // Check whether the electron is inside the cavity length.
{
cycFrequency = tKassParticleXP[7]; // rad/s
amplitude = 1.;
}

if ( !BypassTF )
Expand All @@ -421,7 +421,7 @@ namespace locust

if (*it != 0.)
{
fFIRBuffer.push_back(cos(orbitPhase));
fFIRBuffer.push_back(amplitude * cos(orbitPhase));
}
else
{
Expand Down

0 comments on commit 938eea2

Please sign in to comment.