SND@LHC Software
Loading...
Searching...
No Matches
genfit::BellField Class Reference

Bell Field for SHiP. More...

#include <BellField.h>

Inheritance diagram for genfit::BellField:
Collaboration diagram for genfit::BellField:

Public Member Functions

 BellField ()
 
 BellField (double Peak, double Middle, int orientation, double Btube)
 
TVector3 get (const TVector3 &pos) const
 return value at position
 
void get (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz) const
 Get the magneticField [kGauss] at position.
 
 BellField ()
 
 BellField (double Peak, double Middle)
 
TVector3 get (const TVector3 &pos) const
 return value at position
 
void get (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz) const
 Get the magneticField [kGauss] at position.
 
- Public Member Functions inherited from genfit::AbsBField
 AbsBField ()
 
virtual ~AbsBField ()
 

Private Attributes

double fMiddle
 
double fPeak
 
int fOrient
 
double fBtube
 

Detailed Description

Bell Field for SHiP.

Author
Thomas Ruf CERN

Definition at line 35 of file BellField.h.

Constructor & Destructor Documentation

◆ BellField() [1/4]

genfit::BellField::BellField ( )

Default constructor

Definition at line 33 of file BellField.cc.

34 : AbsBField(),
35 fMiddle(0),fPeak(0)
36 { ; }

◆ BellField() [2/4]

genfit::BellField::BellField ( double  Peak,
double  Middle,
int  orientation,
double  Btube 
)

Standard constructor

Definition at line 37 of file BellField.cc.

38 : AbsBField(),
39 fMiddle(Middle),fPeak(Peak),fOrient(orientation),fBtube(Btube)
40 { ; }

◆ BellField() [3/4]

genfit::BellField::BellField ( )

Default constructor

◆ BellField() [4/4]

genfit::BellField::BellField ( double  Peak,
double  Middle 
)

Standard constructor

Member Function Documentation

◆ get() [1/4]

void genfit::BellField::get ( const double &  posX,
const double &  posY,
const double &  posZ,
double &  Bx,
double &  By,
double &  Bz 
) const
virtual

Get the magneticField [kGauss] at position.

Override this in your concrete implementation.

Reimplemented from genfit::AbsBField.

Definition at line 49 of file BellField.cc.

49 {
50 Double_t zlocal=fabs((z-fMiddle)/100.);
51 Bz = 0.;
52 By = 0.;
53 Bx = 0.;
54 if (fOrient==1){ By = fPeak/(1.+pow(fabs(zlocal)/2.1,6.));}
55 if (fOrient==2){
56 //new field based on simulation of Davide Tommasini (22/1/2015)
57
58 //field in box 20 cm larger than inner tube.
59 if ( (fabs(x)<2.7*meter) && (fabs(y)<fBtube+0.2*meter) ) {
60 if (zlocal<3.8) {
61 Bx=0.14361*exp( -0.5 * pow((zlocal-0.45479E-01)/2.5046,2.));
62 }else if (zlocal<11.9) {
63 Bx=0.19532-0.61512E-01*zlocal+0.68447E-02*pow(zlocal,2.)-0.25672E-03*pow(zlocal,3.);
64 }
65 Bx=((fPeak/tesla)/0.14361)*Bx*tesla;
66 }
67 // cout << "genfit Bell " << x << ", " << y << ", " << z << ", Bx= " << Bx << endl;
68 }
69}
Double_t meter
Definition BellField.cc:27
Double_t tesla

◆ get() [2/4]

void genfit::BellField::get ( const double &  posX,
const double &  posY,
const double &  posZ,
double &  Bx,
double &  By,
double &  Bz 
) const
virtual

Get the magneticField [kGauss] at position.

Override this in your concrete implementation.

Reimplemented from genfit::AbsBField.

◆ get() [3/4]

TVector3 genfit::BellField::get ( const TVector3 &  pos) const
virtual

return value at position

Implements genfit::AbsBField.

Definition at line 42 of file BellField.cc.

42 {
43 Double_t bx,by,bz;
44 get(pos.X(),pos.Y(),pos.Z(),bx,by,bz);
45 TVector3 field_(bx,by,bz);
46 return field_;
47}
TVector3 get(const TVector3 &pos) const
return value at position
Definition BellField.cc:42

◆ get() [4/4]

TVector3 genfit::BellField::get ( const TVector3 &  pos) const
virtual

return value at position

Implements genfit::AbsBField.

Member Data Documentation

◆ fBtube

double genfit::BellField::fBtube
private

Definition at line 53 of file BellField.h.

◆ fMiddle

double genfit::BellField::fMiddle
private

Definition at line 50 of file BellField.h.

◆ fOrient

int genfit::BellField::fOrient
private

Definition at line 52 of file BellField.h.

◆ fPeak

double genfit::BellField::fPeak
private

Definition at line 51 of file BellField.h.


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