g4beamline_ blengefunction class reference.pdf

Upload: nguyen-thanh-cong

Post on 02-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    1/6

    Ngy 8 thng 12 nm 2014 g4beamline: BLEngeFunction Class Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    Main Page Classes Files Directories

    Alphabetical List Class List Class Hierarchy Class Members

    BLEngeFunction Class Reference

    #include

    List of all members.

    Detailed Description

    class EngeFunction implements the Enge function for fringe fields.

    z is the distance from the nominal edge, with z=0 being the edge. it should be divided by the aperture diameter orfull width/height. z0 is outside.

    See the COSY reference manual (pp 32-35) for suggested values of a1-a6, or use the ENGE_BEND orENGE_QUAD types (which come from there). http://cosy.pa.msu.edu/cosymanu/index.html

    Mathematica was used to compute the derivatives.

    Public Member Functions

    BLEngeFunction ()

    default constructor.

    BLEngeFunction (BLEngeType t)

    constructor for common magnet types.

    BLEngeFunction (double _a1, double _a2, double _a3, double _a4, double _a5, double _a6)

    general constructor.

    void set(double _a1, double _a2, double _a3, double _a4, double _a5, double _a6)

    set the parameters.

    double operator()(double z) const

    evaluate the Enge function at z.

    double prime(double z) const

    evaluate the derivative of the Enge funct ion at z.

    double first(double z)

    double second(double z) const

    evaluate the second derivative of the Enge funct ion at z.

    double third(double z) const

    evaluate the third derivative of theEnge function at z.

    double fourth(double z) const

    evaluate the fourth derivative of the Enge funct ion at z.

    double fifth(double z) const

    evaluate the fifth derivative of the Enge function at z.

    BLEngeType getType() const

    return the type of Enge funct ion

    Private Attributes

    BLEngeType type

    double a1

    double a2

    double a3

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction-members.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction-members.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classes.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classes.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/annotated.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/annotated.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/hierarchy.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/functions.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classes.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/annotated.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/hierarchy.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/functions.htmlhttp://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://-/?-http://cosy.pa.msu.edu/cosymanu/index.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction-members.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/functions.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/hierarchy.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/annotated.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classes.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/dirs.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/files.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/classes.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/main.html
  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    2/6

    Ngy 8 thng 12 nm 2014 g4beamline: BLEngeFunction Class Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    double a4

    double a5

    double a6

    Constructor & Destructor Documentation

    BLEngeFunction::BLEngeFunction ( ) [inline]

    default constructor.

    References ENGE_BLOCK, and type.

    00045 { type=ENGE_BLOCK; set(0,0,0,0,0,0); }

    BLEngeFunction::BLEngeFunction (BLEngeType t ) [inline]

    constructor for common magnet types.

    References ENGE_BEND, ENGE_BLOCK, ENGE_OTHER, ENGE_QUAD, and type.

    00047 {

    00048 switch(t) {

    00049 caseENGE_BLOCK:

    00050 caseENGE_OTHER:

    00051 set(0,0,0,0,0,0);

    00052 break;

    00053 caseENGE_BEND:

    00054 set(0.478959,1.911289,-1.185953,1.630554,-1.082657,0.318111);

    00055 break;

    00056 caseENGE_QUAD:

    00057 set(0.296471,4.533219,-2.270982,1.068627,-0.036391,0.022261);

    00058 break;

    00059 }00060 type= t;

    00061 }

    BLEngeFunction::BLEngeFunction ( double _a1,

    double _a2,

    double _a3,

    double _a4,

    double _a5,

    double _a6

    ) [inline]

    general constructor.

    00064 {

    00065 set(_a1,_a2,_a3,_a4,_a5,_a6);

    00066 }

    Member Function Documentation

    http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652d59860a811d83a441660ca0a684095bdehttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df3ece9a18615197064e8e1e8d79c7488http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652d7f4cbfaa19eb59e4c26364e7b429f72fhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://-/?-http://-/?-http://-/?-
  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    3/6

    Ngy 8 thng 12 nm 2014 g4beamline: BLEngeFunction Class Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    void BLEngeFunction::set ( double _a1,

    double _a2,

    double _a3,

    double _a4,

    double _a5,

    double _a6

    ) [inline]

    set the parameters.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, ENGE_OTHER, and type.

    Referenced by GenericBendField::GenericBendField(), GenericQuadField::GenericQuadField(), andMultipoleField::MultipoleField().

    00069 {

    00070 a1=_a1; a2=_a2; a3=_a3; a4=_a4; a5=_a5; a6=_a6;

    00071 if(a1==0.0 && a2==0.0 && a3==0.0 && a4==0.0 && a5==0.0 &&

    00072 a6==0.0)

    00073 type= ENGE_BLOCK;

    00074 else

    00075 type= ENGE_OTHER;

    00076 }

    double BLEngeFunction::operator() ( double z) const[inline]

    evaluate the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    00078 {

    00079 if(type== ENGE_BLOCK) return(z 4.0) return0.0;

    00082 return1.0/(1.0+exp(a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6))))));

    00083 }

    double BLEngeFunction::prime ( double z) const[inline]

    evaluate the derivative of the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    Referenced by GenericQuadField::addFieldValue(), GenericBendField::addFieldValue(), and first().

    00085 {

    00086 if(type== ENGE_BLOCK) return0.0;

    00087 if(fabs(z) > 4.0) return0.0;

    00088 doubleexp1 = exp(a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6)))));

    00089 return-exp1/(1.0+exp1)/(1.0+exp1)*

    00090 (a2+z*(2.0*a3+z*(3.0*a4+z*(4.0*a5+z*5.0*a6))));

    00091 }

    double BLEngeFunction::first ( double z) [inline]

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00092http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00400http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericquad_8cc-source.html#l00425http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652d7f4cbfaa19eb59e4c26364e7b429f72fhttp://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDmultipole_8cc-source.html#l00323http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericquad_8cc-source.html#l00377http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00350http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042
  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    4/6

    Ngy 8 thng 12 nm 2014 g4beamline: BLEngeFunctionClass Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    References prime().

    00092 { returnprime(z); }

    double BLEngeFunction::second ( double z) const[inline]

    evaluate the second derivative of the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    Referenced by GenericBendField::addFieldValue().

    00094 {

    00095 if(type== ENGE_BLOCK) return0.0;

    00096 if(fabs(z) > 4.0) return0.0;

    00097 doublef1 = a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6))));

    00098 doublef2 = (a2+2*a3*z+3*a4*z*z+4*a5*z*z*z+5*a6*z*z*z*z);

    00099 doublef3 = (2*a3+6*a4*z+12*a5*z*z+20*a6*z*z*z);

    00100 doubleexp1 = exp(f1);

    00101 returnexp1*((exp1-1.0)*f2*f2-(1.0+exp1)*f3)/

    00102 (1.0+exp1)/(1.0+exp1)/(1.0+exp1);

    00103 }

    double BLEngeFunction::third ( double z) const[inline]

    evaluate the third derivative of the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    Referenced by GenericBendField::addFieldValue().

    00105 {

    00106 if(type== ENGE_BLOCK) return0.0;00107 if(fabs(z) > 4.0) return0.0;

    00108 doublef1 = a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6))));

    00109 doublef2 = a2+z*(2*a3+z*(3*a4+4*a5*z+5*a6*z*z));

    00110 doublef3 = 2*(a3+z*(3*a4+2*z*(3*a5+5*a6*z)));

    00111 doublef4 = a4+2.0*z*(2.0*a5+5.0*a6*z);

    00112 doubleexp1 = exp(f1);

    00113 doubleonepexp1 = 1.0 + exp1;

    00114 return-exp1*(6*exp1*exp1*f2*f2*f2-6*exp1*f2*(f2*f2+f3)*onepexp1

    00115 +(f2*f2*f2+3*f2*f3+6*f4)*onepexp1*onepexp1)

    00116 /(onepexp1*onepexp1*onepexp1*onepexp1);

    00117 }

    double BLEngeFunction::fourth ( double z ) const[inline]

    evaluate the fourth derivative of the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    Referenced by GenericBendField::addFieldValue().

    00119 {

    00120 if(type== ENGE_BLOCK) return0.0;

    00121 if(fabs(z) > 4.0) return0.0;

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00400http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00400http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00400http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085
  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    5/6

    Ngy 8thng 12 nm 2014 g4beamline: BLEngeFunction Class Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    00122 doublef1 = a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6))));

    00123 doublef2 = a2+z*(2*a3+z*(3*a4+4*a5*z+5*a6*z*z));

    00124 doublef3 = 2*(a3+z*(3*a4+2*z*(3*a5+5*a6*z)));

    00125 doublef4 = a4+2.0*z*(2.0*a5+5.0*a6*z);

    00126 doublef5 = a5+ 5*a6*z;

    00127 doubleexp1 = exp(f1);

    00128 doubleonepexp1 = 1.0 + exp1;

    00129 return-exp1*(-24*exp1*exp1*exp1*f2*f2*f2*f2+onepexp1*

    00130 (36*exp1*exp1*f2*f2*(f2*f2+f3)-2*exp1*(7*f2*f2*f2*f2

    00131 +18*f2*f2*f3+3*f3*f3+24*f2*f4)*onepexp1

    00132 +(f2*f2*f2*f2+6*f2*f2*f3+3*f3*f3+24*f2*f4+24*f5)00133 *onepexp1*onepexp1))

    00134 /(onepexp1*onepexp1*onepexp1*onepexp1*onepexp1);

    00135 }

    double BLEngeFunction::fifth ( double z) const[inline]

    evaluate the fifth derivative of the Enge function at z.

    References a1, a2, a3, a4, a5, a6, ENGE_BLOCK, and type.

    Referenced by GenericBendField::addFieldValue().

    00137 {

    00138 if(type== ENGE_BLOCK) return0.0;

    00139 if(fabs(z) > 4.0) return0.0;

    00140 doublef1 = a1+z*(a2+z*(a3+z*(a4+z*(a5+z*a6))));

    00141 doublef2 = a2+z*(2*a3+z*(3*a4+4*a5*z+5*a6*z*z));

    00142 doublef3 = 2*(a3+z*(3*a4+2*z*(3*a5+5*a6*z)));

    00143 doublef4 = a4+2.0*z*(2.0*a5+5.0*a6*z);

    00144 doublef5 = a5+ 5*a6*z;

    00145 doubleexp1 = exp(f1);

    00146 doubleonepexp1 = 1.0 + exp1;

    00147 return-exp1/(onepexp1*onepexp1*onepexp1*onepexp1*onepexp1*onepexp

    00148 *(120*exp1*exp1*exp1*exp1*f2*f2*f2*f2*f200149 -240*exp1*exp1*exp1*f2*f2*f2*(f2*f2+f3)*onepexp1

    00150 +onepexp1*onepexp1*(30*exp1*exp1*f2*(5*f2*f2*f2*f2

    00151 +12*f2*f2*f3+3*f3*f3+12*f2*f4)-10*exp1*(3*f2*f2*f2*f2*f2

    00152 +14*f2*f2*f2*f3+9*f2*f3*f3+36*f2*f2*f4+12*f3*f4+24*f2*f5)

    00153 *onepexp1+(120*a6+f2*f2*f2*f2*f2+10*f2*f2*f2*f3+60*f2*f2*f4

    00154 +60*f3*f4+15*f2*(f3*f3+8*f5))*onepexp1*onepexp1));

    00155 }

    BLEngeTypeBLEngeFunction::getType ( ) const[inline]

    return the type of Enge function

    References type.

    Referenced by GenericBendField::GenericBendField(), and GenericQuadField::GenericQuadField().

    00157 { returntype; }

    Member Data Documentation

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericquad_8cc-source.html#l00377http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00350http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652dhttp://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652df43cac878f043f846d46983f67485965http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLCMDgenericbend_8cc-source.html#l00400http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00041http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00026http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00042http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 g4beamline_ BLEngeFunction Class Reference.pdf

    6/6

    Ngy 8 thng 12 nm 2014 g4beamline: BLEngeFunction Class Reference

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/classBLEngeFunction.html

    BLEngeTypeBLEngeFunction::type[private]

    Referenced by BLEngeFunction(), fifth(), fourth(), getType(), operator()() , prime(), second(), set(), andthird().

    double BLEngeFunction::a1[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

    double BLEngeFunction::a2[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

    double BLEngeFunction::a3[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

    double BLEngeFunction::a4[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

    double BLEngeFunction::a5[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

    double BLEngeFunction::a6[private]

    Referenced by fifth(), fourth(), operator()(), prime(), second(), set(), and third().

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

    BLEngeFunction.hh

    g4beamline

    http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.htmlhttp://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00105http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00068http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00094http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00085http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00078http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00157http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00119http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00137http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh-source.html#l00045http://-/?-http://www.muonsinternal.com/muons3/g4beamline/Doxygen/BLEngeFunction_8hh.html#0213ece9d3c3b8877a18797ccfe2652d