Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4GMocrenFileCTtoDensityMap Class Reference

#include <G4GMocrenFileCTtoDensityMap.hh>

Public Member Functions

 G4GMocrenFileCTtoDensityMap ()
 
 ~G4GMocrenFileCTtoDensityMap ()
 
G4int GetMinCT () const
 
G4int GetMaxCT () const
 
G4double GetDensity (G4int &_ct) const
 

Protected Attributes

G4int kCTMinMax [2]
 
G4doublekDensity
 
G4int kSize
 

Detailed Description

Definition at line 39 of file G4GMocrenFileCTtoDensityMap.hh.

Constructor & Destructor Documentation

G4GMocrenFileCTtoDensityMap::G4GMocrenFileCTtoDensityMap ( )

Definition at line 645 of file G4GMocrenFileCTtoDensityMap.cc.

646  : kDensity(NULL) {
647 
648  kCTMinMax[0] = -1024;
649  kCTMinMax[1] = 2048;
650  kSize = kCTMinMax[1] - kCTMinMax[0] + 1;
651  kDensity = new G4double[kSize];
652  for(int i = 0; i < kSize; i++) {
654  }
655 }
G4double GMocrenFileCTDensMap[]
double G4double
Definition: G4Types.hh:76
G4GMocrenFileCTtoDensityMap::~G4GMocrenFileCTtoDensityMap ( )

Definition at line 657 of file G4GMocrenFileCTtoDensityMap.cc.

657  {
658  if(kDensity != NULL) delete [] kDensity;
659 }

Member Function Documentation

G4double G4GMocrenFileCTtoDensityMap::GetDensity ( G4int _ct) const

Definition at line 661 of file G4GMocrenFileCTtoDensityMap.cc.

661  {
662  G4double dens = 0.;
663  if(_ct < kCTMinMax[0])
664  dens = kDensity[0];
665  else if(_ct > kCTMinMax[1])
666  dens = kDensity[kSize-1];
667  else
668  dens = kDensity[_ct - kCTMinMax[0]];
669 
670  return dens;
671 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4int G4GMocrenFileCTtoDensityMap::GetMaxCT ( ) const
inline

Definition at line 47 of file G4GMocrenFileCTtoDensityMap.hh.

Here is the caller graph for this function:

G4int G4GMocrenFileCTtoDensityMap::GetMinCT ( ) const
inline

Definition at line 45 of file G4GMocrenFileCTtoDensityMap.hh.

Here is the caller graph for this function:

Member Data Documentation

G4int G4GMocrenFileCTtoDensityMap::kCTMinMax[2]
protected

Definition at line 52 of file G4GMocrenFileCTtoDensityMap.hh.

G4double* G4GMocrenFileCTtoDensityMap::kDensity
protected

Definition at line 53 of file G4GMocrenFileCTtoDensityMap.hh.

G4int G4GMocrenFileCTtoDensityMap::kSize
protected

Definition at line 54 of file G4GMocrenFileCTtoDensityMap.hh.


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