/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* This file is distributed subject to a Software License Agreement found
* in the file LICENSE that is included with this distribution. 
\*************************************************************************/

typedef struct {
  double *x, *y, *z, *u, *v, *w, *weight, *en, *t;
  int32_t *particle, *sample;
  int32_t length, i;
  char *particleName;
} BUFFER_ARRAY;

/* one BUFFER_ARRAY_GROUP structure per region */
typedef struct {
  BUFFER_ARRAY **particleType;
} BUFFER_ARRAY_GROUP;

typedef struct {
  char *label;
  char *material;
  long materialCode;
  char *shape; /* cylinder or block */
  char *axialDirectionName;
  int32_t axialDirection;
  double Density;
  double x_lo, x_up, y_lo, y_up, r_lo, r_up, z_lo, z_up;    /* in units of cm */
  int32_t ixlo, ixup, iylo, iyup, irlo, irup, izlo, izup;
  double xMidpoint, yMidpoint, rMidpoint, zMidpoint, Volume;
  double Bx, By, Bz;     /* units of Tesla */
  double Ex, Ey, Ez;     /* units of V/m */
  double photonEnergyCutoff;
  double leptonEnergyCutoff;
  int32_t split;
  double minimumWeight;
  double maximumDeltaE;
  BUFFER_ARRAY_GROUP *bufferArrayGroup;
  SDDS_DATASET *page;
  double electronPathLength;
  double positronPathLength;
  double photonPathLength;
  double electronPathLengthEnergyCutoff;
  double positronPathLengthEnergyCutoff;
  double photonPathLengthEnergyCutoff;
} REGION;     
