Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XLogicalAtomicLattice Class Reference

#include <XLogicalAtomicLattice.hh>

Inheritance diagram for XLogicalAtomicLattice:

Public Member Functions

void InitializeXLogicalAtomicLattice ()
 
G4ThreeVector GetAtomPosition (G4int i)
 
G4int GetLatticeNumberOfAtoms ()
 
void AddAtom (G4ThreeVector)
 
void DeleteAtom (G4ThreeVector)
 
G4complex ComputeGeometricalStructureFactorSingleKind (G4int, G4int, G4int)
 
 XLogicalAtomicLattice ()
 
 ~XLogicalAtomicLattice ()
 

Detailed Description

Definition at line 44 of file XLogicalAtomicLattice.hh.

Constructor & Destructor Documentation

XLogicalAtomicLattice::XLogicalAtomicLattice ( )

Definition at line 34 of file XLogicalAtomicLattice.cc.

Here is the call graph for this function:

XLogicalAtomicLattice::~XLogicalAtomicLattice ( )

Definition at line 40 of file XLogicalAtomicLattice.cc.

40  {
41 }

Member Function Documentation

void XLogicalAtomicLattice::AddAtom ( G4ThreeVector  vAtomPosition)

Definition at line 72 of file XLogicalAtomicLattice.cc.

72  {
73  fLatticeAtomNumber++;
74  //Add an atom to the lattice
75  fLatticeAtomPosition[fLatticeAtomNumber - 1] = vAtomPosition;
76 }
G4complex XLogicalAtomicLattice::ComputeGeometricalStructureFactorSingleKind ( G4int  h,
G4int  k,
G4int  l 
)

Definition at line 98 of file XLogicalAtomicLattice.cc.

100  {
101  G4double vTempDouble = 0.;
102  G4complex vResult = G4complex(0.,0.);
103 
104  for(G4int i=0;i<fLatticeAtomNumber;i++)
105  {
106  vTempDouble = 0.0;
107  vTempDouble += h * fLatticeAtomPosition[i].x();
108  vTempDouble += k * fLatticeAtomPosition[i].y();
109  vTempDouble += l * fLatticeAtomPosition[i].z();
110  vResult += G4complex(std::cos(2 * CLHEP::pi * vTempDouble),
111  std::sin(2 * CLHEP::pi * vTempDouble));
112  }
113 
114  return vResult;
115 }
double x() const
int G4int
Definition: G4Types.hh:78
double z() const
std::complex< G4double > G4complex
Definition: G4Types.hh:81
double y() const
double G4double
Definition: G4Types.hh:76
static constexpr double pi
Definition: SystemOfUnits.h:54

Here is the call graph for this function:

Here is the caller graph for this function:

void XLogicalAtomicLattice::DeleteAtom ( G4ThreeVector  vAtomPosition)

Definition at line 80 of file XLogicalAtomicLattice.cc.

80  {
81  //Delete atoms in the lattice in the selected position
82 
83  for(G4int i=0;i<fLatticeAtomNumber;i++)
84  if(vAtomPosition == fLatticeAtomPosition[i])
85  {
86  for(G4int j=(i+1);j<fLatticeAtomNumber;j++)
87  {
88  fLatticeAtomPosition[j-1]=fLatticeAtomPosition[j];
89  }
90  i--;
91  fLatticeAtomNumber--;
92  }
93 }
int G4int
Definition: G4Types.hh:78
G4ThreeVector XLogicalAtomicLattice::GetAtomPosition ( G4int  i)

Definition at line 53 of file XLogicalAtomicLattice.cc.

53  {
54  if(i<fLatticeAtomNumber){
55  return fLatticeAtomPosition[i];
56  }
57  else{
58  G4cout << "XLogicalAtomicLattice::GetAtomPosition - atom " <<
59  i << " does not exist!!" <<std::endl;
60  }
61  return G4ThreeVector(-1.,-1.,-1.);
62 }
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4int XLogicalAtomicLattice::GetLatticeNumberOfAtoms ( )

Definition at line 66 of file XLogicalAtomicLattice.cc.

66  {
67  return fLatticeAtomNumber;
68 }

Here is the caller graph for this function:

void XLogicalAtomicLattice::InitializeXLogicalAtomicLattice ( )

Definition at line 45 of file XLogicalAtomicLattice.cc.

45  {
46  fLatticeAtomNumber = 1;
47  for(G4int i=0;i<MAXLATTICEATOMS;i++)
48  fLatticeAtomPosition[i] = G4ThreeVector(0.,0.,0.);
49 }
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:78
#define MAXLATTICEATOMS

Here is the caller graph for this function:


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