BFieldMS Class Reference

#include <BFieldMS.h>

List of all members.

Public Member Functions

 BFieldMS (const VldContext *vldc)
 ~BFieldMS ()
TVector3 GetBField (TVector3 &xyz)

Private Attributes

BFieldbf

Detailed Description

Definition at line 10 of file BFieldMS.h.


Constructor & Destructor Documentation

BFieldMS::BFieldMS ( const VldContext vldc  ) 

Definition at line 12 of file BFieldMS.cxx.

References bf, VldContext::GetDetector(), Detector::kFar, and Detector::kNear.

00013 {
00014   assert (vldc);
00015   //  cout << "got past assertion " << vldc << endl;
00016   //  cout << " VLDC " << *vldc << endl;
00017   bf = 0;
00018   switch (vldc->GetDetector()) {
00019   case Detector::kFar:
00020     bf = new BField(*vldc);
00021     break;
00022   case Detector::kNear:
00023     bf = new BField(*vldc);
00024     break;
00025   default:
00026     cout << "BFieldMS can not handle " << *vldc << endl;
00027     assert(0);
00028   }
00029 }

BFieldMS::~BFieldMS (  ) 

Definition at line 31 of file BFieldMS.cxx.

References bf.

00032 {
00033   if (bf) {
00034     delete bf;
00035   }
00036 }


Member Function Documentation

TVector3 BFieldMS::GetBField ( TVector3 &  xyz  ) 

Definition at line 38 of file BFieldMS.cxx.

References bf, and BField::GetBField().

00039 {
00040   TVector3 bxyz;
00041   if (!bf) {
00042     cout << "no bf!" << endl;
00043     bxyz(0) = 0.;
00044     bxyz(1) = 0.;
00045     bxyz(2) = 0.;
00046   }
00047   else {
00048     bxyz = bf->GetBField(xyz);
00049   }
00050   return bxyz;
00051 }


Member Data Documentation

BField* BFieldMS::bf [private]

Definition at line 22 of file BFieldMS.h.

Referenced by BFieldMS(), GetBField(), and ~BFieldMS().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1