ATLAS Offline Software
Functions
SCT_SkiAux.cxx File Reference
#include "SCT_GeoModel/SCT_SkiAux.h"
#include "SCT_GeoModel/SCT_MaterialManager.h"
#include "SCT_GeoModel/SCT_GeometryManager.h"
#include "SCT_GeoModel/SCT_Ski.h"
#include "SCT_GeoModel/SCT_Module.h"
#include "SCT_GeoModel/SCT_Bracket.h"
#include "SCT_GeoModel/SCT_Harness.h"
#include "SCT_GeoModel/SCT_SkiPowerTape.h"
#include "GeoModelKernel/GeoTubs.h"
#include "GeoModelKernel/GeoLogVol.h"
#include "GeoModelKernel/GeoPhysVol.h"
#include "GeoModelKernel/GeoNameTag.h"
#include "GeoModelKernel/GeoTransform.h"
#include "GeoModelKernel/GeoMaterial.h"
#include "GeoModelKernel/GeoDefinitions.h"
#include "GeoModelKernel/Units.h"
#include <cmath>

Go to the source code of this file.

Functions

double sqr (double x)
 
void calcMinMaxRatioS (double xCenter, double yCenter, double xWidth, double yWidth, double &minRatio, double &maxRatio)
 

Function Documentation

◆ calcMinMaxRatioS()

void calcMinMaxRatioS ( double  xCenter,
double  yCenter,
double  xWidth,
double  yWidth,
double &  minRatio,
double &  maxRatio 
)

Definition at line 208 of file SCT_SkiAux.cxx.

211 {
212  // Returns minRatio and maxRatio
213 
214  // This function assumes x is always positive.
215  double x = 0.5 * xWidth;
216  double y = 0.5 * yWidth;
217 
218  double r00,r01,r10,r11;
219 
220  r11 = (yCenter + y) / (xCenter + x);
221  r00 = (yCenter - y) / (xCenter - x);
222  r10 = (yCenter + y) / (xCenter - x);
223  r01 = (yCenter - y) / (xCenter + x);
224 
225  minRatio = std::min(r11 , std::min(r00, std::min(r10, r01)));
226  maxRatio = std::max(r11 , std::max(r00, std::max(r10, r01)));
227 
228 }

◆ sqr()

double sqr ( double  x)
inline

Definition at line 31 of file SCT_SkiAux.cxx.

31 {return x*x;}
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
x
#define x
y
#define y