CORSIKA add-on package IACT/ATMO:  Version 1.63 (November 2020)
Functions | Variables
io_simtel.c File Reference

Write and read CORSIKA blocks and simulated Cherenkov photon bunches. More...

#include "initial.h"
#include "io_basic.h"
#include "mc_tel.h"
#include "fileopen.h"
Include dependency graph for io_simtel.c:

Functions

int begin_read_tel_array (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int *array)
 Begin reading data for one array of telescopes/detectors. More...
 
int begin_write_tel_array (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int array)
 Begin writing data for one array of telescopes/detectors. More...
 
int clear_shower_extra_parameters (ShowerExtraParam *ep)
 Similar to init_shower_extra_parameters() but without any attempts to re-allocate or resize buffers. More...
 
int end_read_tel_array (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih)
 End reading data for one array of telescopes/detectors. More...
 
int end_write_tel_array (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih)
 End writing data for one array of telescopes/detectors. More...
 
ShowerExtraParamget_shower_extra_parameters ()
 
int init_shower_extra_parameters (ShowerExtraParam *ep, size_t ni_max, size_t nf_max)
 Initialize, resize, clear shower extra parameters. More...
 
int print_atmprof (IO_BUFFER *iobuf)
 Print the atmospheric profile table as used in CORSIKA. More...
 
int print_camera_layout (IO_BUFFER *iobuf)
 Print the layout (pixel positions) of a camera used for converting from photons to photo-electrons in a pixel. More...
 
int print_photo_electrons (IO_BUFFER *iobuf)
 List the the photoelectrons registered in a Cherenkov telescope camera. More...
 
int print_shower_extra_parameters (IO_BUFFER *iobuf)
 
int print_shower_longitudinal (IO_BUFFER *iobuf)
 Print CORSIKA shower longitudinal distributions. More...
 
int print_tel_block (IO_BUFFER *iobuf)
 Print a CORSIKA header/trailer block of any type (see mc_tel.h) More...
 
int print_tel_offset (IO_BUFFER *iobuf)
 Print offsets and weights of randomly scattered arrays with respect to shower core. More...
 
int print_tel_photons (IO_BUFFER *iobuf)
 
int print_tel_pos (IO_BUFFER *iobuf)
 Print positions of telescopes/detectors within a system or array. More...
 
int read_atmprof (IO_BUFFER *iobuf, AtmProf *atmprof)
 Read the atmospheric profile table as used in CORSIKA. More...
 
int read_camera_layout (IO_BUFFER *iobuf, int max_pixels, int *itel, int *type, int *pixels, double *xp, double *yp)
 Read the layout (pixel positions) of a camera used for converting from photons to photo-electrons in a pixel. More...
 
int read_input_lines (IO_BUFFER *iobuf, struct linked_string *list)
 Read a block with several character strings (normally containing the text of the CORSIKA inputs file) into a linked list. More...
 
int read_photo_electrons (IO_BUFFER *iobuf, int max_pixels, int max_pe, int *array, int *tel, int *npe, int *pixels, int *flags, int *pe_counts, int *tstart, double *t, double *a, int *photon_counts)
 Read the photoelectrons registered in a Cherenkov telescope camera. More...
 
int read_shower_extra_parameters (IO_BUFFER *iobuf, ShowerExtraParam *ep)
 
int read_shower_longitudinal (IO_BUFFER *iobuf, int *event, int *type, double *data, int ndim, int *np, int *nthick, double *thickstep, int max_np)
 Read CORSIKA shower longitudinal distributions. More...
 
int read_tel_array_end (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int *array)
 End reading data for one array of telescopes/detectors. More...
 
int read_tel_array_head (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int *array)
 Begin reading data for one array of telescopes/detectors. More...
 
int read_tel_block (IO_BUFFER *iobuf, int type, real *data, int maxlen)
 Read a CORSIKA header/trailer block of given type (see mc_tel.h) More...
 
int read_tel_offset (IO_BUFFER *iobuf, int max_array, int *narray, double *toff, double *xoff, double *yoff)
 Read offsets of randomly scattered arrays with respect to shower core. More...
 
int read_tel_offset_w (IO_BUFFER *iobuf, int max_array, int *narray, double *toff, double *xoff, double *yoff, double *weight)
 Read offsets and weights of randomly scattered arrays with respect to shower core. More...
 
int read_tel_photons (IO_BUFFER *iobuf, int max_bunches, int *array, int *tel, double *photons, struct bunch *bunches, int *nbunches)
 Read bunches of Cherenkov photons for one telescope/detector. More...
 
int read_tel_pos (IO_BUFFER *iobuf, int max_tel, int *ntel, double *x, double *y, double *z, double *r)
 Read positions of telescopes/detectors within a system or array. More...
 
int write_atmprof (IO_BUFFER *iobuf, AtmProf *atmprof)
 Write the atmospheric profile table as used in CORSIKA with ATMEXT option and set up with 'ATMOSPHERE <n> <fref>' or 'IACT ATMOFILE <name>' data cards. More...
 
int write_camera_layout (IO_BUFFER *iobuf, int itel, int type, int pixels, double *xp, double *yp)
 Write the layout (pixel positions) of a camera used for converting from photons to photo-electrons in a pixel. More...
 
int write_input_lines (IO_BUFFER *iobuf, struct linked_string *list)
 Write a linked list of character strings (normally containing the text of the CORSIKA inputs file) as a dedicated block. More...
 
int write_photo_electrons (IO_BUFFER *iobuf, int array, int tel, int npe, int flags, int pixels, int *pe_counts, int *tstart, double *t, double *a, int *photon_counts)
 Write the photo-electrons registered in a Cherenkov telescope camera. More...
 
int write_shower_extra_parameters (IO_BUFFER *iobuf, ShowerExtraParam *ep)
 
int write_shower_longitudinal (IO_BUFFER *iobuf, int event, int type, double *data, int ndim, int np, int nthick, double thickstep)
 Write CORSIKA shower longitudinal distributions. More...
 
int write_tel_array_end (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int array)
 End writing data for one array of telescopes/detectors. More...
 
int write_tel_array_head (IO_BUFFER *iobuf, IO_ITEM_HEADER *ih, int array)
 Begin writing data for one array of telescopes/detectors. More...
 
int write_tel_block (IO_BUFFER *iobuf, int type, int num, real *data, int len)
 Write a CORSIKA block as given type number (see mc_tel.h). More...
 
int write_tel_compact_photons (IO_BUFFER *iobuf, int array, int tel, double photons, struct compact_bunch *cbunches, int nbunches, int ext_bunches, char *ext_fname)
 Write all the photon bunches for one telescope to an I/O buffer. More...
 
int write_tel_offset (IO_BUFFER *iobuf, int narray, double toff, double *xoff, double *yoff)
 Write offsets of randomly scattered arrays with respect to shower core. More...
 
int write_tel_offset_w (IO_BUFFER *iobuf, int narray, double toff, double *xoff, double *yoff, double *weight)
 Write offsets and weights of randomly scattered arrays with respect to shower core. More...
 
int write_tel_photons (IO_BUFFER *iobuf, int array, int tel, double photons, struct bunch *bunches, int nbunches, int ext_bunches, char *ext_fname)
 Write all the photon bunches for one telescope to an I/O buffer. More...
 
int write_tel_pos (IO_BUFFER *iobuf, int ntel, double *x, double *y, double *z, double *r)
 Write positions of telescopes/detectors within a system or array. More...
 

Variables

static int max_print = 0
 Print bunches of Cherenkov photons for one telescope/detector. More...
 
static ShowerExtraParam private_shower_extra_parameters
 There is one global (more precisely: static) block of extra shower parameters as, for example, used in the CORSIKA IACT interface. More...
 

Detailed Description

This file provides functions for writing and reading of CORSIKA header and trailer blocks, positions of telescopes/detectors, lists of simulated Cherenkov photon bunches before any detector simulation for the telescopes as well as of photoelectrons after absorption, telescope ray-tracing and quantum efficiency applied.

Author
Konrad Bernloehr
Date
1997 to 2019
CVS $Date: 2020/11/21 10:56:26 $ 
Version
CVS $Revision: 1.53 $ 

Function Documentation

◆ begin_read_tel_array()

int begin_read_tel_array ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int *  array 
)

Note: this function does not finish reading from the I/O block but after reading of the photons a call to end_read_tel_array() is needed.

Parameters
iobuf– I/O buffer descriptor
ih– I/O item header (for item opened here)
array– Number of array
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ begin_write_tel_array()

int begin_write_tel_array ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int  array 
)

Note: this function does not finish writing to the I/O block but after writing of the photons a call to end_write_tel_array() is needed.

Parameters
iobufI/O buffer descriptor
ihI/O item header (for item opened here)
arrayNumber of array
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ clear_shower_extra_parameters()

int clear_shower_extra_parameters ( ShowerExtraParam ep)

Just clear contents.

Parameters
epPointer to parameter block. A NULL value indicates that the static block is meant.

◆ end_read_tel_array()

int end_read_tel_array ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih 
)
Parameters
iobufI/O buffer descriptor
ihI/O item header (as opened in begin_write_tel_array() )
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ end_write_tel_array()

int end_write_tel_array ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih 
)
Parameters
iobufI/O buffer descriptor
ihI/O item header (as opened in begin_write_tel_array() )
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ init_shower_extra_parameters()

int init_shower_extra_parameters ( ShowerExtraParam ep,
size_t  ni_max,
size_t  nf_max 
)
Parameters
epPointer to parameter block. A NULL value indicates that the static block is meant.
ni_maxThe number of integer parameters to be used.
nf_maxThe number of float parameters to be used.

◆ print_atmprof()

int print_atmprof ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_camera_layout()

int print_camera_layout ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_photo_electrons()

int print_photo_electrons ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_shower_longitudinal()

int print_shower_longitudinal ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_tel_block()

int print_tel_block ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_tel_offset()

int print_tel_offset ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ print_tel_pos()

int print_tel_pos ( IO_BUFFER iobuf)
Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_atmprof()

int read_atmprof ( IO_BUFFER iobuf,
AtmProf atmprof 
)
Parameters
iobufI/O buffer descriptor
atmprofAddress of struct with relevant parts of atmospheric profile table
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_camera_layout()

int read_camera_layout ( IO_BUFFER iobuf,
int  max_pixels,
int *  itel,
int *  type,
int *  pixels,
double *  xp,
double *  yp 
)
Parameters
iobufI/O buffer descriptor
max_pixelsThe maximum number of pixels that can be stored in xp, yp.
iteltelescope number
typecamera type (hex/square)
pixelsnumber of pixels
xpX positions of pixels
ypY position of pixels
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_input_lines()

int read_input_lines ( IO_BUFFER iobuf,
struct linked_string list 
)
Parameters
iobufI/O buffer descriptor
liststarting point of linked list (on first call this should be a link to an empty list, i.e. the first element has text=NULL and next=NULL; on additional calls the new lines will be appended.)
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_photo_electrons()

int read_photo_electrons ( IO_BUFFER iobuf,
int  max_pixels,
int  max_pe,
int *  array,
int *  tel,
int *  npe,
int *  pixels,
int *  flags,
int *  pe_counts,
int *  tstart,
double *  t,
double *  a,
int *  photon_counts 
)
Parameters
iobufI/O buffer descriptor
max_pixelsMaximum number of pixels which can be treated
max_peMaximum number of photo-electrons
arrayArray number
telTelescope number
npeThe total number of photo-electrons read.
pixelsNumber of pixels read.
flagsBit 0: amplitudes available, bit 1: includes NSB p.e.
pe_countsNumbers of photo-electrons in each pixel
tstartOffsets in 't' at which data for each pixel starts
tTime of arrival of photons at the camera.
aAmplitudes of p.e. signals [mean p.e.] (optional, may be NULL).
photon_countsOptional number of photons arriving at a pixel.
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_shower_longitudinal()

int read_shower_longitudinal ( IO_BUFFER iobuf,
int *  event,
int *  type,
double *  data,
int  ndim,
int *  np,
int *  nthick,
double *  thickstep,
int  max_np 
)

See tellng_() in iact.c for more detailed parameter description.

Parameters
iobufI/O buffer descriptor
eventreturn event number
typereturn 1 = particle numbers, 2 = energy, 3 = energy deposits
datareturn set of (usually 9) distributions
ndimmaximum number of entries per distribution
npreturn number of distributions (usually 9)
nthickreturn number of entries actually filled per distribution (is 1 if called without LONGI being enabled).
thickstepreturn step size in g/cm**2
max_npmaximum number of distributions for which we have space.
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_array_end()

int read_tel_array_end ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int *  array 
)
Parameters
iobufI/O buffer descriptor
ihI/O item header (as opened in begin_write_tel_array() )
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_array_head()

int read_tel_array_head ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int *  array 
)

Note: this function does not finish reading from the I/O block but after reading of the photons a call to end_read_tel_array() is needed.

Parameters
iobuf– I/O buffer descriptor
ih– I/O item header (for item opened here)
array– Number of array
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_block()

int read_tel_block ( IO_BUFFER iobuf,
int  type,
real *  data,
int  maxlen 
)
Parameters
iobufI/O buffer descriptor
typeblock type (see mc_tel.h)
dataarea for data to be read
maxlenmaximum number of elements to be read
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_offset()

int read_tel_offset ( IO_BUFFER iobuf,
int  max_array,
int *  narray,
double *  toff,
double *  xoff,
double *  yoff 
)
Parameters
iobufI/O buffer descriptor
max_arrayMaximum number of arrays that can be treated
narrayNumber of arrays of telescopes/detectors
toffTime offset (ns, from first interaction to ground)
xoffX offsets of arrays
yoffY offsets of arrays
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_offset_w()

int read_tel_offset_w ( IO_BUFFER iobuf,
int  max_array,
int *  narray,
double *  toff,
double *  xoff,
double *  yoff,
double *  weight 
)
Parameters
iobufI/O buffer descriptor
max_arrayMaximum number of arrays that can be treated
narrayNumber of arrays of telescopes/detectors
toffTime offset (ns, from first interaction to ground)
xoffX offsets of arrays
yoffY offsets of arrays
weightArea weight for uniform or importance sampled core offset. For old version data (uniformly sampled), 0.0 is returned.
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_photons()

int read_tel_photons ( IO_BUFFER iobuf,
int  max_bunches,
int *  array,
int *  tel,
double *  photons,
struct bunch bunches,
int *  nbunches 
)

The data format may be either the more or less compact one.

Parameters
iobufI/O buffer descriptor
max_bunchesmaximum number of bunches that can be treated
arrayarray number
teltelescope number
photonssum of photons (and fractions) in this device
buncheslist of photon bunches
nbunchesnumber of elements in bunch list
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ read_tel_pos()

int read_tel_pos ( IO_BUFFER iobuf,
int  max_tel,
int *  ntel,
double *  x,
double *  y,
double *  z,
double *  r 
)
Parameters
iobufI/O buffer descriptor
max_telmaximum number of telescopes allowed
ntelnumber of telescopes/detectors
xX positions
yY positions
zZ positions
rradius of spheres including the whole devices
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_atmprof()

int write_atmprof ( IO_BUFFER iobuf,
AtmProf atmprof 
)
Parameters
iobufI/O buffer descriptor
atmprofAddress of struct with relevant parts of atmospheric profile table
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_camera_layout()

int write_camera_layout ( IO_BUFFER iobuf,
int  itel,
int  type,
int  pixels,
double *  xp,
double *  yp 
)
Parameters
iobufI/O buffer descriptor
iteltelescope number
typecamera type (hex/square)
pixelsnumber of pixels
xpX positions of pixels
ypY position of pixels
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_input_lines()

int write_input_lines ( IO_BUFFER iobuf,
struct linked_string list 
)
Parameters
iobufI/O buffer descriptor
liststarting point of linked list
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_photo_electrons()

int write_photo_electrons ( IO_BUFFER iobuf,
int  array,
int  tel,
int  npe,
int  flags,
int  pixels,
int *  pe_counts,
int *  tstart,
double *  t,
double *  a,
int *  photon_counts 
)
Parameters
iobufI/O buffer descriptor
arrayarray number
teltelescope number
npeTotal number of photo-electrons in the camera.
pixelsNo. of pixels to be written
flagsBit 0: save also amplitudes if available, Bit 1: p.e. list includes NSB p.e., bit 2: data also including no. of photons hitting each pixel. bit 3: photons (if any) are in wavelength range 300-550 nm.
pe_countsNumbers of photo-electrons in each pixel
tstartOffsets in 't' at which data for each pixel starts
tTime of arrival of photons at the camera.
aAmplitudes of p.e. signals [mean p.e.] (optional, may be NULL).
photon_countsOptional number of photons arriving at a pixel (with flags bit 2 set)
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_shower_longitudinal()

int write_shower_longitudinal ( IO_BUFFER iobuf,
int  event,
int  type,
double *  data,
int  ndim,
int  np,
int  nthick,
double  thickstep 
)

See tellng_() in iact.c for more detailed parameter description.

Parameters
iobufI/O buffer descriptor
eventevent number
type1 = particle numbers, 2 = energy, 3 = energy deposits
dataset of (usually 9) distributions
ndimmaximum number of entries per distribution
npnumber of distributions (usually 9)
nthicknumber of entries actually filled per distribution (is 1 if called without LONGI being enabled).
thickstepstep size in g/cm**2
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_array_end()

int write_tel_array_end ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int  array 
)
Parameters
iobufI/O buffer descriptor
ihI/O item header (as opened in begin_write_tel_array() )
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_array_head()

int write_tel_array_head ( IO_BUFFER iobuf,
IO_ITEM_HEADER ih,
int  array 
)

Note: this function does not finish writing to the I/O block but after writing of the photons a call to end_write_tel_array() is needed.

Parameters
iobufI/O buffer descriptor
ihI/O item header (for item opened here)
arrayNumber of array
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_block()

int write_tel_block ( IO_BUFFER iobuf,
int  type,
int  num,
real *  data,
int  len 
)
Parameters
iobufI/O buffer descriptor
typeblock type (see mc_tel.h)
numRun or event number depending on type
dataData as passed from CORSIKA
lenNumber of elements to be written
Returns
0 (OK), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_compact_photons()

int write_tel_compact_photons ( IO_BUFFER iobuf,
int  array,
int  tel,
double  photons,
struct compact_bunch cbunches,
int  nbunches,
int  ext_bunches,
char *  ext_fname 
)

Usually, calls to this function for each telescope in an array should be enclosed within calls to begin_write_tel_array() and end_write_tel_array(). This routine writes the more compact format (16 bytes per bunch). The more compact format should usually be used to save memory and disk space.

Parameters
iobufI/O buffer descriptor
arrayarray number
teltelescope number
photonssum of photons (and fractions) in this device
cbuncheslist of photon bunches
nbunchesnumber of elements in bunch list
ext_bunchesnumber of elements in external file
ext_fnamename of external (temporary) file
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_offset()

int write_tel_offset ( IO_BUFFER iobuf,
int  narray,
double  toff,
double *  xoff,
double *  yoff 
)
Parameters
iobufI/O buffer descriptor
narrayNumber of arrays of telescopes/detectors
toffTime offset (ns, from first interaction to ground)
xoffX offsets of arrays
yoffY offsets of arrays
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_offset_w()

int write_tel_offset_w ( IO_BUFFER iobuf,
int  narray,
double  toff,
double *  xoff,
double *  yoff,
double *  weight 
)

With respect to the backwards-compatible non-weights version write_tel_offset(), this version adds a weight to each offset position which should be normalized in such a way that with uniform sampling it should be the area over which showers are thrown divided by the number of array in each shower. With importance sampling the same relation should hold on average. So in either case, the average sum of weights for the different offsets in one shower equals just the area over which cores are randomized. This leaves the possibility to change the number of offsets from shower to shower.

Parameters
iobufI/O buffer descriptor
narrayNumber of arrays of telescopes/detectors
toffTime offset (ns, from first interaction to ground)
xoffX offsets of arrays
yoffY offsets of arrays
weightArea weight for uniform or importance sampled core offset.
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_photons()

int write_tel_photons ( IO_BUFFER iobuf,
int  array,
int  tel,
double  photons,
struct bunch bunches,
int  nbunches,
int  ext_bunches,
char *  ext_fname 
)

Usually, calls to this function for each telescope in an array should be enclosed within calls to begin_write_tel_array() and end_write_tel_array(). This routine writes the less compact format (32 bytes per bunch).

Parameters
iobufI/O buffer descriptor
arrayarray number
teltelescope number
photonssum of photons (and fractions) in this device
buncheslist of photon bunches
nbunchesnumber of elements in bunch list
ext_bunchesnumber of elements in external file
ext_fnamename of external (temporary) file
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ write_tel_pos()

int write_tel_pos ( IO_BUFFER iobuf,
int  ntel,
double *  x,
double *  y,
double *  z,
double *  r 
)
Parameters
iobufI/O buffer descriptor
ntelnumber of telescopes/detectors
xX positions
yY positions
zZ positions
rradius of spheres including the whole devices
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

Variable Documentation

◆ max_print

int max_print = 0
static

The data format may be either the more or less compact one.

Parameters
iobufI/O buffer descriptor
Returns
0 (o.k.), -1, -2, -3 (error, as usual in eventio)

◆ private_shower_extra_parameters

ShowerExtraParam private_shower_extra_parameters
static

Get a pointer to this block.