Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
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.

References GMocrenFileCTDensMap, kCTMinMax, kDensity, and kSize.

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.

References kDensity.

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.

References kCTMinMax, kDensity, and kSize.

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

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
G4int G4GMocrenFileCTtoDensityMap::GetMaxCT ( ) const
inline
G4int G4GMocrenFileCTtoDensityMap::GetMinCT ( ) const
inline

Field Documentation

G4int G4GMocrenFileCTtoDensityMap::kCTMinMax[2]
protected
G4double* G4GMocrenFileCTtoDensityMap::kDensity
protected
G4int G4GMocrenFileCTtoDensityMap::kSize
protected

Definition at line 54 of file G4GMocrenFileCTtoDensityMap.hh.

Referenced by G4GMocrenFileCTtoDensityMap(), and GetDensity().


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