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

#include <G4ParticleHPFieldPoint.hh>

Public Member Functions

 G4ParticleHPFieldPoint ()
 
 G4ParticleHPFieldPoint (G4int n)
 
void operator= (const G4ParticleHPFieldPoint &aSet)
 
 ~G4ParticleHPFieldPoint ()
 
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 G4ParticleHPFieldPoint.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPFieldPoint() [1/2]

G4ParticleHPFieldPoint::G4ParticleHPFieldPoint ( )
inline

Definition at line 37 of file G4ParticleHPFieldPoint.hh.

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

◆ G4ParticleHPFieldPoint() [2/2]

G4ParticleHPFieldPoint::G4ParticleHPFieldPoint ( G4int n)

Definition at line 35 of file G4ParticleHPFieldPoint.cc.

36{
37 nP = n;
38 X = 0;
39 Y = new G4double[nP];
40 for (G4int i = 0; i < nP; i++)
41 Y[i] = 0.;
42}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85

◆ ~G4ParticleHPFieldPoint()

G4ParticleHPFieldPoint::~G4ParticleHPFieldPoint ( )

Definition at line 55 of file G4ParticleHPFieldPoint.cc.

56{
57 delete[] Y;
58}

Member Function Documentation

◆ GetDepth()

G4int G4ParticleHPFieldPoint::GetDepth ( ) const
inline

Definition at line 52 of file G4ParticleHPFieldPoint.hh.

52{ return nP; }

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

◆ GetX()

G4double G4ParticleHPFieldPoint::GetX ( ) const
inline

◆ GetY()

G4double G4ParticleHPFieldPoint::GetY ( G4int i) const
inline

Definition at line 54 of file G4ParticleHPFieldPoint.hh.

54{ return Y[i]; }

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

◆ InitY()

void G4ParticleHPFieldPoint::InitY ( G4int n)

Definition at line 60 of file G4ParticleHPFieldPoint.cc.

61{
62 nP = n;
63 X = 0;
64 Y = new G4double[nP];
65 for (G4int i = 0; i < nP; i++)
66 Y[i] = 0.;
67}

Referenced by G4ParticleHPField::InitY().

◆ operator=()

void G4ParticleHPFieldPoint::operator= ( const G4ParticleHPFieldPoint & aSet)

Definition at line 44 of file G4ParticleHPFieldPoint.cc.

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

◆ SetData()

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

Definition at line 59 of file G4ParticleHPFieldPoint.hh.

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

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

◆ SetX()

void G4ParticleHPFieldPoint::SetX ( G4double e)
inline

Definition at line 56 of file G4ParticleHPFieldPoint.hh.

56{ X = e; }

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

◆ SetY()

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

Definition at line 57 of file G4ParticleHPFieldPoint.hh.

57{ Y[i] = x; }

Referenced by G4ParticleHPField::SetY().


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