Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronHPFieldPoint Class Reference

#include <G4NeutronHPFieldPoint.hh>

Public Member Functions

 G4NeutronHPFieldPoint ()
 
 G4NeutronHPFieldPoint (G4int n)
 
void operator= (const G4NeutronHPFieldPoint &aSet)
 
 ~G4NeutronHPFieldPoint ()
 
void InitY (G4int n)
 
G4int GetDepth () const
 
G4double GetX () const
 
G4double GetY (G4int i) const
 
void SetX (G4double e)
 
void SetY (G4int i, G4double x)
 
void SetData (G4double e, G4int i, G4double x)
 

Detailed Description

Definition at line 34 of file G4NeutronHPFieldPoint.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPFieldPoint() [1/2]

G4NeutronHPFieldPoint::G4NeutronHPFieldPoint ( )
inline

Definition at line 38 of file G4NeutronHPFieldPoint.hh.

39 {
40 X = 0;
41 nP = 0;
42 Y = 0;
43 }

◆ G4NeutronHPFieldPoint() [2/2]

G4NeutronHPFieldPoint::G4NeutronHPFieldPoint ( G4int  n)

Definition at line 33 of file G4NeutronHPFieldPoint.cc.

34 {
35 nP = n;
36 X = 0;
37 Y = new G4double[nP];
38 for (G4int i=0; i<nP; i++) Y[i]=0.;
39 }
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66

◆ ~G4NeutronHPFieldPoint()

G4NeutronHPFieldPoint::~G4NeutronHPFieldPoint ( )

Definition at line 52 of file G4NeutronHPFieldPoint.cc.

53 {
54 delete [] Y;
55 }

Member Function Documentation

◆ GetDepth()

G4int G4NeutronHPFieldPoint::GetDepth ( ) const
inline

Definition at line 53 of file G4NeutronHPFieldPoint.hh.

53{return nP;}

Referenced by G4NeutronHPField::Dump(), and operator=().

◆ GetX()

G4double G4NeutronHPFieldPoint::GetX ( ) const
inline

◆ GetY()

G4double G4NeutronHPFieldPoint::GetY ( G4int  i) const
inline

Definition at line 55 of file G4NeutronHPFieldPoint.hh.

55{return Y[i];}

Referenced by G4NeutronHPField::Dump(), G4NeutronHPField::GetY(), and operator=().

◆ InitY()

void G4NeutronHPFieldPoint::InitY ( G4int  n)

Definition at line 57 of file G4NeutronHPFieldPoint.cc.

58 {
59 nP = n;
60 X=0;
61 Y = new G4double[nP];
62 for (G4int i=0; i<nP; i++) Y[i]=0.;
63 }

Referenced by G4NeutronHPField::InitY().

◆ operator=()

void G4NeutronHPFieldPoint::operator= ( const G4NeutronHPFieldPoint aSet)

Definition at line 41 of file G4NeutronHPFieldPoint.cc.

42 {
43 if(&aSet!=this)
44 {
45 X = aSet.GetX();
46 delete [] Y;
47 Y = new G4double[aSet.GetDepth()];
48 for(G4int i=0; i<aSet.GetDepth(); i++) Y[i] = aSet.GetY(i);
49 }
50 }
G4double GetY(G4int i) const

◆ SetData()

void G4NeutronHPFieldPoint::SetData ( G4double  e,
G4int  i,
G4double  x 
)
inline

Definition at line 60 of file G4NeutronHPFieldPoint.hh.

60{X = e; Y[i] = x;}

Referenced by G4NeutronHPField::G4NeutronHPField(), and G4NeutronHPField::SetData().

◆ SetX()

void G4NeutronHPFieldPoint::SetX ( G4double  e)
inline

Definition at line 57 of file G4NeutronHPFieldPoint.hh.

57{X = e;}

Referenced by G4NeutronHPField::SetEnergy(), and G4NeutronHPField::SetX().

◆ SetY()

void G4NeutronHPFieldPoint::SetY ( G4int  i,
G4double  x 
)
inline

Definition at line 58 of file G4NeutronHPFieldPoint.hh.

58{Y[i] = x;}

Referenced by G4NeutronHPField::SetY().


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