40 void checkSolutions(
unsigned int i,
unsigned int& numSolution1,
unsigned int& numSolution2,
unsigned int& numSolution3,
unsigned int& numSolution4);
47 : ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim>(3)
69 edm::LogVerbatim(
"") <<
"<IntegralOverPhiFunction::~IntegralOverPhiFunction>:" << std::endl
125 if ( x < epsilon || x > (
TMath::Pi() - epsilon) )
return 0.;
133 if ( theta0 < epsilon ) theta0 =
epsilon;
135 double cosTheta0 = TMath::Cos(theta0);
136 double cos2Theta0 = TMath::Cos(2*theta0);
137 double sinTheta0 = TMath::Sin(theta0);
138 double cotTheta0 = 1./TMath::Tan(theta0);
139 double cscTheta0 = 1./TMath::Sin(theta0);
142 double cosPhi0 = TMath::Cos(
phi0_);
143 double tanPhi0 = TMath::Tan(
phi0_);
146 double cosTheta = TMath::Cos(x);
147 double cos2Theta = TMath::Cos(2*x);
148 double sinTheta = TMath::Sin(x);
149 double cotTheta = 1./TMath::Tan(x);
150 double cscTheta = 1./TMath::Sin(x);
153 double cosAlpha = TMath::Cos(
alpha_);
155 double s = -cosPhi0*cosPhi0*(2*cosAlpha*cosAlpha + cos2Theta - 4*cosAlpha*cosTheta*cosTheta0 + cos2Theta0)*sinTheta*sinTheta*sinTheta0*sinTheta0;
170 if ( TMath::Abs(x - theta0) >
alpha_ )
return 0;
172 std::cerr <<
"Error in <IntegralOverPhiFunction::operator()>: failed to compute return value !" << std::endl;
175 double r = (1./TMath::Sqrt(2.))*(cscTheta*cscTheta*cscTheta0*cscTheta0*TMath::Sqrt(s)*tanPhi0);
176 double t = cosPhi0*(-cotTheta*cotTheta0 + cosAlpha*cscTheta*cscTheta0);
179 phi[0] = -TMath::ACos(t - r);
180 phi[1] = TMath::ACos(t - r);
181 phi[2] = -TMath::ACos(t + r);
182 phi[3] = TMath::ACos(t + r);
186 <<
"phi[0] = " << phi[0] <<
" (phi[0] - phi0 = " << (phi[0] -
phi0_)*180/
TMath::Pi() <<
")" << std::endl
187 <<
"phi[1] = " << phi[1] <<
" (phi[1] - phi0 = " << (phi[1] -
phi0_)*180/
TMath::Pi() <<
")" << std::endl
188 <<
"phi[2] = " << phi[2] <<
" (phi[2] - phi0 = " << (phi[2] -
phi0_)*180/
TMath::Pi() <<
")" << std::endl
189 <<
"phi[3] = " << phi[3] <<
" (phi[3] - phi0 = " << (phi[3] -
phi0_)*180/
TMath::Pi() <<
")" << std::endl;
194 for (
unsigned int i = 0;
i < 4; ++
i ) {
195 for (
unsigned int j = (
i + 1);
j < 4; ++
j ) {
199 double dPhi_i = phi[
i] -
phi0_;
200 double dPhi_j = phi0_ - phi[
j];
201 if ( TMath::Abs(
normalizedPhi(dPhi_i - dPhi_j)) < epsilon ) {
216 if ( phiMin == 0 && phiMax == 0 ) {
217 edm::LogError(
"") <<
"failed to compute Return Value !" << std::endl;
252 void checkSolutions(
unsigned int i,
unsigned int& numSolution1,
unsigned int& numSolution2,
unsigned int& numSolution3,
unsigned int& numSolution4)
void SetParameters(double *param)
void SetParameterPhi0(double phi0)
unsigned int numSolutionMin2_
virtual double DoParameterDerivative(double, const double *, unsigned int) const
unsigned int numSolutionMax4_
void checkSolutions(unsigned int i, unsigned int &numSolution1, unsigned int &numSolution2, unsigned int &numSolution3, unsigned int &numSolution4)
virtual double DoEvalPar(double x, const double *param) const
void SetParameterAlpha(double alpha)
double DoEval(double x) const
unsigned int numSolutionMin1_
unsigned int numSolutionMax3_
unsigned int numSolutionMax2_
double DoDerivative(double x) const
static const unsigned int debugLevel_
unsigned int numSolutionMin3_
unsigned int numSolutionMin4_
void DoParameterGradient(double x, double *paramGradient) const
IntegralOverPhiFunction()
~IntegralOverPhiFunction()
unsigned int numSolutionMax1_
void SetParameterTheta0(double theta0)