QwGeant4
QweakSimMagnet_CoilParameterisation.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimMagnet_CoilParameterisation.cc
10 
11  $Revision: 1.2 $
12  $Date: 2005/12/27 19:12:32 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 //=============================================================================
18 
19 //=============================================================================
20 // -----------------------
21 // | CVS File Information |
22 // -----------------------
23 //
24 // Last Update: $Author: grimm $
25 // Update Date: $Date: 2005/12/27 19:12:32 $
26 // CVS/RCS Revision: $Revision: 1.2 $
27 // Status: $State: Exp $
28 //
29 // ===================================
30 // CVS Revision Log at end of file !!
31 // ===================================
32 //
33 //============================================================================
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 
39 // geant4 includes
40 #include "G4SystemOfUnits.hh"
41 #include "G4ThreeVector.hh"
42 #include "G4RotationMatrix.hh"
43 #include "G4VPhysicalVolume.hh"
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
48 {
49  myRadialDistanceToBeamLine = RadialDistanceToBeamLine;
50 
51 }
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54 
56 {
57 
58 }
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 
62 void QweakSimMagnet_CoilParameterisation::ComputeTransformation (const G4int copyNo, G4VPhysicalVolume* physVol) const
63 {
64 
65  G4double Angle_Coil = ((45.0*copyNo)+22.5)*degree;
66 
67  // confusion: angle def is different to ShieldingWall OctantCuts
68  G4double myPositionInX = sin(Angle_Coil)*myRadialDistanceToBeamLine;
69  G4double myPositionInY = cos(Angle_Coil)*myRadialDistanceToBeamLine;
70  G4double myPositionInZ = 0.0*cm;
71 
72  G4RotationMatrix* Rotation_Coil = new G4RotationMatrix();
73  Rotation_Coil->rotateZ(Angle_Coil);
74 
75  G4ThreeVector origin(myPositionInX , myPositionInY, myPositionInZ);
76 
77  physVol->SetTranslation(origin);
78  physVol->SetRotation(Rotation_Coil);
79 
80  // delete Rotation_Coil;
81 
82  }
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85 
86 //=======================================================
87 // -----------------------
88 // | CVS File Information |
89 // -----------------------
90 //
91 // $Revisions$
92 // $Log: QweakSimMagnet_CoilParameterisation.cc,v $
93 // Revision 1.2 2005/12/27 19:12:32 grimm
94 // - Redesign of Doxygen header containing CVS info like revision and date
95 // - Added CVS revision log at the end of file
96 //
97 //
98 
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
QweakSimMagnet_CoilParameterisation(G4double RadialDistanceToBeamLine)