CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

IntegrandThetaFunction Class Reference

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

List of all members.

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().

  : ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim>(3)
{
  theta0_ = 0.; 
  phi0_ = 0.; 
  alpha_ = 0.; 

  fPhi_ = new IntegralOverPhiFunction();
}
IntegrandThetaFunction::IntegrandThetaFunction ( const IntegrandThetaFunction bluePrint)

Definition at line 51 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

{
  theta0_ = bluePrint.theta0_;
  phi0_ = bluePrint.phi0_;
  alpha_ = bluePrint.alpha_;

  fPhi_ = new IntegralOverPhiFunction(*bluePrint.fPhi_);
}
IntegrandThetaFunction::~IntegrandThetaFunction ( )

Definition at line 60 of file IntegrandThetaFunction.cc.

References fPhi_.

{
  delete fPhi_;
}

Member Function Documentation

virtual ROOT::Math::IGenFunction* IntegrandThetaFunction::Clone ( ) const [inline, virtual]

Definition at line 47 of file IntegrandThetaFunction.h.

References IntegrandThetaFunction().

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

Definition at line 161 of file IntegrandThetaFunction.cc.

{
//--- virtual function inherited from ROOT::Math::ParamFunction base class;
//    not implemented, because not neccessary, but needs to be defined to make code compile...
  edm::LogWarning("") << "Function not implemented yet !" << std::endl;

  return 0.;
}
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.

{
//--- return zero if theta either close  to zero or close to Pi
//    (numerical expressions might become "NaN"s)
  const double epsilon = 1.e-3;
  if ( x < epsilon || x > (TMath::Pi() - epsilon) ) return 0.;

//--- calculate trigonometric expressions
//    (dependend on angle theta;
//     polar angle of point within cone)
  double sinTheta = TMath::Sin(x);
  double cscTheta = 1./sinTheta;

  double detJacobi = -cscTheta; // partial derrivative dEta/dTheta (for constant particle density in tau id. isolation cone)
  //double detJacobi = 1.; // ordinary solid angle (FOR TESTING ONLY)

//--- evaluate integral over angle phi
//    (azimuth angle of point within cone)
  fPhi_->SetParameterTheta0(theta0_);
  fPhi_->SetParameterPhi0(phi0_);
  fPhi_->SetParameterAlpha(alpha_);

  double integralOverPhi = (*fPhi_)(x);

  if ( debugLevel_ > 0 ) {
    edm::LogVerbatim("") << "integralOverPhi = " << integralOverPhi << std::endl
                         << " theta0 = " << theta0_ << std::endl
                         << " phi0 = " << phi0_ << std::endl
                         << " alpha = " << alpha_ << std::endl
                         << " theta = " << x << std::endl
                         << std::endl;
  }
  
//--- integrand for integration over theta
//    equals 
//      |dEta/dTheta| * integral over phi * sin(theta)
//
//    (o the factor dEta/dTheta represents the particle density as function of theta, 
//       assuming that the particle density is flat in eta;
//     o the factor sin(theta) originates from the solid angle surface element 
//       expressed in spherical polar coordinates)
//
  //return TMath::Abs(detJacobi)*integralOverPhi*sinTheta;
  return TMath::Abs(detJacobi)*integralOverPhi;
}  
double IntegrandThetaFunction::DoEvalPar ( double  x,
const double *  param 
) const [private, virtual]

Definition at line 106 of file IntegrandThetaFunction.cc.

References x.

{
  theta0_ = param[0];
  phi0_ = param[1];
  alpha_ = param[2];

  return DoEval(x);
}
double IntegrandThetaFunction::DoParameterDerivative ( double  ,
const double *  ,
unsigned  int 
) const [private, virtual]

Definition at line 170 of file IntegrandThetaFunction.cc.

{
//--- virtual function inherited from ROOT::Math::ParamFunction base class;
//    not implemented, because not neccessary, but needs to be defined to make code compile...
  edm::LogWarning("") << "Function not implemented yet !" << std::endl;

  return 0.;
}
void IntegrandThetaFunction::DoParameterGradient ( double  x,
double *  paramGradient 
) const [private]

Definition at line 181 of file IntegrandThetaFunction.cc.

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

Definition at line 69 of file IntegrandThetaFunction.cc.

References alpha_, fPhi_, phi0_, and theta0_.

{
  theta0_ = bluePrint.theta0_;
  phi0_ = bluePrint.phi0_;
  alpha_ = bluePrint.alpha_;
  
  (*fPhi_) = (*bluePrint.fPhi_);

  return (*this);
}
void IntegrandThetaFunction::SetParameterAlpha ( double  alpha)

Definition at line 94 of file IntegrandThetaFunction.cc.

References alpha, and alpha_.

Referenced by ConeAreaFunction::DoEval().

{
  alpha_ = alpha;
}
void IntegrandThetaFunction::SetParameterPhi0 ( double  phi0)

Definition at line 89 of file IntegrandThetaFunction.cc.

References normalizedPhi(), and phi0_.

Referenced by ConeAreaFunction::DoEval().

{
  phi0_ = normalizedPhi(phi0); // map azimuth angle into interval [-pi,+pi]
}
void IntegrandThetaFunction::SetParameters ( double *  param) [private]

Definition at line 99 of file IntegrandThetaFunction.cc.

References alpha_, phi0_, and theta0_.

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

Definition at line 84 of file IntegrandThetaFunction.cc.

References theta0_.

Referenced by ConeAreaFunction::DoEval().

{
  theta0_ = theta0;
}

Member Data Documentation

double IntegrandThetaFunction::alpha_ [mutable, private]
const unsigned int IntegrandThetaFunction::debugLevel_ = 0 [static, private]

Definition at line 64 of file IntegrandThetaFunction.h.

Referenced by DoEval().

double IntegrandThetaFunction::phi0_ [mutable, private]
double IntegrandThetaFunction::theta0_ [mutable, private]