Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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::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:64

◆ ~G4GMocrenFileCTtoDensityMap()

G4GMocrenFileCTtoDensityMap::~G4GMocrenFileCTtoDensityMap ( )

Definition at line 657 of file G4GMocrenFileCTtoDensityMap.cc.

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

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}

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

◆ GetMaxCT()

G4int G4GMocrenFileCTtoDensityMap::GetMaxCT ( ) const
inline

Definition at line 47 of file G4GMocrenFileCTtoDensityMap.hh.

47{return kCTMinMax[1];}

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

◆ GetMinCT()

G4int G4GMocrenFileCTtoDensityMap::GetMinCT ( ) const
inline

Definition at line 45 of file G4GMocrenFileCTtoDensityMap.hh.

45{return kCTMinMax[0];}

Referenced by G4GMocrenFileSceneHandler::BeginSavingGdd().

Member Data Documentation

◆ kCTMinMax

G4int G4GMocrenFileCTtoDensityMap::kCTMinMax[2]
protected

◆ kDensity

G4double* G4GMocrenFileCTtoDensityMap::kDensity
protected

◆ kSize

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: