  Purpose: A Monte Carlo (MC) beam model and its implementation in a clinical
treatment planning system (TPS, Varian Eclipse) are presented for a modified
ultra-high dose-rate electron FLASH radiotherapy (eFLASH-RT) LINAC.
  Methods: The gantry head without scattering foils or targets, representative
of the LINAC modifications, was modelled in Geant4. The energy spectrum
({\sigma}E) and beam source emittance cone angle ({\theta}cone) were varied to
match the calculated and Gafchromic film measured central-axis percent depth
dose (PDD) and lateral profiles. Its Eclipse configuration was validated with
measured profiles of the open field and nominal fields for clinical
applicators. eFLASH-RT plans were MC forward calculated in Geant4 for a mouse
brain treatment and compared to a conventional (Conv-RT) plan in Eclipse for a
human patient with metastatic renal cell carcinoma.
  Results: The beam model and its Eclipse configuration agreed best with
measurements at {\sigma}E=0.5 MeV and {\theta}cone=3.9+/-0.2 degrees to
clinically acceptable accuracy (the absolute average error was within 1.5% for
in-water lateral, 3% for in-air lateral, and 2% for PDD). The forward dose
calculation showed dose was delivered to the entire mouse brain with adequate
conformality. The human patient case demonstrated the planning capability with
routine accessories in relatively complex geometry to achieve an acceptable
plan (90% of the tumor volume receiving 95% and 90% of the prescribed dose for
eFLASH and Conv-RT, respectively).
  Conclusion: To the best of our knowledge, this is the first functional beam
model commissioned in a clinical TPS for eFLASH-RT, enabling planning and
evaluation with minimal deviation from Conv-RT workflow. It facilitates the
clinical translation as eFLASH-RT and Conv-RT plan quality were comparable for
a human patient. The methods can be expanded to model other eFLASH irradiators.
