ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4LatticeLogical.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4LatticeLogical.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // 20131114 Add verbosity for diagnostic output
31 // 20131115 Expose maximum array dimensions for use by LatticeReader
32 
33 #ifndef G4LatticeLogical_h
34 #define G4LatticeLogical_h
35 
36 #include "globals.hh"
37 #include "G4ThreeVector.hh"
38 #include <iosfwd>
39 
40 
42 public:
44  virtual ~G4LatticeLogical();
45 
46  void SetVerboseLevel(G4int vb) { verboseLevel = vb; }
47 
50 
51  // Get group velocity magnitude for input polarization and wavevector
52  virtual G4double MapKtoV(G4int, const G4ThreeVector& ) const;
53 
54  // Get group velocity direction (unit vector) for input polarization and K
55  virtual G4ThreeVector MapKtoVDir(G4int, const G4ThreeVector& ) const;
56 
57  // Dump structure in format compatible with reading back
58  void Dump(std::ostream& os) const;
59  void DumpMap(std::ostream& os, G4int pol, const G4String& name) const;
60  void Dump_NMap(std::ostream& os, G4int pol, const G4String& name) const;
61 
62 public:
64  G4double Lambda, G4double Mu) {
65  fBeta=Beta; fGamma=Gamma; fLambda=Lambda; fMu=Mu;
66  }
67 
70  void SetLDOS(G4double LDOS) { fLDOS=LDOS; }
71  void SetSTDOS(G4double STDOS) { fSTDOS=STDOS; }
72  void SetFTDOS(G4double FTDOS) { fFTDOS=FTDOS; }
73 
74  G4double GetBeta() const { return fBeta; }
75  G4double GetGamma() const { return fGamma; }
76  G4double GetLambda() const { return fLambda; }
77  G4double GetMu() const { return fMu; }
78  G4double GetScatteringConstant() const { return fB; }
79  G4double GetAnhDecConstant() const { return fA; }
80  G4double GetLDOS() const { return fLDOS; }
81  G4double GetSTDOS() const { return fSTDOS; }
82  G4double GetFTDOS() const { return fFTDOS; }
83 
84 public:
85  enum { MAXRES=322 }; // Maximum map resolution (bins)
86 
87 private:
88  G4int verboseLevel; // Enable diagnostic output
89 
90  G4double fMap[3][MAXRES][MAXRES]; // map for group velocity scalars
91  G4ThreeVector fN_map[3][MAXRES][MAXRES]; // map for direction vectors
92 
93  G4int fVresTheta; //velocity map theta resolution (inclination)
94  G4int fVresPhi; //velocity map phi resolution (azimuth)
95  G4int fDresTheta; //direction map theta resn
96  G4int fDresPhi; //direction map phi resn
97 
98  G4double fA; //Scaling constant for Anh.Dec. mean free path
99  G4double fB; //Scaling constant for Iso.Scat. mean free path
100  G4double fLDOS; //Density of states for L-phonons
101  G4double fSTDOS; //Density of states for ST-phonons
102  G4double fFTDOS; //Density of states for FT-phonons
103  G4double fBeta, fGamma, fLambda, fMu; //dynamical constants for material
104 };
105 
106 // Write lattice structure to output stream
107 
108 inline std::ostream&
109 operator<<(std::ostream& os, const G4LatticeLogical& lattice) {
110  lattice.Dump(os);
111  return os;
112 }
113 
114 #endif