OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
CavityAutophaser Class Reference

#include <CavityAutophaser.h>

Collaboration diagram for CavityAutophaser:

Public Member Functions

 CavityAutophaser (const PartData &ref, std::shared_ptr< Component > cavity)
 ~CavityAutophaser ()
double getPhaseAtMaxEnergy (const Vector_t &R, const Vector_t &P, double t, double dt)

Private Member Functions

double guessCavityPhase (double t)
std::pair< double, double > optimizeCavityPhase (double initialGuess, double t, double dt)
double track (double t, const double dt, const double phase, std::ofstream *out=nullptr) const

Private Attributes

const PartDataitsReference_m
std::shared_ptr< ComponentitsCavity_m
Vector_t initialR_m
Vector_t initialP_m

Detailed Description

Definition at line 28 of file CavityAutophaser.h.

Constructor & Destructor Documentation

◆ CavityAutophaser()

CavityAutophaser::CavityAutophaser ( const PartData & ref,
std::shared_ptr< Component > cavity )

Definition at line 38 of file CavityAutophaser.cpp.

References initialR_m, itsCavity_m, and itsReference_m.

◆ ~CavityAutophaser()

CavityAutophaser::~CavityAutophaser ( )

Definition at line 48 of file CavityAutophaser.cpp.

Member Function Documentation

◆ getPhaseAtMaxEnergy()

◆ guessCavityPhase()

double CavityAutophaser::guessCavityPhase ( double t)
private

Definition at line 204 of file CavityAutophaser.cpp.

References Units::eV2MeV, RFCavity::getAutoPhaseEstimate(), RFCavity::getAutophaseVeto(), Util::getKineticEnergy(), RFCavity::getPhasem(), initialP_m, itsCavity_m, itsReference_m, and Physics::two_pi.

Referenced by getPhaseAtMaxEnergy().

Here is the call graph for this function:

◆ optimizeCavityPhase()

std::pair< double, double > CavityAutophaser::optimizeCavityPhase ( double initialGuess,
double t,
double dt )
private

Definition at line 223 of file CavityAutophaser.cpp.

References Options::autoPhase, RFCavity::getAutophaseVeto(), RFCavity::getFrequencym(), RFCavity::getPhasem(), itsCavity_m, Physics::pi, track(), and Physics::two_pi.

Referenced by getPhaseAtMaxEnergy().

Here is the call graph for this function:

◆ track()

double CavityAutophaser::track ( double t,
const double dt,
const double phase,
std::ofstream * out = nullptr ) const
private

Definition at line 292 of file CavityAutophaser.cpp.

References Units::eV2MeV, Util::getKineticEnergy(), RFCavity::getPhasem(), initialP_m, itsCavity_m, itsReference_m, RFCavity::setPhasem(), and RFCavity::trackOnAxisParticle().

Referenced by getPhaseAtMaxEnergy(), and optimizeCavityPhase().

Here is the call graph for this function:

Member Data Documentation

◆ initialP_m

Vector_t CavityAutophaser::initialP_m
private

Definition at line 55 of file CavityAutophaser.h.

Referenced by getPhaseAtMaxEnergy(), guessCavityPhase(), and track().

◆ initialR_m

Vector_t CavityAutophaser::initialR_m
private

Definition at line 54 of file CavityAutophaser.h.

Referenced by CavityAutophaser(), and getPhaseAtMaxEnergy().

◆ itsCavity_m

std::shared_ptr<Component> CavityAutophaser::itsCavity_m
private

◆ itsReference_m

const PartData& CavityAutophaser::itsReference_m
private

Definition at line 51 of file CavityAutophaser.h.

Referenced by CavityAutophaser(), getPhaseAtMaxEnergy(), guessCavityPhase(), and track().


The documentation for this class was generated from the following files: