Geant4 10.7.0
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 38 of file G4ParticleHPFieldPoint.hh.

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

◆ 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++) Y[i]=0.;
41 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85

◆ ~G4ParticleHPFieldPoint()

G4ParticleHPFieldPoint::~G4ParticleHPFieldPoint ( )

Definition at line 54 of file G4ParticleHPFieldPoint.cc.

55 {
56 delete [] Y;
57 }

Member Function Documentation

◆ GetDepth()

G4int G4ParticleHPFieldPoint::GetDepth ( ) const
inline

Definition at line 53 of file G4ParticleHPFieldPoint.hh.

53{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 55 of file G4ParticleHPFieldPoint.hh.

55{return Y[i];}

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

◆ InitY()

void G4ParticleHPFieldPoint::InitY ( G4int  n)

Definition at line 59 of file G4ParticleHPFieldPoint.cc.

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

Referenced by G4ParticleHPField::InitY().

◆ operator=()

void G4ParticleHPFieldPoint::operator= ( const G4ParticleHPFieldPoint aSet)

Definition at line 43 of file G4ParticleHPFieldPoint.cc.

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

◆ SetData()

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

Definition at line 60 of file G4ParticleHPFieldPoint.hh.

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

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

◆ SetX()

void G4ParticleHPFieldPoint::SetX ( G4double  e)
inline

Definition at line 57 of file G4ParticleHPFieldPoint.hh.

57{X = e;}

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

◆ SetY()

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

Definition at line 58 of file G4ParticleHPFieldPoint.hh.

58{Y[i] = x;}

Referenced by G4ParticleHPField::SetY().


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