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 116 if (x < epsilon || x > (
TMath::Pi() - epsilon))
125 if (theta0 < epsilon)
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;
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);
184 <<
"phi[0] = " << phi[0] <<
" (phi[0] - phi0 = " << (phi[0] -
phi0_) * 180 /
TMath::Pi() <<
")" 186 <<
"phi[1] = " << phi[1] <<
" (phi[1] - phi0 = " << (phi[1] -
phi0_) * 180 /
TMath::Pi() <<
")" 188 <<
"phi[2] = " << phi[2] <<
" (phi[2] - phi0 = " << (phi[2] -
phi0_) * 180 /
TMath::Pi() <<
")" 190 <<
"phi[3] = " << phi[3] <<
" (phi[3] - phi0 = " << (phi[3] -
phi0_) * 180 /
TMath::Pi() <<
")" 196 for (
unsigned int i = 0;
i < 4; ++
i) {
197 for (
unsigned int j = (
i + 1);
j < 4; ++
j) {
201 double dPhi_i = phi[
i] -
phi0_;
202 double dPhi_j = phi0_ - phi[
j];
210 if (phi[i] == phiMin)
212 if (phi[i] == phiMax)
214 if (phi[j] == phiMin)
216 if (phi[j] == phiMax)
223 if (phiMin == 0 && phiMax == 0) {
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) {
void SetParameters(double const *param) override
void SetParameterPhi0(double phi0)
unsigned int numSolutionMin2_
constexpr T normalizedPhi(T phi)
unsigned int numSolutionMax4_
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 DoDerivative(double x) const
double DoEvalPar(double x, const double *param) const override
static const unsigned int debugLevel_
unsigned int numSolutionMin3_
double DoEval(double x) const override
unsigned int numSolutionMin4_
void DoParameterGradient(double x, double *paramGradient) const
IntegralOverPhiFunction()
alpha
zGenParticlesMatch = cms.InputTag(""),
double DoParameterDerivative(double, const double *, unsigned int) const override
unsigned int numSolutionMax1_
void SetParameterTheta0(double theta0)