Public Member Functions | Private Attributes | List of all members
LBNEMagneticFieldDecayPipe Class Reference

#include <LBNEMagneticField.hh>

Inheritance diagram for LBNEMagneticFieldDecayPipe:

Public Member Functions

 LBNEMagneticFieldDecayPipe (bool isToroidal)
 
virtual void GetFieldValue (const double Point[3], double *Bfield) const
 
void SetWireCurrent (G4double iC)
 
G4double GetWireCurrent () const
 
void SetWireRadius (G4double r)
 
G4double GetWireRadius () const
 

Private Attributes

G4bool isToroid
 
G4double fWireCurrent
 
G4double fWireRadius
 

Detailed Description

Definition at line 132 of file LBNEMagneticField.hh.

Constructor & Destructor Documentation

LBNEMagneticFieldDecayPipe::LBNEMagneticFieldDecayPipe ( bool  isToroidal)
explicit

Definition at line 479 of file LBNEMagneticField.cc.

479  :
480 isToroid(isToroidal),
481 fWireCurrent(0.),
482 fWireRadius(0.)
483 {
484 }

Member Function Documentation

void LBNEMagneticFieldDecayPipe::GetFieldValue ( const double  Point[3],
double *  Bfield 
) const
virtual

Definition at line 485 of file LBNEMagneticField.cc.

486 {
487 
488 
489  G4double current = fWireCurrent/CLHEP::ampere/1000.;
490  for (size_t k=0; k!=3; ++k) Bfield[k] = 0.;
491 //
492 // No misalignement of this wire..
493 //
494  const double r = std::sqrt(Point[0]*Point[0] + Point[1]*Point[1]);
495  if (r < fWireRadius) return;
496 
497  double magBField = current / (5.*r/CLHEP::cm)/10*CLHEP::tesla; //B(kG)=i(kA)/[5*r(cm)], 1T=10kG
498  Bfield[0] = -magBField*Point[1]/r;
499  Bfield[1] = magBField*Point[0]/r;
500 
501 // std::cerr << " LBNEMagneticFieldWire::GetFieldValue Z " << Point[2]
502 // << " current " << current << " r " << r << " magfield " << magBField << std::endl;
503 
504 }
static Entry * current
G4double LBNEMagneticFieldDecayPipe::GetWireCurrent ( ) const
inline

Definition at line 147 of file LBNEMagneticField.hh.

147 { return fWireCurrent;}
G4double LBNEMagneticFieldDecayPipe::GetWireRadius ( ) const
inline

Definition at line 149 of file LBNEMagneticField.hh.

149 { return fWireRadius;}
void LBNEMagneticFieldDecayPipe::SetWireCurrent ( G4double  iC)
inline

Definition at line 146 of file LBNEMagneticField.hh.

void LBNEMagneticFieldDecayPipe::SetWireRadius ( G4double  r)
inline

Definition at line 148 of file LBNEMagneticField.hh.

Member Data Documentation

G4double LBNEMagneticFieldDecayPipe::fWireCurrent
private

Definition at line 141 of file LBNEMagneticField.hh.

G4double LBNEMagneticFieldDecayPipe::fWireRadius
private

Definition at line 142 of file LBNEMagneticField.hh.

G4bool LBNEMagneticFieldDecayPipe::isToroid
private

Definition at line 140 of file LBNEMagneticField.hh.


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