GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
gear::MaterialMap Class Reference

Material map using GearDistanceProperties. More...

#include <MaterialMap.h>

Public Member Functions

 MaterialMap (GearMgr *gearMgr, double xmin, double xmax, int nxsteps, double ymin, double ymax, int nysteps, double zmin, double zmax, int nzsteps, int coord)
 Should be called through the MaterialMapFactory! Creating a material map in memory. More...
 
virtual ~MaterialMap ()
 Destructor.
 
double getInteractionLength (double x, double y, double z) const
 Returns the interaction length from the vertex at (0,0,0) to (x,y,z) using a distance wheighted interpolation of the neighbouring grid point values.
 
double getRadiationLength (double x, double y, double z) const
 Returns the radiation length from the vertex at (0,0,0) to (x,y,z) using a distance wheighted interpolation of the neighbouring grid point values.
 

Static Public Attributes

static const int CARTESIAN = 0
 coord=0 : CARTESIAN (x,y,z)
 
static const int CYLINDRICAL = 1
 coord=1 : CYLINDRICAL (r,phi,z)
 
static const int SPHERICAL = 2
 coord=2 : SPERICAL (r,theta,phi)
 

Protected Member Functions

void calculateGridIndex (std::vector< int > &gpos, double x, double y, double z) const
 
void interpolateOnGrid (std::pair< double, double > &result, double x, double y, double z) const
 

Protected Attributes

double _xmin {}
 
double _xmax {}
 
int _nxsteps {}
 
double _ymin {}
 
double _ymax {}
 
int _nysteps {}
 
double _zmin {}
 
double _zmax {}
 
int _nzsteps {}
 
double _xstep {}
 
double _ystep {}
 
double _zstep {}
 
std::pair< double, double > _values {}
 
std::vector< std::vector
< std::vector< std::pair
< double, double > > > > 
_myMap {}
 

Detailed Description

Material map using GearDistanceProperties.

Author
A. Muennich, CERN
Version
$Id$

Definition at line 16 of file MaterialMap.h.

Constructor & Destructor Documentation

gear::MaterialMap::MaterialMap ( GearMgr gearMgr,
double  xmin,
double  xmax,
int  nxsteps,
double  ymin,
double  ymax,
int  nysteps,
double  zmin,
double  zmax,
int  nzsteps,
int  coord 
)

Should be called through the MaterialMapFactory! Creating a material map in memory.

Three coordinate systems are supported: coord=0 : CARTESIAN (x,y,z) coord=1 : CYLINDRICAL (r,phi,z) with r>0, 0<phi<2Pi coord=2 : SPERICAL (r,theta,phi) with r>0, 0<theta<Pi 0<phi<2Pi With the vector grid containing min and max (the beginning and the end of the map) and the number of steps that defines the granularity of the map.

Definition at line 11 of file MaterialMap.cc.

References CARTESIAN, CYLINDRICAL, gear::GearMgr::getDistanceProperties(), gear::GearDistanceProperties::getNIntlen(), gear::GearDistanceProperties::getNRadlen(), and SPHERICAL.


The documentation for this class was generated from the following files: