|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef EFLOWCELLINTEGRATION_H_
13 #define EFLOWCELLINTEGRATION_H_
33 template <
class IntegrandType>
48 double Imean = (I5 + I6) / 2.0;
49 if (fabs(I5 - I6) / Imean <=
m_error) {
66 int j = nOrder * (nOrder - 1) / 2;
70 double rangeCenter =
range.getCenter();
71 double rangeHalfWidth =
range.getWidth()/2;
76 for (
int i = 0;
i < nOrder;
i++) {
77 x = rangeCenter + roots[
i] * rangeHalfWidth;
82 std::cerr <<
"eflowCellIntergrator::DoGaussLegendreIntegration ERROR : Invalid pointer to IntegrandType and cannot perform integration" << std::endl;
84 if (
I < 0. || rangeHalfWidth < 0.) std::cerr <<
"eflowCellIntergrator::DoGaussLegendreIntegration WARNING: I = " <<
I <<
"\trange = " <<
range.print() << std::endl;
86 return I * rangeHalfWidth;
92 double subRangeWidth =
range.getWidth() / nSubRanges;
97 for (
int i = 0;
i < nSubRanges;
i++) {
99 subRange.
shift(subRangeWidth);
Class that controls the 2D integration.
Scalar phi() const
phi method
Exp_t
Enum used as template argument to switch between std::exp and the lookup-table based version.
Scalar eta() const
pseudorapidity method
etaRange
Filling Eta range.
constexpr double legendreRoots[21]
Stores roots of 5th and 6th order Legendre polynomials.
Lookup-table based exponential function to save CPU time, which is used by eflowCellIntegrator.
Class to perform a generic recursive Gauss-Legendre Integration, see http://en.wikipedia....
virtual double integrate(const eflowRange &range)
eflowCellIntegrator & operator=(const eflowCellIntegrator &original)
double evaluateStdExp(double rSq) const
eflowRecursiveGaussLegendreIntegrator< eflowCellIntegrand<(Exp_t) expType > > m_innerIntegrator
constexpr double legendreWeights[21]
Stores weights of 5th and 6th order Legendre polynomials.
double evaluateLookupExp(double rSq) const
float getError(const xAOD::TrackParticle &p, Trk::ParamDefs par)
Accessor utility function for getting the track parameters error.
double evaluate(double x) const
std::unique_ptr< eflowCellIntegrand<(Exp_t) expType > > m_integrand2D
double evaluate(double eta)
Evaluate method for the outer (i.e.
double evaluate(double y)
The evaluate method for the integration.
eflowCellIntegrator(double stdDev, double error)
IntegrandType * m_integrand
eflowRecursiveGaussLegendreIntegrator< eflowCellIntegrator< expType > > m_outerIntegrator
const eflowLookupExp * m_lookupExp
double integrate(const eflowRange &etaRange, const eflowRange &phiRange)
Main method, which starts the integration.
double RecurseIntegration(const eflowRange &range, int nSubRanges)
void setEtaSq(double xSq)
double m_oneOverTwoSigmaSq
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
eflowCellIntegrand(double sigma)
phiRange
Filling Phi ranges.
virtual ~eflowRecursiveGaussLegendreIntegrator()
eflowCellIntegrator(const eflowCellIntegrator &original)
double DoGaussLegendreIntegration(const eflowRange &range, int nOrder)
Class to represent the 2D Gaussian integrand.
eflowRecursiveGaussLegendreIntegrator(IntegrandType *integrand, double error)