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 33 of file IntegrandThetaFunction.h.

Constructor & Destructor Documentation

IntegrandThetaFunction::IntegrandThetaFunction ( )

Definition at line 40 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

Referenced by Clone().

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

Definition at line 50 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

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

Definition at line 59 of file IntegrandThetaFunction.cc.

References fPhi_.

60 {
61  delete fPhi_;
62 }
IntegralOverPhiFunction * fPhi_

Member Function Documentation

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

Definition at line 46 of file IntegrandThetaFunction.h.

References IntegrandThetaFunction().

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

Definition at line 160 of file IntegrandThetaFunction.cc.

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

Definition at line 114 of file IntegrandThetaFunction.cc.

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

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

Definition at line 105 of file IntegrandThetaFunction.cc.

References x().

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

Definition at line 169 of file IntegrandThetaFunction.cc.

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

Definition at line 180 of file IntegrandThetaFunction.cc.

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

Definition at line 68 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

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

Definition at line 93 of file IntegrandThetaFunction.cc.

References alpha, and alpha_.

Referenced by ConeAreaFunction::DoEval().

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

Definition at line 88 of file IntegrandThetaFunction.cc.

References normalizedPhi(), and phi0_.

Referenced by ConeAreaFunction::DoEval().

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

Definition at line 98 of file IntegrandThetaFunction.cc.

References alpha_, phi0_, and theta0_.

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

Definition at line 83 of file IntegrandThetaFunction.cc.

References theta0_.

Referenced by ConeAreaFunction::DoEval().

84 {
85  theta0_ = theta0;
86 }

Member Data Documentation

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

Definition at line 63 of file IntegrandThetaFunction.h.

Referenced by DoEval().

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