McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


The MCPL_input_once McStas Component

15.17  The MCPL_input_once McStas Component

Source-like component that reads neutron state parameters from a MCPL-file one time.

Identification

  • Author: Gregory S Tucker

  • Origin: European Spallation Source ERIC

  • Date: Sep 2024, reduced to an INHERIT of MCPL_input Oct 2026

Description

Source-like component that reads neutron state parameters from a MCPL-file one time.

Since Oct 2026 MCPL_input_once is MCPL_input with repeat_count=1 (and the default replicate_across_processes=0) forced: the file is shared between MPI processes and every event in the file is used exactly once. The parameters are inherited from MCPL_input; repeat_count and replicate_across_processes are ignored. See MCPL_input for the full documentation.

MCPL is short for Monte Carlo Particle List, and is a format for sharing events between e.g. MCNP(X), Geant4 and McStas.

When used with MPI, the file contents are shared between workers with each accessing approximately (#events in the file) / (#MPI nodes)

Example: MCPL_input_once(filename=voutput,v_smear=0.1,pos_smear=0.001,dir_smear=0.01)

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

Links

  • Component source code found in file MCPL_input_once.comp.

Input parameters

MCPL_input_once is defined as DEFINE COMPONENT MCPL_input_once INHERIT MCPL_input and takes the input parameters of MCPL_input (see the Misc chapter), but forces repeat_count=1 and replicate_across_processes=0: each event in the MCPL file is used exactly once, also when running with MPI. Use MCPL_input in new instruments.


Last Modified: Friday, 23-Oct-2026 18:32:09 CEST
Search website mailinglist archive GitHub repos