BOSS
7.0.4
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
29
const
double
BField::cmTeslaToGeVc
=
Constants::c
/1.0E13;
30
const
double
BField::gaussToTesla
= 1000.;
31
32
//constructor
33
BField::BField
(
IMagneticFieldSvc
* magSvc)
34
35
{ m_pIMF = magSvc;}
36
37
// destroy
38
BField::~BField
() {}
39
40
// field z of nominal field
41
double
42
BField::bFieldZ
()
const
43
{
44
return
m_pIMF->
getReferField
()*
gaussToTesla
;
45
}
46
47
void
BField::print
()
const
48
{
49
std::cout <<
"Default constant field"
<< std::endl;
50
std::cout <<
"nominal Field: "
<<
bFieldNominal
() << std::endl;
51
}
52
53
double
54
BField::bFieldNominal
()
const
55
{
56
return
bFieldZ
();
57
}
BField::bFieldNominal
double bFieldNominal() const
Definition:
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx:54
BField::bFieldZ
double bFieldZ() const
Definition:
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx:42
BField::cmTeslaToGeVc
static const double cmTeslaToGeVc
Definition:
InstallArea/include/BField/BField/BField.h:50
BField::BField
BField(IMagneticFieldSvc *magSvc)
Definition:
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx:33
BField::~BField
~BField()
Definition:
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx:38
BField::gaussToTesla
static const double gaussToTesla
Definition:
InstallArea/include/BField/BField/BField.h:51
BField::print
void print() const
Definition:
Reconstruction/MdcPatRec/BField/BField-00-01-02/src/BField.cxx:47
Constants::c
static const double c
Definition:
InstallArea/include/MdcGeom/MdcGeom/Constants.h:43
IMagneticFieldSvc
Definition:
InstallArea/include/MagneticField/MagneticField/IMagneticFieldSvc.h:29
IMagneticFieldSvc::getReferField
virtual double getReferField()=0
source
Reconstruction
MdcPatRec
BField
BField-00-01-02
src
BField.cxx
Generated by
1.9.6