CMS 3D CMS Logo

ConeAreaFunction Class Reference

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

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

Inheritance diagram for ConeAreaFunction:

ConeAreaRootFunction

List of all members.

Public Member Functions

ROOT::Math::IGenFunction * Clone () const
 ConeAreaFunction (const ConeAreaFunction &bluePrint)
 ConeAreaFunction ()
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
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().

00042   : ROOT::Math::ParamFunction(2)
00043 {
00044   theta0_ = 0.; 
00045   phi0_ = 0.; 
00046 
00047   etaMax_ = -1;
00048 
00049   fTheta_ = new IntegrandThetaFunction();
00050   integrator_ = new ROOT::Math::Integrator(*fTheta_);
00051 }

ConeAreaFunction::ConeAreaFunction ( const ConeAreaFunction bluePrint  ) 

Definition at line 53 of file ConeAreaFunction.cc.

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

00054 {
00055   theta0_ = bluePrint.theta0_;
00056   phi0_ = bluePrint.phi0_;
00057 
00058   etaMax_ = bluePrint.etaMax_;
00059 
00060   fTheta_ = new IntegrandThetaFunction(*bluePrint.fTheta_);
00061   integrator_ = new ROOT::Math::Integrator(*fTheta_);
00062 }

ConeAreaFunction::~ConeAreaFunction (  ) 

Definition at line 64 of file ConeAreaFunction.cc.

References fTheta_, and integrator_.

00065 {
00066   delete fTheta_; // function gets deleted automatically by Integrator ?
00067   delete integrator_;
00068 }


Member Function Documentation

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

Reimplemented in ConeAreaRootFunction.

Definition at line 48 of file ConeAreaFunction.h.

References ConeAreaFunction().

00048 { return new ConeAreaFunction(*this); }

double ConeAreaFunction::DoDerivative ( double  x  )  const [protected]

Definition at line 146 of file ConeAreaFunction.cc.

References lat::endl().

00147 {
00148 //--- virtual function inherited from ROOT::Math::ParamFunction base class;
00149 //    not implemented, because not neccessary, but needs to be defined to make code compile...
00150   edm::LogWarning("") << "Function not implemented yet !" << std::endl;
00151 
00152   return 0.;
00153 }

double ConeAreaFunction::DoEval ( double  x  )  const [protected]

Reimplemented in ConeAreaRootFunction.

Definition at line 125 of file ConeAreaFunction.cc.

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

Referenced by ConeAreaRootFunction::DoEval().

00126 {
00127 //--- calculate area covered by cone of opening angle alpha
00128 //    (measured from cone axis);
00129 //    evaluate integral over angle theta
00130 //    (polar angle of point within cone)
00131 
00132   fTheta_->SetParameterTheta0(theta0_);
00133   fTheta_->SetParameterPhi0(phi0_);
00134   fTheta_->SetParameterAlpha(x);
00135 
00136   integrator_->SetFunction(*fTheta_); // set updated parameter values in Integrator
00137 
00138   double thetaMin = (etaMax_ > 0) ? 2*TMath::ATan(TMath::Exp(-etaMax_)) : 0.;
00139   double thetaMax = TMath::Pi() - thetaMin;
00140 
00141   double integralOverTheta = integrator_->Integral(thetaMin, thetaMax);
00142 
00143   return integralOverTheta;
00144 }  

void ConeAreaFunction::DoParameterGradient ( double  x,
double *  paramGradient 
) const [protected]

Definition at line 155 of file ConeAreaFunction.cc.

References lat::endl().

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

ConeAreaFunction & ConeAreaFunction::operator= ( const ConeAreaFunction bluePrint  ) 

Definition at line 74 of file ConeAreaFunction.cc.

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

Referenced by ConeAreaRootFunction::operator=().

00075 {
00076   theta0_ = bluePrint.theta0_;
00077   phi0_ = bluePrint.phi0_;
00078   
00079   etaMax_ = bluePrint.etaMax_;
00080 
00081   (*fTheta_) = (*bluePrint.fTheta_);
00082   integrator_->SetFunction(*fTheta_);
00083 
00084   return (*this);
00085 }

void ConeAreaFunction::SetAcceptanceLimit ( double  etaMax  ) 

Definition at line 113 of file ConeAreaFunction.cc.

References lat::endl(), and etaMax_.

Referenced by FixedAreaIsolationCone::setAcceptanceLimit().

00114 {
00115 //--- check that pseudo-rapidity given as function argument is positive
00116 //    (assume equal acceptance for positive and negative pseudo-rapidities)
00117 
00118   if ( etaMax > 0 ) {
00119     etaMax_ = etaMax;
00120   } else {
00121     edm::LogError("") << "etaMax cannot be negative !" << std::endl;
00122   }
00123 }

void ConeAreaFunction::SetParameterPhi0 ( double  phi0  ) 

Definition at line 96 of file ConeAreaFunction.cc.

References normalizedPhi(), and phi0_.

Referenced by FixedAreaIsolationCone::operator()().

00097 {
00098   phi0_ = normalizedPhi(phi0); // map azimuth angle into interval [-pi,+pi]
00099 }

void ConeAreaFunction::SetParameters ( double *  param  )  [protected]

Reimplemented in ConeAreaRootFunction.

Definition at line 101 of file ConeAreaFunction.cc.

References debugLevel_, lat::endl(), phi0_, and theta0_.

Referenced by ConeAreaRootFunction::SetParameters().

00102 {
00103   if ( debugLevel_ > 0 ) {
00104     edm::LogVerbatim("") << "<ConeAreaFunction::SetParameters>:" << std::endl
00105                          << " theta0 = " << param[0] << std::endl
00106                          << " phi0 = " << param[1] << std::endl;
00107   }
00108 
00109   theta0_ = param[0];
00110   phi0_ = param[1];
00111 }

void ConeAreaFunction::SetParameterTheta0 ( double  theta0  ) 

Definition at line 91 of file ConeAreaFunction.cc.

References theta0_.

Referenced by FixedAreaIsolationCone::operator()().

00092 {
00093   theta0_ = theta0;
00094 }


Member Data Documentation

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

Reimplemented in ConeAreaRootFunction.

Definition at line 74 of file ConeAreaFunction.h.

Referenced by SetParameters().

double ConeAreaFunction::etaMax_ [protected]

Definition at line 61 of file ConeAreaFunction.h.

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

IntegrandThetaFunction* ConeAreaFunction::fTheta_ [mutable, private]

Definition at line 71 of file ConeAreaFunction.h.

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

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

Definition at line 72 of file ConeAreaFunction.h.

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

double ConeAreaFunction::phi0_ [protected]

Definition at line 59 of file ConeAreaFunction.h.

Referenced by ConeAreaFunction(), DoEval(), operator=(), SetParameterPhi0(), and SetParameters().

double ConeAreaFunction::theta0_ [protected]

Definition at line 58 of file ConeAreaFunction.h.

Referenced by ConeAreaFunction(), DoEval(), operator=(), SetParameters(), and SetParameterTheta0().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:39 2009 for CMSSW by  doxygen 1.5.4