Geant4  10.02.p03
XLatticeManager3 Class Reference

#include <XLatticeManager3.hh>

Collaboration diagram for XLatticeManager3:

Public Member Functions

XPhysicalLatticeGetXPhysicalLattice (G4VPhysicalVolume *)
 
bool RegisterLattice (XPhysicalLattice *)
 
bool HasLattice (G4VPhysicalVolume *)
 
double MapKtoV (G4VPhysicalVolume *, int, const G4ThreeVector &)
 
G4ThreeVector MapKtoVDir (G4VPhysicalVolume *, int, const G4ThreeVector &)
 

Static Public Member Functions

static XLatticeManager3GetXLatticeManager ()
 

Protected Member Functions

 XLatticeManager3 ()
 
 ~XLatticeManager3 ()
 

Protected Attributes

XPhysicalLatticefLatticeList [MAXLAT]
 
int fTotalLattices
 

Static Private Attributes

static XLatticeManager3LM
 

Detailed Description

Definition at line 36 of file XLatticeManager3.hh.

Constructor & Destructor Documentation

◆ XLatticeManager3()

XLatticeManager3::XLatticeManager3 ( )
protected

Definition at line 36 of file XLatticeManager3.cc.

37 {
38  fTotalLattices = 0;
39 }
Here is the caller graph for this function:

◆ ~XLatticeManager3()

XLatticeManager3::~XLatticeManager3 ( )
protected

Definition at line 44 of file XLatticeManager3.cc.

45 {;}

Member Function Documentation

◆ GetXLatticeManager()

XLatticeManager3 * XLatticeManager3::GetXLatticeManager ( )
static

Definition at line 49 of file XLatticeManager3.cc.

49  {
50 
51  //if no lattice manager exists, create one.
52  if(!LM) LM = new XLatticeManager3();
53 
54  //return pointer to single existing lattice manager
55  return LM;
56 }
static XLatticeManager3 * LM
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXPhysicalLattice()

XPhysicalLattice * XLatticeManager3::GetXPhysicalLattice ( G4VPhysicalVolume Vol)

Definition at line 80 of file XLatticeManager3.cc.

80  {
81 //returns a pointer to the PhysicalLattice associated with Vol
82 
83  for(int counter=0;counter<fTotalLattices;counter++){
84  if(fLatticeList[counter]->GetVolume()==Vol) {
85  return fLatticeList[counter]; //found matching lattice
86  }
87  }
88  return fLatticeList[0];
89 }
XPhysicalLattice * fLatticeList[MAXLAT]
Here is the caller graph for this function:

◆ HasLattice()

bool XLatticeManager3::HasLattice ( G4VPhysicalVolume Vol)

Definition at line 93 of file XLatticeManager3.cc.

93  {
94  //return true if Vol has a physical lattice
95 
96  for(int counter=0;counter<fTotalLattices;counter++){
97  if(fLatticeList[counter]->GetVolume()==Vol) {
98  return true; //found matching lattice
99  }
100  }
101  return false;
102 }
XPhysicalLattice * fLatticeList[MAXLAT]
Here is the caller graph for this function:

◆ MapKtoV()

double XLatticeManager3::MapKtoV ( G4VPhysicalVolume Vol,
int  polarizationState,
const G4ThreeVector k 
)

Definition at line 106 of file XLatticeManager3.cc.

109 {
110  //Given the phonon wave vector k, phonon physical volume Vol
111  //and polarizationState(0=LON, 1=FT, 2=ST),
112  //returns phonon velocity in m/s
113 
114  if((Vol==NULL)&&(fTotalLattices>0))
115  return fLatticeList[0]->MapKtoV(polarizationState, k);
116  for(int counter=0;counter<fTotalLattices;counter++){
117  if(fLatticeList[counter]->GetVolume()==Vol) {
118  return fLatticeList[counter]->MapKtoV(polarizationState, k);
119  }
120  }
121  G4cout<<"\nXLatticeManager::MapKtoV: Found no matching lattices for "
122  <<Vol->GetName()<<". Total number of lattices is "<<fTotalLattices<<endl;
123 return 300;
124 }
double MapKtoV(int, G4ThreeVector)
G4GLOB_DLL std::ostream G4cout
XPhysicalLattice * fLatticeList[MAXLAT]
const G4String & GetName() const
Here is the call graph for this function:

◆ MapKtoVDir()

G4ThreeVector XLatticeManager3::MapKtoVDir ( G4VPhysicalVolume Vol,
int  polarizationState,
const G4ThreeVector k 
)

Definition at line 128 of file XLatticeManager3.cc.

131 {
132  //Given the phonon wave vector k, phonon physical volume Vol
133  //and polarizationState(0=LON, 1=FT, 2=ST),
134  //returns phonon propagation direction as dimensionless unit vector
135 
136  if((Vol==NULL)&&(fTotalLattices>0))
137  return fLatticeList[0]->MapKtoVDir(polarizationState, k);
138  for(int counter=0;counter<fTotalLattices;counter++){
139  if(fLatticeList[counter]->GetVolume()==Vol) {
140  if(counter!=0)
141  G4cout<<"\nLattiveManager2::MapKtoV:";
142  G4cout<<"returning group velocity from lattise position: "<<counter;
143  return fLatticeList[counter]->MapKtoVDir(polarizationState, k);
144  }
145  }
146 return G4ThreeVector(1,0,0);
147 }
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
XPhysicalLattice * fLatticeList[MAXLAT]
G4ThreeVector MapKtoVDir(int, G4ThreeVector)
Here is the call graph for this function:

◆ RegisterLattice()

bool XLatticeManager3::RegisterLattice ( XPhysicalLattice Lat)

Definition at line 60 of file XLatticeManager3.cc.

60  {
63  //using "fTotalLattices-1" so that first lattice corresponds to index 0
65  G4cout<<"\nXLatticeManager3::registerLattice: Registering Lattice.";
66  G4cout<< "Total number of lattices:"<<fTotalLattices<<"\n"<<endl;
67 
68  return true;
69  }
70 
71  G4cout<<"\nXLatticeManager::RegisterLattice(XPhysicalLattice*):";
72  G4cout<<"Maximum number of lattices MAXLAT exceeded."<<endl;
73 
74  return false;
75 }
G4GLOB_DLL std::ostream G4cout
XPhysicalLattice * fLatticeList[MAXLAT]
#define MAXLAT
Here is the caller graph for this function:

Member Data Documentation

◆ fLatticeList

XPhysicalLattice* XLatticeManager3::fLatticeList[MAXLAT]
protected

Definition at line 45 of file XLatticeManager3.hh.

◆ fTotalLattices

int XLatticeManager3::fTotalLattices
protected

Definition at line 46 of file XLatticeManager3.hh.

◆ LM

XLatticeManager3 * XLatticeManager3::LM
staticprivate

Definition at line 39 of file XLatticeManager3.hh.


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