BField

Contents

Contact Name

Robert Hatcher.

Overview

The BField package provides an simple method of determining the magnetic field in any of the MINOS detectors at any given time.

User Interface

The lightweight object BField is the general user interface to the package. These objects created with a VldContext:- BField bfld(vldc); They use the BfldLoanPool as a repository for shared information (grid points, maps, etc.) and are thus expected to be built on the stack (i.e. no new) and discarded as necessary in all but the tightest loops. In general one constructs a BField object and them makes GetBField(TVector3& xyz) requests of it, where it returns the Bx,By,Bz field as a TVector3 object:- TVector3 xyz(x,y,z); TVector3 bxyz = bfld.GetBField(xyz);

Database Access

Currently this package does not directly use the database (except to the extent that it uses UgliGeometry to determine the placement of the steel planes). Future upgrades will include having the grid and map information in the database and using the database to determine the coil current for the data taken in the real detectors.

Configuring & Running

The package as a whole can be configured by modifying the values held by BfldLoanPool:- BfldLoanPool* bfldpool = BfldLoanPool::Instance(); bfldpool->Set("MaxUnrefCaches=1"); bfldpool->Set("IgnoreUseEverywhere=0"); bfldpool->Set("RequireInZTest=1"); bfldpool->Set("NoFieldBeyondZ=99999."); bfldpool->Update();
MaxUnrefCaches Limit the number of spare caches kept. These are used in speeding up lookup and depend on holding a reference (handle) to the geometry.
IgnoreUseEverywhere Ignore the UseEverywhere flag in favor of using a UgliGeometry to determine where there might be field. If UseEverywhere is enabled then a single 2-D map is used at all z locations.
RequireInZTest
  1. no test
  2. complain if problems
  3. complain and return B=0 if outside any steel z range
NoFieldBeyondZ Force B=0 for positions beyond this z. This is useful for UseEverywhere with 2nd SuperModule not energized.

Further Links

Andy Goldstone's study of performance
Robert Hatcher Last Modified: $Date: 2006/06/26 19:12:52 $