VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex02MagField.h
Go to the documentation of this file.
1#ifndef EX02_MAG_FIELD_H
2#define EX02_MAG_FIELD_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
13/// \file Ex02MagField.h
14/// \brief Definition of the Ex02MagField class
15///
16/// Geant4 ExampleN02 adapted to Virtual Monte Carlo
17///
18/// \date 18/09/2009
19/// \author I. Hrivnacova; IPN, Orsay
20
21#include <TVirtualMagField.h>
22
23/// \ingroup E02
24/// \brief Definition of a uniform magnetic field
25///
26/// This class demonstrates definition of a user magnetic field
27/// via the TVirtualMagField interface.
28/// In case of a uniform magnetic field, it is also possible to use
29/// directly the TGeoUniformMagField class in the VMC application.
30///
31/// \date
32/// \author I. Hrivnacova; IPN, Orsay
33
35{
36 public:
37 Ex02MagField(Double_t Bx, Double_t By, Double_t Bz);
39 virtual ~Ex02MagField();
40
41 virtual void Field(const Double_t* x, Double_t* B);
42
43 private:
46
47 Double_t fB[3]; ///< Magnetic field vector
48
49 ClassDef(Ex02MagField, 1) // Uniform magnetic field
50};
51
52#endif // EX02_MAG_FIELD_H
Definition of a uniform magnetic field.
virtual void Field(const Double_t *x, Double_t *B)
Double_t fB[3]
Magnetic field vector.
Ex02MagField(const Ex02MagField &)
Ex02MagField & operator=(const Ex02MagField &)
virtual ~Ex02MagField()