Geant4  10.02.p03
G4GMocrenFileCTtoDensityMap Class Reference

#include <G4GMocrenFileCTtoDensityMap.hh>

Collaboration diagram for G4GMocrenFileCTtoDensityMap:

Public Member Functions

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

Protected Attributes

G4int kCTMinMax [2]
 
G4doublekDensity
 
G4int kSize
 

Private Member Functions

 G4GMocrenFileCTtoDensityMap (const G4GMocrenFileCTtoDensityMap &)
 
G4GMocrenFileCTtoDensityMapoperator= (const G4GMocrenFileCTtoDensityMap &)
 

Detailed Description

Definition at line 39 of file G4GMocrenFileCTtoDensityMap.hh.

Constructor & Destructor Documentation

◆ G4GMocrenFileCTtoDensityMap() [1/2]

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::~G4GMocrenFileCTtoDensityMap ( )

Definition at line 657 of file G4GMocrenFileCTtoDensityMap.cc.

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

◆ G4GMocrenFileCTtoDensityMap() [2/2]

G4GMocrenFileCTtoDensityMap::G4GMocrenFileCTtoDensityMap ( const G4GMocrenFileCTtoDensityMap )
private

Member Function Documentation

◆ GetDensity()

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:

◆ GetMaxCT()

G4int G4GMocrenFileCTtoDensityMap::GetMaxCT ( ) const
inline

Definition at line 47 of file G4GMocrenFileCTtoDensityMap.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMinCT()

G4int G4GMocrenFileCTtoDensityMap::GetMinCT ( ) const
inline

Definition at line 45 of file G4GMocrenFileCTtoDensityMap.hh.

Here is the caller graph for this function:

◆ operator=()

G4GMocrenFileCTtoDensityMap& G4GMocrenFileCTtoDensityMap::operator= ( const G4GMocrenFileCTtoDensityMap )
private

Member Data Documentation

◆ kCTMinMax

G4int G4GMocrenFileCTtoDensityMap::kCTMinMax[2]
protected

Definition at line 52 of file G4GMocrenFileCTtoDensityMap.hh.

◆ kDensity

G4double* G4GMocrenFileCTtoDensityMap::kDensity
protected

Definition at line 53 of file G4GMocrenFileCTtoDensityMap.hh.

◆ kSize

G4int G4GMocrenFileCTtoDensityMap::kSize
protected

Definition at line 54 of file G4GMocrenFileCTtoDensityMap.hh.


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