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

#include <LBNEVolumePlacements.hh>

Public Member Functions

 LBNEHornRadialEquation ()
 
 LBNEHornRadialEquation (double rSqrtCoefficient, double zCoefficient, double rOffset, bool parabolic=true)
 
double GetVal (double z) const
 
void test1 () const
 
void SetLongRescaleFactor (double r)
 
void SetRadialRescaleFactor (double r)
 
void SetRadialRescaleFactorCst (double r)
 

Private Attributes

bool parabolic
 
double rCoeff
 
double zCoeff
 
double rOff
 
double rResc
 
double rRescCst
 
double zResc
 

Static Private Attributes

static double inchDef = 2.54*CLHEP::cm
 

Detailed Description

Definition at line 89 of file LBNEVolumePlacements.hh.

Constructor & Destructor Documentation

LBNEHornRadialEquation::LBNEHornRadialEquation ( )
LBNEHornRadialEquation::LBNEHornRadialEquation ( double  rSqrtCoefficient,
double  zCoefficient,
double  rOffset,
bool  parabolic = true 
)

Definition at line 1597 of file LBNEDownstrVolPlacements.cc.

Member Function Documentation

double LBNEHornRadialEquation::GetVal ( double  z) const

Definition at line 1607 of file LBNEDownstrVolPlacements.cc.

1607  {
1608  // z = 0 above is by arbitrary choice the Z coordinate of the starting point of the Horn1TopLevelUpstr logical volume
1609  // We shift the drawing coordinate system
1610  // const double zD = z + 3.2852*inchDef*zResc; // Only valid for Horn1 !!!!!
1611 // By definition, drawing 8875.000-ME-363028 (Z=0 is ACTRNT)
1612 
1613  const double zR = z/inchDef; // back in inches.
1614  const double argR = rCoeff + zR*zCoeff/zResc;
1615  if (argR < 0.) {
1616  std::ostringstream mStrStr; mStrStr << " Negative argument, z = " << z
1617  << " argR " << argR << " zResc " << zResc << std::endl;
1618  G4String mStr(mStrStr.str());
1619  G4Exception("LBNEHornRadialEquation::GetVal", " ", FatalErrorInArgument, mStr.c_str());
1620  }
1621  const double radius = parabolic ? (std::sqrt(argR) + rOff) : argR;
1622 // return radius*zResc*inchDef; v3r0p10
1623  return (radius*rResc*inchDef + rRescCst); // Dec 16: add a constant term for this linear transform
1624 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:45
double z
QTextStream & endl(QTextStream &s)
void LBNEHornRadialEquation::SetLongRescaleFactor ( double  r)
inline

Definition at line 108 of file LBNEVolumePlacements.hh.

void LBNEHornRadialEquation::SetRadialRescaleFactor ( double  r)
inline

Definition at line 109 of file LBNEVolumePlacements.hh.

void LBNEHornRadialEquation::SetRadialRescaleFactorCst ( double  r)
inline

Definition at line 110 of file LBNEVolumePlacements.hh.

void LBNEHornRadialEquation::test1 ( ) const

Definition at line 1626 of file LBNEDownstrVolPlacements.cc.

1626  {
1627 
1628  //Test at the end of first section of Horn1 (8875.112-MD 363104)
1629  const double argZ = (3.2645 + 17.876 - 0.031);
1630  const double rTest = this->GetVal(argZ*25.4*CLHEP::mm*zResc);
1631  std::cerr << " LBNEHornRadialEquation::test1, argZ " << argZ << " rTest (mm) " << rTest << std::endl;
1632  std::cerr << " inchDef " << inchDef << " zCoeff " << zCoeff << " rCoeff " << rCoeff << " rOff " << rOff << std::endl;
1633  const double delta = 2.0*rTest - 1.6326*25.4*CLHEP::mm*rResc; // Actually, the drawing says 1.6 !!! mistake of 700 microns.
1634  std::cerr << " delta (mm) " << delta << " zResc " << zResc << " rResc " << rResc << std::endl;
1635  if (std::abs(delta) > 0.127*CLHEP::mm) { // 5 mill tolerance
1636  G4Exception("LBNEHornRadialEquation::test1", " ", FatalErrorInArgument,
1637  " Horn1 Equation 0 inconsistent with drawing 363104");
1638  }
1639 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:45
T abs(T value)
double GetVal(double z) const
QTextStream & endl(QTextStream &s)

Member Data Documentation

double LBNEHornRadialEquation::inchDef = 2.54*CLHEP::cm
staticprivate

Definition at line 98 of file LBNEVolumePlacements.hh.

bool LBNEHornRadialEquation::parabolic
private

Definition at line 99 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::rCoeff
private

Definition at line 100 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::rOff
private

Definition at line 102 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::rResc
private

Definition at line 103 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::rRescCst
private

Definition at line 104 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::zCoeff
private

Definition at line 101 of file LBNEVolumePlacements.hh.

double LBNEHornRadialEquation::zResc
private

Definition at line 105 of file LBNEVolumePlacements.hh.


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