McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics

McXtrace
site 2

About McXtrace
 Publications
 Project Partners
 Project People
 Goal

Download
 Components

Documentation
 Manual
 Commands
 Wiki (GitHub)
 Tutorial

Mailing list

Links

Search

Code-repository (GitHub)

Report bugs (GitHub)


McXtrace: MCPL_output

[ Identification | Description | Input parameters | Links ]

The MCPL_output Component

Detector-like component that writes photon state parameters into an mcpl-format binary, virtual-source photon file.

Identification

  • Site:
  • Author: Erik B Knudsen
  • Origin: DTU Physics
  • Date: Aug 2016

Description

Detector-like component that writes photon state parameters into an mcpl-format
binary, virtual-source photon file.

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

When used with MPI, the component will output #MPI nodes individual MCPL files that
can be merged using the mcpltool.

MCPL_output allows a few flags to tweak the output files:
1. If use_polarisation is unset (default) the polarisation vector will not be stored (saving space)
2. If doubleprec is unset (default) data will be stored as 32 bit floating points, effectively cutting the output file size in half.
3. Extra information may be attached to each ray in the form of a userflag, a user-defined variable wich is packed into 32 bits. If
the user variable does not fit in 32 bits the value will be truncated and likely garbage. If more than one variable is to be attached to
each photon this must be packed into the 32 bits.

These features are set this way to keep file sizes as manageable as possible.

Example: MCPL_output( filename="voutput", verbose=1, userflag="flag", userflagcomment="Photon Id" )

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
filenamestrName of photon file to write. If not given, the component name will be used.0
weight_mode1weight_mode=1: record initial ray count in MCPL stat:sum entry and rescale particle weights. weight_mode=2: classical (deprecated) mode of outputting particle weights directly.-1
verbose1If 1) Print summary information for created MCPL file. 2) Also print summary of first 10 particles information stored in the MCPL file. >2) Also print information for first 10 particles as they are being stored by McStas0
polarisationuse1Enable storing the polarisation state of the photon.0
doubleprec1Use double precision storage0
userflag1Extra variable to attach to each photon. The value of this variable will be packed into a 32 bit integer.""
userflagcommentstrString variable to describe the userflag. If this string is empty (the default) no userflags will be stored.""
buffermax1Maximal number of events to save ( <= MAXINT), GPU/OpenACC only0
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links


[ Identification | Description | Input parameters | Links ]

Generated on mcxtrace 3.5.32


Last Modified: Tuesday, 17-Jun-2025 20:12:05 CEST
Search website mailinglist archive GitHub repos