BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: BField.cxx,v 1.2 2008/09/17 08:30:39 zhangy Exp $
4//
5// Description:
6// Class BField; encapsulates the magnetic field.
7//
8// See header for more info.
9//
10// Environment:
11// Software developed for the BESIII Detector at BEPCII
12//
13// Author List:
14// Bob Jacobsen Original Author
15// Zhang Yao Only keep nominal field
16//
17// Copyright Information:
18// Copyright (C) 1995 Lawrence Berkeley Laboratory
19//
20//------------------------------------------------------------------------
21
22//-----------------------
23// This Class's Header --
24//-----------------------
25#include <iostream>
26#include "BField/BField.h"
27#include "MdcGeom/Constants.h"
28
29const double BField::cmTeslaToGeVc = Constants::c/1.0E13;
30const double BField::gaussToTesla = 1000.;
31
32//constructor
34
35{ m_pIMF = magSvc;}
36
37// destroy
39
40// field z of nominal field
41double
43{
44 return m_pIMF->getReferField()*gaussToTesla;
45}
46
47void BField::print()const
48{
49 std::cout << "Default constant field" << std::endl;
50 std::cout << "nominal Field: " << bFieldNominal() << std::endl;
51}
52
53double
55{
56 return bFieldZ();
57}
static const double cmTeslaToGeVc
static const double gaussToTesla
virtual double getReferField()=0