CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
IntegrandThetaFunction Class Reference

#include <PhysicsTools/IsolationUtils/src/IntegrandThetaFunction.cc>

Inheritance diagram for IntegrandThetaFunction:

Public Member Functions

virtual ROOT::Math::IGenFunction * Clone () const
 
 IntegrandThetaFunction ()
 
 IntegrandThetaFunction (const IntegrandThetaFunction &bluePrint)
 
IntegrandThetaFunctionoperator= (const IntegrandThetaFunction &bluePrint)
 
void SetParameterAlpha (double alpha)
 
void SetParameterPhi0 (double phi0)
 
void SetParameterTheta0 (double theta0)
 
 ~IntegrandThetaFunction ()
 

Private Member Functions

double DoDerivative (double x) const
 
double DoEval (double x) const
 
virtual double DoEvalPar (double, const double *) const
 
virtual double DoParameterDerivative (double, const double *, unsigned int) const
 
void DoParameterGradient (double x, double *paramGradient) const
 
void SetParameters (double *param)
 

Private Attributes

double alpha_
 
IntegralOverPhiFunctionfPhi_
 
double phi0_
 
double theta0_
 

Static Private Attributes

static const unsigned int debugLevel_ = 0
 

Detailed Description

Description: auxialiary class for fixed area isolation cone computation (this class performs the integration over the polar angle)

Implementation: imported into CMSSW on 05/18/2007

Definition at line 34 of file IntegrandThetaFunction.h.

Constructor & Destructor Documentation

IntegrandThetaFunction::IntegrandThetaFunction ( )

Definition at line 41 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

Referenced by Clone().

42  : ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim>(3)
43 {
44  theta0_ = 0.;
45  phi0_ = 0.;
46  alpha_ = 0.;
47 
49 }
IntegralOverPhiFunction * fPhi_
IntegrandThetaFunction::IntegrandThetaFunction ( const IntegrandThetaFunction bluePrint)

Definition at line 51 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

52 {
53  theta0_ = bluePrint.theta0_;
54  phi0_ = bluePrint.phi0_;
55  alpha_ = bluePrint.alpha_;
56 
57  fPhi_ = new IntegralOverPhiFunction(*bluePrint.fPhi_);
58 }
IntegralOverPhiFunction * fPhi_
IntegrandThetaFunction::~IntegrandThetaFunction ( )

Definition at line 60 of file IntegrandThetaFunction.cc.

References fPhi_.

61 {
62  delete fPhi_;
63 }
IntegralOverPhiFunction * fPhi_

Member Function Documentation

virtual ROOT::Math::IGenFunction* IntegrandThetaFunction::Clone ( ) const
inlinevirtual

Definition at line 47 of file IntegrandThetaFunction.h.

References IntegrandThetaFunction().

47 { return new IntegrandThetaFunction(*this); }
double IntegrandThetaFunction::DoDerivative ( double  x) const
private

Definition at line 161 of file IntegrandThetaFunction.cc.

162 {
163 //--- virtual function inherited from ROOT::Math::ParamFunction base class;
164 // not implemented, because not neccessary, but needs to be defined to make code compile...
165  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
166 
167  return 0.;
168 }
double IntegrandThetaFunction::DoEval ( double  x) const
private

Definition at line 115 of file IntegrandThetaFunction.cc.

References alpha_, debugLevel_, epsilon, fPhi_, phi0_, Pi, IntegralOverPhiFunction::SetParameterAlpha(), IntegralOverPhiFunction::SetParameterPhi0(), IntegralOverPhiFunction::SetParameterTheta0(), theta0_, and x.

116 {
117 //--- return zero if theta either close to zero or close to Pi
118 // (numerical expressions might become "NaN"s)
119  const double epsilon = 1.e-3;
120  if ( x < epsilon || x > (TMath::Pi() - epsilon) ) return 0.;
121 
122 //--- calculate trigonometric expressions
123 // (dependend on angle theta;
124 // polar angle of point within cone)
125  double sinTheta = TMath::Sin(x);
126  double cscTheta = 1./sinTheta;
127 
128  double detJacobi = -cscTheta; // partial derrivative dEta/dTheta (for constant particle density in tau id. isolation cone)
129  //double detJacobi = 1.; // ordinary solid angle (FOR TESTING ONLY)
130 
131 //--- evaluate integral over angle phi
132 // (azimuth angle of point within cone)
136 
137  double integralOverPhi = (*fPhi_)(x);
138 
139  if ( debugLevel_ > 0 ) {
140  edm::LogVerbatim("") << "integralOverPhi = " << integralOverPhi << std::endl
141  << " theta0 = " << theta0_ << std::endl
142  << " phi0 = " << phi0_ << std::endl
143  << " alpha = " << alpha_ << std::endl
144  << " theta = " << x << std::endl
145  << std::endl;
146  }
147 
148 //--- integrand for integration over theta
149 // equals
150 // |dEta/dTheta| * integral over phi * sin(theta)
151 //
152 // (o the factor dEta/dTheta represents the particle density as function of theta,
153 // assuming that the particle density is flat in eta;
154 // o the factor sin(theta) originates from the solid angle surface element
155 // expressed in spherical polar coordinates)
156 //
157  //return TMath::Abs(detJacobi)*integralOverPhi*sinTheta;
158  return TMath::Abs(detJacobi)*integralOverPhi;
159 }
const double Pi
IntegralOverPhiFunction * fPhi_
static const unsigned int debugLevel_
void SetParameterAlpha(double alpha)
const double epsilon
Definition: DDAxes.h:10
void SetParameterTheta0(double theta0)
double IntegrandThetaFunction::DoEvalPar ( double  x,
const double *  param 
) const
privatevirtual

Definition at line 106 of file IntegrandThetaFunction.cc.

References x.

107 {
108  theta0_ = param[0];
109  phi0_ = param[1];
110  alpha_ = param[2];
111 
112  return DoEval(x);
113 }
double DoEval(double x) const
Definition: DDAxes.h:10
double IntegrandThetaFunction::DoParameterDerivative ( double  ,
const double *  ,
unsigned  int 
) const
privatevirtual

Definition at line 170 of file IntegrandThetaFunction.cc.

171 {
172 //--- virtual function inherited from ROOT::Math::ParamFunction base class;
173 // not implemented, because not neccessary, but needs to be defined to make code compile...
174  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
175 
176  return 0.;
177 }
void IntegrandThetaFunction::DoParameterGradient ( double  x,
double *  paramGradient 
) const
private

Definition at line 181 of file IntegrandThetaFunction.cc.

182 {
183 //--- virtual function inherited from ROOT::Math::ParamFunction base class;
184 // not implemented, because not neccessary, but needs to be defined to make code compile...
185  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
186 }
IntegrandThetaFunction & IntegrandThetaFunction::operator= ( const IntegrandThetaFunction bluePrint)

Definition at line 69 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

70 {
71  theta0_ = bluePrint.theta0_;
72  phi0_ = bluePrint.phi0_;
73  alpha_ = bluePrint.alpha_;
74 
75  (*fPhi_) = (*bluePrint.fPhi_);
76 
77  return (*this);
78 }
IntegralOverPhiFunction * fPhi_
void IntegrandThetaFunction::SetParameterAlpha ( double  alpha)

Definition at line 94 of file IntegrandThetaFunction.cc.

References alpha, and alpha_.

Referenced by ConeAreaFunction::DoEval().

95 {
96  alpha_ = alpha;
97 }
float alpha
Definition: AMPTWrapper.h:95
void IntegrandThetaFunction::SetParameterPhi0 ( double  phi0)

Definition at line 89 of file IntegrandThetaFunction.cc.

References normalizedPhi(), and phi0_.

Referenced by ConeAreaFunction::DoEval().

90 {
91  phi0_ = normalizedPhi(phi0); // map azimuth angle into interval [-pi,+pi]
92 }
double normalizedPhi(double phi)
Definition: normalizedPhi.cc:5
void IntegrandThetaFunction::SetParameters ( double *  param)
private

Definition at line 99 of file IntegrandThetaFunction.cc.

References alpha_, phi0_, and theta0_.

100 {
101  theta0_ = param[0];
102  phi0_ = param[1];
103  alpha_ = param[2];
104 }
void IntegrandThetaFunction::SetParameterTheta0 ( double  theta0)

Definition at line 84 of file IntegrandThetaFunction.cc.

References theta0_.

Referenced by ConeAreaFunction::DoEval().

85 {
86  theta0_ = theta0;
87 }

Member Data Documentation

double IntegrandThetaFunction::alpha_
mutableprivate
const unsigned int IntegrandThetaFunction::debugLevel_ = 0
staticprivate

Definition at line 64 of file IntegrandThetaFunction.h.

Referenced by DoEval().

IntegralOverPhiFunction* IntegrandThetaFunction::fPhi_
mutableprivate
double IntegrandThetaFunction::phi0_
mutableprivate
double IntegrandThetaFunction::theta0_
mutableprivate