BFieldSR Class Reference

#include <BFieldSR.h>

List of all members.

Public Member Functions

 BFieldSR (const VldContext *)
 ~BFieldSR ()
TVector3 GetBField (TVector3 &xyz)

Private Attributes

BFieldbf

Detailed Description

Definition at line 10 of file BFieldSR.h.


Constructor & Destructor Documentation

BFieldSR::BFieldSR ( const VldContext vldc  ) 

Definition at line 15 of file BFieldSR.cxx.

References bfld::AsString(), bf, VldContext::GetDetector(), Detector::kFar, Detector::kNear, Msg::kWarning, and MSG.

00016 {
00017 
00018   bf = 0;
00019   switch (vldc->GetDetector()) {
00020   case Detector::kFar:
00021     bf = new BField(*vldc);
00022     break;
00023   case Detector::kNear:
00024     bf = new BField(*vldc);
00025     break;
00026   default:
00027      MSG("CandFitTrackSR",Msg::kWarning)
00028         << "BFieldSR does not exist for "
00029         << Detector::AsString(vldc->GetDetector())
00030         << " detector " << endl;
00031   }
00032 }

BFieldSR::~BFieldSR (  ) 

Definition at line 34 of file BFieldSR.cxx.

References bf.

00035 {
00036   if (bf) {
00037     delete bf;
00038   }
00039 }


Member Function Documentation

TVector3 BFieldSR::GetBField ( TVector3 &  xyz  ) 

Definition at line 41 of file BFieldSR.cxx.

References bf, and BField::GetBField().

Referenced by SwimObjSR::SwimToIron().

00042 {
00043   if (bf) 
00044     return bf->GetBField(xyz);
00045   else
00046     return TVector3(0.,0.,0.);
00047 }


Member Data Documentation

BField* BFieldSR::bf [private]

Definition at line 22 of file BFieldSR.h.

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


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1