CMS 3D CMS Logo

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

ConeAreaFunction Class Reference

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

Inheritance diagram for ConeAreaFunction:
ConeAreaRootFunction

List of all members.

Public Member Functions

virtual ROOT::Math::IGenFunction * Clone () const
 ConeAreaFunction ()
 ConeAreaFunction (const ConeAreaFunction &bluePrint)
ConeAreaFunctionoperator= (const ConeAreaFunction &bluePrint)
void SetAcceptanceLimit (double etaMax)
void SetParameterPhi0 (double phi0)
void SetParameterTheta0 (double theta0)
 ~ConeAreaFunction ()

Protected 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)

Protected Attributes

double etaMax_
double phi0_
double theta0_

Private Attributes

IntegrandThetaFunctionfTheta_
ROOT::Math::Integrator * integrator_

Static Private Attributes

static const unsigned int debugLevel_ = 0

Detailed Description

Description: low level class to compute area of signal cone corresponding to three-dimensional opening angle alpha given as function argument

Implementation: imported into CMSSW on 05/18/2007

Definition at line 34 of file ConeAreaFunction.h.


Constructor & Destructor Documentation

ConeAreaFunction::ConeAreaFunction ( )

Definition at line 41 of file ConeAreaFunction.cc.

References etaMax_, fTheta_, integrator_, phi0_, and theta0_.

Referenced by Clone().

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

  etaMax_ = -1;

  fTheta_ = new IntegrandThetaFunction();
  integrator_ = new ROOT::Math::Integrator(*fTheta_);
}
ConeAreaFunction::ConeAreaFunction ( const ConeAreaFunction bluePrint)

Definition at line 53 of file ConeAreaFunction.cc.

References etaMax_, fTheta_, integrator_, phi0_, and theta0_.

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

  etaMax_ = bluePrint.etaMax_;

  fTheta_ = new IntegrandThetaFunction(*bluePrint.fTheta_);
  integrator_ = new ROOT::Math::Integrator(*fTheta_);
}
ConeAreaFunction::~ConeAreaFunction ( )

Definition at line 64 of file ConeAreaFunction.cc.

References fTheta_, and integrator_.

{
  delete fTheta_; // function gets deleted automatically by Integrator ?
  delete integrator_;
}

Member Function Documentation

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

Reimplemented in ConeAreaRootFunction.

Definition at line 48 of file ConeAreaFunction.h.

References ConeAreaFunction().

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

Definition at line 161 of file ConeAreaFunction.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 ConeAreaFunction::DoEval ( double  x) const [protected]

Reimplemented in ConeAreaRootFunction.

Definition at line 140 of file ConeAreaFunction.cc.

References etaMax_, fTheta_, integrator_, phi0_, Pi, IntegrandThetaFunction::SetParameterAlpha(), IntegrandThetaFunction::SetParameterPhi0(), IntegrandThetaFunction::SetParameterTheta0(), and theta0_.

Referenced by DoEvalPar().

{
//--- calculate area covered by cone of opening angle alpha
//    (measured from cone axis);
//    evaluate integral over angle theta
//    (polar angle of point within cone)

  fTheta_->SetParameterTheta0(theta0_);
  fTheta_->SetParameterPhi0(phi0_);
  fTheta_->SetParameterAlpha(x);

  integrator_->SetFunction(*fTheta_); // set updated parameter values in Integrator

  double thetaMin = (etaMax_ > 0) ? 2*TMath::ATan(TMath::Exp(-etaMax_)) : 0.;
  double thetaMax = TMath::Pi() - thetaMin;

  double integralOverTheta = integrator_->Integral(thetaMin, thetaMax);

  return integralOverTheta;
}  
double ConeAreaFunction::DoEvalPar ( double  x,
const double *  param 
) const [protected, virtual]

Definition at line 125 of file ConeAreaFunction.cc.

References DoEval(), phi0_, and theta0_.

{
//--- calculate area covered by cone of opening angle alpha
//    (measured from cone axis);
//    evaluate integral over angle theta
//    (polar angle of point within cone)
// FIXME: the const above is actually not true as it is implemented now.

  theta0_ = param[0];
  phi0_ = param[1];

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

Definition at line 170 of file ConeAreaFunction.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 ConeAreaFunction::DoParameterGradient ( double  x,
double *  paramGradient 
) const [protected]

Definition at line 181 of file ConeAreaFunction.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;
}
ConeAreaFunction & ConeAreaFunction::operator= ( const ConeAreaFunction bluePrint)

Definition at line 74 of file ConeAreaFunction.cc.

References etaMax_, fTheta_, integrator_, phi0_, and theta0_.

{
  theta0_ = bluePrint.theta0_;
  phi0_ = bluePrint.phi0_;
  
  etaMax_ = bluePrint.etaMax_;

  (*fTheta_) = (*bluePrint.fTheta_);
  integrator_->SetFunction(*fTheta_);

  return (*this);
}
void ConeAreaFunction::SetAcceptanceLimit ( double  etaMax)

Definition at line 113 of file ConeAreaFunction.cc.

References jptDQMConfig_cff::etaMax, and etaMax_.

Referenced by FixedAreaIsolationCone::setAcceptanceLimit().

{
//--- check that pseudo-rapidity given as function argument is positive
//    (assume equal acceptance for positive and negative pseudo-rapidities)

  if ( etaMax > 0 ) {
    etaMax_ = etaMax;
  } else {
    edm::LogError("") << "etaMax cannot be negative !" << std::endl;
  }
}
void ConeAreaFunction::SetParameterPhi0 ( double  phi0)

Definition at line 96 of file ConeAreaFunction.cc.

References normalizedPhi(), and phi0_.

Referenced by FixedAreaIsolationCone::operator()().

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

Reimplemented in ConeAreaRootFunction.

Definition at line 101 of file ConeAreaFunction.cc.

References debugLevel_, phi0_, and theta0_.

{
  if ( debugLevel_ > 0 ) {
    edm::LogVerbatim("") << "<ConeAreaFunction::SetParameters>:" << std::endl
                         << " theta0 = " << param[0] << std::endl
                         << " phi0 = " << param[1] << std::endl;
  }

  theta0_ = param[0];
  phi0_ = param[1];
}
void ConeAreaFunction::SetParameterTheta0 ( double  theta0)

Definition at line 91 of file ConeAreaFunction.cc.

References theta0_.

Referenced by FixedAreaIsolationCone::operator()().

{
  theta0_ = theta0;
}

Member Data Documentation

const unsigned int ConeAreaFunction::debugLevel_ = 0 [static, private]

Reimplemented in ConeAreaRootFunction.

Definition at line 75 of file ConeAreaFunction.h.

Referenced by SetParameters().

double ConeAreaFunction::etaMax_ [mutable, protected]

Definition at line 62 of file ConeAreaFunction.h.

Referenced by ConeAreaFunction(), DoEval(), operator=(), and SetAcceptanceLimit().

Definition at line 72 of file ConeAreaFunction.h.

Referenced by ConeAreaFunction(), DoEval(), operator=(), and ~ConeAreaFunction().

ROOT::Math::Integrator* ConeAreaFunction::integrator_ [mutable, private]

Definition at line 73 of file ConeAreaFunction.h.

Referenced by ConeAreaFunction(), DoEval(), operator=(), and ~ConeAreaFunction().

double ConeAreaFunction::phi0_ [mutable, protected]
double ConeAreaFunction::theta0_ [mutable, protected]