Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
F04FocusSolenoid Class Reference

#include <F04FocusSolenoid.hh>

Inheritance diagram for F04FocusSolenoid:
Collaboration diagram for F04FocusSolenoid:

Public Member Functions

 F04FocusSolenoid (G4double, G4double, G4double, G4LogicalVolume *, G4ThreeVector)
 Default constructor. More...
 
virtual ~F04FocusSolenoid ()
 Destructor. More...
 
void SetHalf (G4bool h)
 Set F04FocusSolenoid to only half-focusing (default negative z) More...
 
virtual void AddFieldValue (const G4double point[4], G4double field[6]) const
 
- Public Member Functions inherited from F04SimpleSolenoid
 F04SimpleSolenoid (G4double, G4double, G4LogicalVolume *, G4ThreeVector)
 Default constructor. More...
 
virtual ~F04SimpleSolenoid ()
 Destructor. More...
 
virtual G4double GetLength ()
 GetLength() returns the length of the solenoid. More...
 
virtual G4double GetWidth ()
 GetWidth() returns the solenoid diameter. More...
 
virtual G4double GetHeight ()
 GetHeight() returns the solenoid diameter. More...
 
void SetFringeZ (G4double z)
 SetFringeZ(G4double) sets the solenoid fringe field z-length. More...
 
G4double GetFringeZ ()
 GetFringeZ() returns the solenoid fringe field z-length. More...
 
G4bool IsOutside (G4ThreeVector &local) const
 IsOutside() returns true when outside the solenoid. More...
 
G4bool IsWithin (G4ThreeVector &local) const
 IsWithin() returns true when inside the solenoid. More...
 
- Public Member Functions inherited from F04ElementField
 F04ElementField (const G4ThreeVector, G4LogicalVolume *)
 Constructor. More...
 
void Construct ()
 the actual implementation constructs the F04ElementField More...
 
virtual ~F04ElementField ()
 Destructor. More...
 
void SetMaxStep (G4double stp)
 SetMaxStep(G4double) sets the max. step size. More...
 
G4double GetMaxStep ()
 GetMaxStep() returns the max. step size. More...
 
void SetColor (G4String c)
 SetColor(G4String) sets the color. More...
 
G4String GetColor ()
 GetColor() returns the color. More...
 
void SetGlobalPoint (const G4double point[4])
 
bool IsInBoundingBox (const G4double point[4]) const
 

Additional Inherited Members

- Static Public Member Functions inherited from F04ElementField
static G4VisAttributesGetVisAttribute (G4String color)
 GetVisAttribute() returns the appropriate G4VisAttributes. More...
 
- Protected Attributes inherited from F04ElementField
G4LogicalVolumefVolume
 
G4AffineTransform fGlobal2local
 

Detailed Description

Definition at line 42 of file F04FocusSolenoid.hh.

Constructor & Destructor Documentation

F04FocusSolenoid::F04FocusSolenoid ( G4double  Ba,
G4double  Bb,
G4double  fz,
G4LogicalVolume lv,
G4ThreeVector  c 
)

Default constructor.

Definition at line 43 of file F04FocusSolenoid.cc.

45  : F04SimpleSolenoid(Ba, fz, lv, c)
46 
47 {
48  fHalf = false;
49  fB1 = Ba;
50  fB2 = Bb;
51 }
F04SimpleSolenoid(G4double, G4double, G4LogicalVolume *, G4ThreeVector)
Default constructor.
virtual F04FocusSolenoid::~F04FocusSolenoid ( )
inlinevirtual

Destructor.

Definition at line 51 of file F04FocusSolenoid.hh.

51 {}

Member Function Documentation

void F04FocusSolenoid::AddFieldValue ( const G4double  point[4],
G4double  field[6] 
) const
virtual

AddFieldValue() adds the field for this solenoid into field[]. point[] is in global coordinates.

Reimplemented from F04SimpleSolenoid.

Definition at line 55 of file F04FocusSolenoid.cc.

57 {
58  G4ThreeVector global(point[0],point[1],point[2]);
59 
61 
62  if (IsOutside(local)) return;
63 
64  G4double length = ((F04SimpleSolenoid*)this)->GetLength();
65 
66  G4double Bz = (fB2-fB1) * std::abs(local.z())/(length/2.) + fB1;
67 
68  if (fHalf) { if (local.z() >= 0.) Bz = fB1; }
69 
70  G4ThreeVector B(0.0,0.0,Bz);
71 
73 
74  field[0] += B[0];
75  field[1] += B[1];
76  field[2] += B[2];
77 }
G4bool IsOutside(G4ThreeVector &local) const
IsOutside() returns true when outside the solenoid.
G4AffineTransform Inverse() const
double B(double temperature)
#define local
Definition: adler32.cc:10
double z() const
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4AffineTransform fGlobal2local
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void F04FocusSolenoid::SetHalf ( G4bool  h)
inline

Set F04FocusSolenoid to only half-focusing (default negative z)

Definition at line 54 of file F04FocusSolenoid.hh.

54 { fHalf = h; }

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