Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

Detailed Description

Definition at line 39 of file XLatticeManager3.hh.

Constructor & Destructor Documentation

XLatticeManager3::XLatticeManager3 ( )
protected

Definition at line 39 of file XLatticeManager3.cc.

40 {
41  fTotalLattices = 0;
42 }

Here is the caller graph for this function:

XLatticeManager3::~XLatticeManager3 ( )
protected

Definition at line 47 of file XLatticeManager3.cc.

48 {;}

Member Function Documentation

XLatticeManager3 * XLatticeManager3::GetXLatticeManager ( )
static

Definition at line 52 of file XLatticeManager3.cc.

52  {
53 
54  //if no lattice manager exists, create one.
55  if(!LM) LM = new XLatticeManager3();
56 
57  //return pointer to single existing lattice manager
58  return LM;
59 }

Here is the call graph for this function:

Here is the caller graph for this function:

XPhysicalLattice * XLatticeManager3::GetXPhysicalLattice ( G4VPhysicalVolume Vol)

Definition at line 83 of file XLatticeManager3.cc.

83  {
84 //returns a pointer to the PhysicalLattice associated with Vol
85 
86  for(int counter=0;counter<fTotalLattices;counter++){
87  if(fLatticeList[counter]->GetVolume()==Vol) {
88  return fLatticeList[counter]; //found matching lattice
89  }
90  }
91  return fLatticeList[0];
92 }
XPhysicalLattice * fLatticeList[MAXLAT]

Here is the caller graph for this function:

bool XLatticeManager3::HasLattice ( G4VPhysicalVolume Vol)

Definition at line 96 of file XLatticeManager3.cc.

96  {
97  //return true if Vol has a physical lattice
98 
99  for(int counter=0;counter<fTotalLattices;counter++){
100  if(fLatticeList[counter]->GetVolume()==Vol) {
101  return true; //found matching lattice
102  }
103  }
104  return false;
105 }
XPhysicalLattice * fLatticeList[MAXLAT]
double XLatticeManager3::MapKtoV ( G4VPhysicalVolume Vol,
int  polarizationState,
const G4ThreeVector k 
)

Definition at line 109 of file XLatticeManager3.cc.

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

Here is the call graph for this function:

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

Definition at line 131 of file XLatticeManager3.cc.

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

Here is the call graph for this function:

bool XLatticeManager3::RegisterLattice ( XPhysicalLattice Lat)

Definition at line 63 of file XLatticeManager3.cc.

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

Member Data Documentation

XPhysicalLattice* XLatticeManager3::fLatticeList[MAXLAT]
protected

Definition at line 48 of file XLatticeManager3.hh.

int XLatticeManager3::fTotalLattices
protected

Definition at line 49 of file XLatticeManager3.hh.


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