CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RKLocalFieldProvider.cc
Go to the documentation of this file.
1 #include "RKLocalFieldProvider.h"
4 
6  theVolume( &vol), theFrame(vol), transform_(false) {}
7 
9  theVolume( &vol), theFrame(frame), transform_(true) {}
10 
11 /*
12 RKLocalFieldProvider::RKLocalFieldProvider() :
13  theVolume(0), theFrame(globalFrame()), transform_(false) {}
14 
15 RKLocalFieldProvider::RKLocalFieldProvider( const Frame& frame) :
16  theVolume(0), theFrame(frame), transform_(true) {}
17 */
18 
20 {
21  if (theVolume != 0) {
22  if (transform_) {
25  }
26  else {
27  return theVolume->fieldInTesla( lp).basicVector();
28  }
29  }
30  else {
31  /*
32  if (transform_) {
33  GlobalVector gv( MagneticField::inTesla(theFrame.toGlobal(lp)));
34  return theFrame.toLocal(gv).basicVector();
35  }
36  else {
37  // the "local" frame is actually global
38  return MagneticField::inTesla( GlobalPoint( lp.basicVector())).basicVector();
39  }
40  */
41 
42  return RKLocalFieldProvider::Vector(0,0,0);
43  }
44 }
45 
const MagVolume * theVolume
LocalPoint toLocal(const GlobalPoint &gp) const
RKLocalFieldProvider(const MagVolume &vol)
Global field access, result in global frame.
GlobalPoint toGlobal(const LocalPoint &lp) const
LocalVector fieldInTesla(const LocalPoint &lp) const
Definition: MagVolume.cc:11
GlobalVector::BasicVectorType Vector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
Vector inTesla(const LocalPoint &lp) const
the argument lp is in the local frame specified in the constructor