40 unsigned int& numSolution1,
41 unsigned int& numSolution2,
42 unsigned int& numSolution3,
43 unsigned int& numSolution4);
50 :
ROOT::Math::ParamFunction<
ROOT::Math::IParametricGradFunctionOneDim>(3) {
70 edm::LogVerbatim(
"") <<
"<IntegralOverPhiFunction::~IntegralOverPhiFunction>:" << std::endl
102 double x,
const double* param)
const 129 double cosTheta0 = TMath::Cos(theta0);
130 double cos2Theta0 = TMath::Cos(2 * theta0);
131 double sinTheta0 = TMath::Sin(theta0);
132 double cotTheta0 = 1. / TMath::Tan(theta0);
133 double cscTheta0 = 1. / TMath::Sin(theta0);
136 double cosPhi0 = TMath::Cos(
phi0_);
137 double tanPhi0 = TMath::Tan(
phi0_);
140 double cosTheta = TMath::Cos(
x);
141 double cos2Theta = TMath::Cos(2 *
x);
142 double sinTheta = TMath::Sin(
x);
143 double cotTheta = 1. / TMath::Tan(
x);
144 double cscTheta = 1. / TMath::Sin(
x);
147 double cosAlpha = TMath::Cos(
alpha_);
149 double s = -cosPhi0 * cosPhi0 *
150 (2 * cosAlpha * cosAlpha + cos2Theta - 4 * cosAlpha * cosTheta * cosTheta0 + cos2Theta0) * sinTheta *
151 sinTheta * sinTheta0 * sinTheta0;
166 if (TMath::Abs(
x - theta0) >
alpha_)
168 if (TMath::Abs(
x - theta0) <=
alpha_)
170 std::cerr <<
"Error in <IntegralOverPhiFunction::operator()>: failed to compute return value !" << std::endl;
173 double r = (1. / TMath::Sqrt(2.)) * (cscTheta * cscTheta * cscTheta0 * cscTheta0 * TMath::Sqrt(
s) * tanPhi0);
174 double t = cosPhi0 * (-cotTheta * cotTheta0 + cosAlpha * cscTheta * cscTheta0);
177 phi[0] = -TMath::ACos(
t -
r);
178 phi[1] = TMath::ACos(
t -
r);
179 phi[2] = -TMath::ACos(
t +
r);
180 phi[3] = TMath::ACos(
t +
r);
196 for (
unsigned int i = 0;
i < 4; ++
i) {
197 for (
unsigned int j = (
i + 1);
j < 4; ++
j) {
224 edm::LogError(
"") <<
"failed to compute Return Value !" << std::endl;
257 unsigned int& numSolution1,
258 unsigned int& numSolution2,
259 unsigned int& numSolution3,
260 unsigned int& numSolution4) {
Log< level::Info, true > LogVerbatim
void SetParameters(double const *param) override
void SetParameterPhi0(double phi0)
unsigned int numSolutionMin2_
constexpr T normalizedPhi(T phi)
unsigned int numSolutionMax4_
Log< level::Error, false > LogError
void checkSolutions(unsigned int i, unsigned int &numSolution1, unsigned int &numSolution2, unsigned int &numSolution3, unsigned int &numSolution4)
void SetParameterAlpha(double alpha)
unsigned int numSolutionMin1_
unsigned int numSolutionMax3_
~IntegralOverPhiFunction() override
unsigned int numSolutionMax2_
double DoEvalPar(double x, const double *param) const override
double DoDerivative(double x) const
static const unsigned int debugLevel_
unsigned int numSolutionMin3_
unsigned int numSolutionMin4_
void DoParameterGradient(double x, double *paramGradient) const
double DoEval(double x) const override
IntegralOverPhiFunction()
Log< level::Warning, false > LogWarning
double DoParameterDerivative(double, const double *, unsigned int) const override
unsigned int numSolutionMax1_
void SetParameterTheta0(double theta0)