Geant4-11
Public Member Functions | Protected Attributes | Private Member Functions
G4GMocrenFileCTtoDensityMap Class Reference

#include <G4GMocrenFileCTtoDensityMap.hh>

Public Member Functions

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

Protected Attributes

G4int kCTMinMax [2]
 
G4doublekDensity
 
G4int kSize
 

Private Member Functions

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

Detailed Description

Definition at line 38 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:83

References GMocrenFileCTDensMap, kCTMinMax, kDensity, and kSize.

◆ ~G4GMocrenFileCTtoDensityMap()

G4GMocrenFileCTtoDensityMap::~G4GMocrenFileCTtoDensityMap ( )

Definition at line 657 of file G4GMocrenFileCTtoDensityMap.cc.

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

References kDensity.

◆ 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}

References kCTMinMax, kDensity, and kSize.

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

◆ GetMaxCT()

G4int G4GMocrenFileCTtoDensityMap::GetMaxCT ( ) const
inline

Definition at line 46 of file G4GMocrenFileCTtoDensityMap.hh.

46{return kCTMinMax[1];}

References kCTMinMax.

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

◆ GetMinCT()

G4int G4GMocrenFileCTtoDensityMap::GetMinCT ( ) const
inline

Definition at line 44 of file G4GMocrenFileCTtoDensityMap.hh.

44{return kCTMinMax[0];}

References kCTMinMax.

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

◆ operator=()

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

Field Documentation

◆ kCTMinMax

G4int G4GMocrenFileCTtoDensityMap::kCTMinMax[2]
protected

◆ kDensity

G4double* G4GMocrenFileCTtoDensityMap::kDensity
protected

◆ kSize

G4int G4GMocrenFileCTtoDensityMap::kSize
protected

Definition at line 53 of file G4GMocrenFileCTtoDensityMap.hh.

Referenced by G4GMocrenFileCTtoDensityMap(), and GetDensity().


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