Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -58,14 +58,18 @@ G4LatticePhysical::~G4LatticePhysical() {;}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4LatticePhysical::SetPhysicalOrientation(const G4RotationMatrix* Rot) {
|
||||
if (!Rot) { // No orientation specified
|
||||
if(Rot == nullptr)
|
||||
{ // No orientation specified
|
||||
fLocalToGlobal = fGlobalToLocal = G4RotationMatrix::IDENTITY;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
fLocalToGlobal = fGlobalToLocal = *Rot; // Frame rotation
|
||||
fGlobalToLocal.invert();
|
||||
}
|
||||
|
||||
if (verboseLevel) {
|
||||
if(verboseLevel != 0)
|
||||
{
|
||||
G4cout << "G4LatticePhysical::SetPhysicalOrientation " << *Rot
|
||||
<< "\nfLocalToGlobal: " << fLocalToGlobal
|
||||
<< "\nfGlobalToLocal: " << fGlobalToLocal
|
||||
@@ -79,9 +83,11 @@ void G4LatticePhysical::SetLatticeOrientation(G4double t_rot, G4double p_rot) {
|
||||
fTheta = t_rot;
|
||||
fPhi = p_rot;
|
||||
|
||||
if (verboseLevel)
|
||||
if(verboseLevel != 0)
|
||||
{
|
||||
G4cout << "G4LatticePhysical::SetLatticeOrientation " << fTheta << " "
|
||||
<< fPhi << G4endl;
|
||||
<< fPhi << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -90,9 +96,11 @@ void G4LatticePhysical::SetMillerOrientation(G4int l, G4int k, G4int n) {
|
||||
fTheta = halfpi - std::atan2(n+0.000001,l+0.000001);
|
||||
fPhi = halfpi - std::atan2(l+0.000001,k+0.000001);
|
||||
|
||||
if (verboseLevel)
|
||||
G4cout << "G4LatticePhysical::SetMillerOrientation(" << l << k << n
|
||||
<< ") : " << fTheta << " " << fPhi << G4endl;
|
||||
if(verboseLevel != 0)
|
||||
{
|
||||
G4cout << "G4LatticePhysical::SetMillerOrientation(" << l << k << n
|
||||
<< ") : " << fTheta << " " << fPhi << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +111,10 @@ void G4LatticePhysical::SetMillerOrientation(G4int l, G4int k, G4int n) {
|
||||
/////////////////////////////
|
||||
G4double G4LatticePhysical::MapKtoV(G4int polarizationState,
|
||||
G4ThreeVector k) const {
|
||||
if (verboseLevel>1) G4cout << "G4LatticePhysical::MapKtoV " << k << G4endl;
|
||||
if(verboseLevel > 1)
|
||||
{
|
||||
G4cout << "G4LatticePhysical::MapKtoV " << k << G4endl;
|
||||
}
|
||||
|
||||
k.rotate(yhat,fTheta).rotate(zhat, fPhi);
|
||||
return fLattice->MapKtoV(polarizationState, k);
|
||||
@@ -114,7 +125,10 @@ G4double G4LatticePhysical::MapKtoV(G4int polarizationState,
|
||||
///////////////////////////////
|
||||
G4ThreeVector G4LatticePhysical::MapKtoVDir(G4int polarizationState,
|
||||
G4ThreeVector k) const {
|
||||
if (verboseLevel>1) G4cout << "G4LatticePhysical::MapKtoVDir " << k << G4endl;
|
||||
if(verboseLevel > 1)
|
||||
{
|
||||
G4cout << "G4LatticePhysical::MapKtoVDir " << k << G4endl;
|
||||
}
|
||||
|
||||
k.rotate(yhat,fTheta).rotate(zhat,fPhi);
|
||||
|
||||
@@ -136,7 +150,10 @@ G4LatticePhysical::RotateToGlobal(const G4ThreeVector& dir) const {
|
||||
}
|
||||
|
||||
G4ThreeVector result = fLocalToGlobal*dir;
|
||||
if (verboseLevel>1) G4cout << " result " << result << G4endl;
|
||||
if(verboseLevel > 1)
|
||||
{
|
||||
G4cout << " result " << result << G4endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -150,7 +167,10 @@ G4LatticePhysical::RotateToLocal(const G4ThreeVector& dir) const {
|
||||
}
|
||||
|
||||
G4ThreeVector result = fGlobalToLocal*dir;
|
||||
if (verboseLevel>1) G4cout << " result " << result << G4endl;
|
||||
if(verboseLevel > 1)
|
||||
{
|
||||
G4cout << " result " << result << G4endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user